summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.cvsignore2
-rw-r--r--Makefile10
-rw-r--r--docs/README18
-rw-r--r--docs/TODO22
-rwxr-xr-xmake_boot_img2
-rw-r--r--perl-install/any.pm37
-rw-r--r--perl-install/common.pm7
-rw-r--r--perl-install/install_steps.pm12
-rw-r--r--perl-install/lang.pm8
-rw-r--r--perl-install/partition_table.pm8
-rw-r--r--perl-install/share/compssList2
-rwxr-xr-xperl-install/standalone/adduserdrake30
-rw-r--r--perl-install/timezone.pm17
13 files changed, 119 insertions, 56 deletions
diff --git a/.cvsignore b/.cvsignore
index 8c59f668d..f3873caf7 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -1,7 +1,7 @@
kernel
pictures
docs
-gi_*.img
+*.img
modules
vmlinuz
install_pcmcia_modules
diff --git a/Makefile b/Makefile
index e2f77443f..68e1128b0 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
-BOOT_IMG = gi_hd.img gi_cdrom.img gi_network.img gi_network_ks.img gi_pcmcia.img gi_pcmcia_ks.img
-BINS = install/install install/local-install install/installinit/init
+BOOT_IMG = hd.img cdrom.img network.img network_ks.img pcmcia.img pcmcia_ks.img
+BINS = install/install install/full-install install/local-install install/installinit/init
DIRS = tools install install/installinit perl-install lnx4win
ROOTDEST = /export
@@ -17,7 +17,7 @@ dirs:
for i in $(DIRS); do make -C $$i; done
$(BOOT_IMG): dirs modules
- ./make_boot_img $@ $(@:gi_%.img=%)
+ ./make_boot_img $@ $(@:%.img=%)
tar: clean
cd .. ; tar cfy gi.tar.bz2 gi
@@ -39,10 +39,10 @@ upload: tar install
touch /tmp/mdkinst_done
cd $(ROOTDEST)/Mandrake ; tar cfz mdkinst.tgz mdkinst
- lftp -c "open -u devel mandrakesoft.com; cd ~/cooker/cooker/images ; mput $(ROOTDEST)/images/gi_*.img"
+ lftp -c "open -u devel mandrakesoft.com; cd ~/cooker/cooker/images ; mput $(ROOTDEST)/images/*.img"
lftp -c "open -u devel mandrakesoft.com; cd ~/tmp ; put $(ROOTDEST)/Mandrake/mdkinst.tgz ; put /tmp/mdkinst_done ; cd ~/cooker/cooker/Mandrake/base ; put $(ROOTDEST)/Mandrake/base/mdkinst_stage2.gz ; put ~/gi/perl-install/compss ; put ~/gi/perl-install/compssList ; put ~/gi/perl-install/compssUsers ; cd ~/cooker/cooker/misc ; put ~/gi/tools/make_mdkinst_stage2 "
lftp -c "open -u devel mandrakesoft.com; cd ~/cooker/contrib/others/src ; put ~/gi.tar.bz2"
rm -f $(ROOTDEST)/Mandrake/mdkinst.tgz
rm -f /tmp/mdkinst_done
-# mkisofs -R -b images/gi_cdrom.img -c images/.catalog /tmp/r /mnt/disk/ | cdrecord -v -eject speed=6 dev=1,0 -
+# mkisofs -R -b images/cdrom.img -c images/.catalog /tmp/r /mnt/disk/ | cdrecord -v -eject speed=6 dev=1,0 -
diff --git a/docs/README b/docs/README
index b38d47b3e..781867732 100644
--- a/docs/README
+++ b/docs/README
@@ -70,12 +70,12 @@ Mandrake/base/mdkinst_stage2.gz
generated from Mandrake/mdkinst tree using misc/make_mdkinst_stage2
See ``Ramdisk or not'' below for more.
-images/gi_*.img
+images/*.img
boot images to use with DrakX. Use:
- - gi_hd for hard-disk install
- - gi_cdrom for cdrom install
- - gi_network for ftp/nfs install
- - gi_pcmcia for pcmcia install (see ``PCMCIA install'' below for more)
+ - hd for hard-disk install
+ - cdrom for cdrom install
+ - network for ftp/nfs install
+ - pcmcia for pcmcia install (see ``PCMCIA install'' below for more)
Some optional files :
@@ -127,9 +127,9 @@ not'' to know if you have to regenerate the mdkinst_stage2.gz)
* PCMCIA install ***************************************************************
********************************************************************************
If the media you use to install is a pcmcia device, you have two choices:
-- use the gi_pcmcia boot disk
+- use the pcmcia boot disk
- use another boot disk and it will ask you a supplementary disk. Give it the
-gi_pcmcia disk.
+pcmcia disk.
********************************************************************************
@@ -169,8 +169,8 @@ Modules can be found in at least 3 places:
- in /lib/modules/modules.cpio.bz2
/modules/modules.cgz is used in stage1. It contains only modules interesting for
-one kind of install. For example in an gi_hd install, it contains scsi modules.
-For an gi_network install, it contains network card modules.
+one kind of install. For example in an hd install, it contains scsi modules.
+For an network install, it contains network card modules.
/lib/modules/ contains modules that should be in /lib/modules/modules.cpio.bz2
but are not for speed up. The serial.o module is there to speed up mouseconfig.
diff --git a/docs/TODO b/docs/TODO
index e408e8d20..228cdbb7b 100644
--- a/docs/TODO
+++ b/docs/TODO
@@ -1,25 +1,23 @@
-cyrillic font buggy in DrakX
-
-mandrake_doc-xx, the symlink is no good in /usr/doc/mandrake as
+pcmcia.img does not handle hd/cdrom
-in ftp install, bug with X server install with wu-ftpd 2.6 (see http://www.wu-ftpd.org/broken-clients.html)
+cyrillic font buggy in DrakX
remove xfs user from kdm
-bug rpmdrake: just after installing a package, switch to `Installed', the package has wrong name
-
bug in users: mandrake user is added twice in strange installs
(mixed of security 0 + ???)
-bug in diskdrake:
-in expert: blank, create hda5 at beginning, create hda6 at the end, create hda7
-in the middle, remove the first one. Result hda5 at the end and bug.
+mandrake_doc-xx, the symlink is no good in /usr/doc/mandrake as
+
+in ftp install, bug with X server install with wu-ftpd 2.6 (see http://www.wu-ftpd.org/broken-clients.html)
+
+--------------------------------------------------------------------------------
+bug rpmdrake: just after installing a package, switch to `Installed', the package has wrong name
urpmi: pb if XXX-devel requires XXX = 1.2.3 and we updgrade XXX-1.2.3
standalone applications for configuration (netdrake, authentificationconf, soundcard)
---------------------------------------------------------------------------------
Xconfiguration: if "can't open fixed font", relaunch xfs.
bug in defcfg in with lang=fr_FR, display is buggy
@@ -38,6 +36,10 @@ paride in stage1
bug in diskdrake: can in strange cases create a primary partition at sector #0
+(done,pix(partly, protection against bugging))bug in diskdrake:
+in expert: blank, create hda5 at beginning, create hda6 at the end, create hda7
+in the middle, remove the first one. Result hda5 at the end and bug.
+
(pix)add paride.o (and the others)
(pix)install text on mem=8M, mem=16M?
diff --git a/make_boot_img b/make_boot_img
index 999d8e0ef..63286d61f 100755
--- a/make_boot_img
+++ b/make_boot_img
@@ -16,7 +16,7 @@ if ($>) {
$install = $ {{
- pcmcia => "install",
+ pcmcia => "full-install",
network => "install",
cdrom => "local-install",
hd => "local-install"
diff --git a/perl-install/any.pm b/perl-install/any.pm
new file mode 100644
index 000000000..5b2fef5c3
--- /dev/null
+++ b/perl-install/any.pm
@@ -0,0 +1,37 @@
+package any;
+
+use diagnostics;
+use strict;
+
+#-######################################################################################
+#- misc imports
+#-######################################################################################
+use common qw(:file :system :common :functional);
+
+sub addKdmUsers {
+ my ($prefix, @users) = @_;
+ require timezone;
+ my @u1 = my @users_male = qw(tie default curly);
+ my @u2 = my @users_female = qw(brunette girl woman-blond);
+ foreach (@users) {
+ my $l = rand() < timezone::sexProb($_->{name}) ? \@u2 : \@u1;
+ my $u = splice(@$l, rand(@$l), 1); #- known biased (see cookbook for better)
+ symlink "../../../../icons/user-$u-mdk.xpm", "$prefix/usr/share/apps/kdm/pics/users/$_.xpm";
+ @u1 = @users_male unless @u1;
+ @u2 = @users_female unless @u2;
+ }
+ symlinkf "../../../../icons/user-hat-mdk.xpm", "$prefix/usr/share/apps/kdm/pics/users/root.xpm" unless $::isStandalone;
+}
+
+sub addUsers {
+ my ($prefix, @users) = @_;
+ my $msec = "$prefix/etc/security/msec";
+ foreach my $u (@users) {
+ substInFile { s/^$u\n//; $_ .= "$u\n" if eof } "$msec/user.conf" if -d $msec;
+ }
+ run_program::rooted($prefix, "/etc/security/msec/init-sh/grpuser.sh --refresh");
+
+ addKdmUsers($prefix, @users);
+}
+
+1;
diff --git a/perl-install/common.pm b/perl-install/common.pm
index b48199abc..13d7c1d20 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -34,7 +34,12 @@ sub fold_left(&@) {
$a
}
-sub _ { my $s = shift @_; sprintf translate($s), @_ }
+sub _ {
+ my $s = shift @_; my $t = translate($s);
+ $t && ref $t or return sprintf $t, @_;
+ my ($T, @p) = @$t;
+ sprintf $T, @_[@p];
+}
#-delete $main::{'_'};
sub __ { $_[0] }
sub even($) { $_[0] % 2 == 0 }
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 4a252c29b..f57ed6550 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -488,18 +488,8 @@ sub addUser($) {
eval { commands::chown_("-r", "$u->{uid}.$u->{gid}", "$p$u->{home}") }
if $u->{uid} != $u->{oldu} || $u->{gid} != $u->{oldg};
- 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");
-
- my @users = qw(tie brunette default girl woman-blond);
- my @u = @users; push @u, @users while @u < @l; @u = @u[0..$#l];
- foreach (@l) {
- my $u = splice(@u, rand(@u), 1); #- known biased (see cookbook for better)
- symlink "../../../../icons/util-$u.xpm", "$o->{prefix}/usr/share/apps/kdm/pics/users/$_->{name}.xpm";
- }
- symlinkf "../../../../icons/util-hat.xpm", "$o->{prefix}/usr/share/apps/kdm/pics/users/root.xpm";
+ any::addUsers($o->{prefix}, map { $_->{name} } @l);
}
#------------------------------------------------------------------------------
diff --git a/perl-install/lang.pm b/perl-install/lang.pm
index 7a4d77785..897305b8c 100644
--- a/perl-install/lang.pm
+++ b/perl-install/lang.pm
@@ -237,7 +237,13 @@ sub load_po($) {
if (/^(#|$)/ && $state != 3) {
$state = 3;
- $s .= qq("$from" => "$to",\n) if $from;
+ if (my @l = $to =~ /%(\d+)\$/g) {
+ $to =~ s/%(\d+)\$/%/g;
+ $to = qq([ "$to", ) . join(",", map { $_ - 1 } @l) . " ],";
+ } else {
+ $to = qq("$to");
+ }
+ $s .= qq("$from" => $to,\n) if $from;
$from = $to = '';
}
$to .= (/"(.*)"/)[0] if $state == 1;
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index aa6912ab9..e8def5b18 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -436,8 +436,14 @@ sub remove($$) {
}
$i++;
}
+
+ my ($first, $second, $third) = map { $_->{normal} } @{$hd->{extended} || []};
+ if ($third && $first eq $part) {
+ die "Can't handle removing hda5 when hda6 is not the second partition" if $second->{start} > $third->{start};
+ }
+
#- otherwise search it in extended partitions
- foreach (@{$hd->{extended}}) {
+ foreach (@{$hd->{extended} || []}) {
$_->{normal} eq $part or next;
delete $_->{normal}; #- remove it
diff --git a/perl-install/share/compssList b/perl-install/share/compssList
index f87395607..00bf0610d 100644
--- a/perl-install/share/compssList
+++ b/perl-install/share/compssList
@@ -189,7 +189,7 @@ gnomehack 50 0 45
gnomeicu 61 0 58
gnome-libs 0 0 55
gnome-libs-devel 10 0 55
-gnome-linuxconf 65 0 53
+gnome-linuxconf 69 0 69
gnome-media 60 0 58
gnome-objc 0 0 40
gnome-objc-devel 10 0 40
diff --git a/perl-install/standalone/adduserdrake b/perl-install/standalone/adduserdrake
index 490f09b7e..0bc27dd94 100755
--- a/perl-install/standalone/adduserdrake
+++ b/perl-install/standalone/adduserdrake
@@ -4,6 +4,7 @@ use lib qw(/usr/lib/libDrakX);
use common qw(:common :functional :system :file);
use interactive;
+use any;
local $_ = join '', @ARGV;
@@ -50,26 +51,25 @@ if ($in->ask_from_entries_refH(
},
)) {
push @users, $u;
- $u->{pw} = $isMD5 ? c::crypt_md5($u->{password}, salt(8)) : crypt($u->{password}, salt(2));
- system("adduser $u->{name}");
- substInFile {
+ $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";
}
- } "/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;
-}
-
+ }
+} "/etc/passwd";
+system("pwconv") if $isShadow;
$in->exit(0);
diff --git a/perl-install/timezone.pm b/perl-install/timezone.pm
index f0c7cb207..9c1427c76 100644
--- a/perl-install/timezone.pm
+++ b/perl-install/timezone.pm
@@ -78,4 +78,21 @@ sub bestTimezone {
$l2t{common::bestMatchSentence($langtext, keys %l2t)};
}
+my %sex = (
+fr_FR => { '[iln]a$' => 1, '[cdilnst]e$' => 1, 'e$' => .8, 'n$' => .1, 'd$' => .05 },
+en => { 'a$' => 1, 'o$' => 0, '[ln]$' => .3, '[rs]$' => .2 },
+);
+
+
+sub sexProb($) {
+ local ($_) = @_;
+ my $l = $sex{$ENV{LC_ALL}} or return 0.5;
+
+ my ($prob, $nb) = (0, 0);
+ foreach my $k (keys %$l) {
+ /$k/ and $prob += $l->{$k}, $nb++;
+ }
+ $nb ? $prob / $nb : 0.5;
+}
+
1;