From bc5be8ae6923c0605df687918b35a77a735b1b35 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 21 Sep 2000 13:06:05 +0000 Subject: no_comment --- Makefile | 3 ++- make_boot_img | 5 +++-- perl-install/ChangeLog | 13 ++++++++++++ perl-install/Xconfigurator.pm | 2 +- perl-install/install2.pm | 4 +++- perl-install/install_any.pm | 8 ++----- perl-install/install_steps.pm | 3 +++ perl-install/install_steps_gtk.pm | 2 +- perl-install/install_steps_interactive.pm | 4 ++-- perl-install/mouse.pm | 8 ++++++- perl-install/pkgs.pm | 26 +++++++++++------------ perl-install/standalone/mousedrake | 35 +++++++++++++++++-------------- rescue/tree/etc/oem | 10 ++++++--- update_kernel | 33 ++++++++++++++++------------- 14 files changed, 94 insertions(+), 62 deletions(-) diff --git a/Makefile b/Makefile index c9201e64d..58216f3c1 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ ARCH := $(patsubst i%86,i386,$(shell uname -m)) ARCH := $(patsubst sparc%,sparc,$(ARCH)) -RELEASE_BOOT_IMG = hd.img cdrom.img network.img +RELEASE_BOOT_IMG = hd.img hd_reiser.img cdrom.img network.img ifeq (i386,$(ARCH)) RELEASE_BOOT_IMG += pcmcia.img blank.img all.img other.img endif @@ -96,6 +96,7 @@ upload: clean install perl -pe 'exit if / DrakX = 2 or die "usage: $0 all|other|cdrom|hd|network|blank|pcmcia|live|tftp|tftprd\n"; +@ARGV >= 2 or die "usage: $0 all|other|cdrom|hd|hd_reiser|network|blank|pcmcia|live|tftp|tftprd\n"; use Config; Config->import; @@ -35,6 +35,7 @@ $install = $ {{ network => "install", cdrom => "local-install", hd => "local-install", + hd_reiser => "local-install", live64 => "full-install", tftp64 => "full-install", tftprd64 => "full-install", @@ -136,7 +137,7 @@ label lnx4win append ramdisk_size=32000 initrd=$type.rdz $ftype lnx4win vga=788 label oem kernel vmlinuz - append ramdisk_size=32000 initrd=cdrom.rdz cdrom rescue oem rw + append ramdisk_size=32000 initrd=all.rdz cdrom rescue oem rw label auto kernel vmlinuz append ramdisk_size=32000 initrd=$type.rdz $ftype auto_install=auto_inst.cfg.pl diff --git a/perl-install/ChangeLog b/perl-install/ChangeLog index 205a418ab..0fbb8689c 100644 --- a/perl-install/ChangeLog +++ b/perl-install/ChangeLog @@ -1,5 +1,18 @@ 2000-09-21 Pixel + * Xconfigurator.pm (write_XF86Config): comment the omit + xfree86-dga + + * install_steps.pm (afterInstallPackages): configure GPG public + keyring with mandrake key + + * standalone/mousedrake: updated/fixed for new mouse handling + + * install2.pm (main): update for handling oem installs + + * many files: relGetFile cleanup, updated calls to getFile and + getAndSaveFile accordingly + * Xconfigurator.pm (testFinalConfig): new XFdrake-image-test.jpg * detect_devices.pm (@netdevices): plip removed in standalone, diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm index cfd83dd14..6dd6efd05 100644 --- a/perl-install/Xconfigurator.pm +++ b/perl-install/Xconfigurator.pm @@ -801,7 +801,7 @@ Section "Module" # initialisation of the XFree86-DGA extension within that module. SubSection "extmod" - Option "omit xfree86-dga" + #Option "omit xfree86-dga" EndSubSection # This loads the Type1 and FreeType font modules diff --git a/perl-install/install2.pm b/perl-install/install2.pm index 9677f38af..84773836d 100644 --- a/perl-install/install2.pm +++ b/perl-install/install2.pm @@ -640,7 +640,9 @@ sub main { push @auto, 'selectInstallClass'; } if ($oem) { - push @auto, 'selectInstallClass', 'selectMouse', 'configureTimezone', 'exitInstall'; + $o->{partitioning}{auto_allocate} = 1; + $o->{compssListLevel} = 50; + push @auto, 'selectInstallClass', 'selectMouse', 'doPartitionDisks', 'choosePackages', 'configureTimezone', 'exitInstall'; } foreach (@auto) { eval "undef *" . (!/::/ && "install_steps_interactive::") . $_; diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index e0f3475cd..86afd29b9 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -63,11 +63,7 @@ sub changeMedium($$) { } sub relGetFile($) { local $_ = $_[0]; - m,^(Mandrake|lnx4win)/, and return $_; - /\.img$/ and return "images/$_"; - my $dir = m|/| ? "Mandrake/mdkinst" : /^(?:compss|compssList|compssUsers|provides|filelist|depslist.*|hdlist.*|auto_inst.*)$/ ? - "Mandrake/base/": "$::o->{packages}[2]{$asked_medium}{rpmsdir}/"; - "$dir$_"; + m|\.rpm$| ? "$::o->{packages}[2]{$asked_medium}{rpmsdir}/$_" : $_; } sub askChangeMedium($$) { my ($method, $medium) = @_; @@ -541,7 +537,7 @@ sub loadO { my ($O, $f) = @_; $f ||= auto_inst_file; my $o; if ($f =~ /^(floppy|patch)$/) { - my $f = $f eq "floppy" ? "auto_inst.cfg" : "patch"; + my $f = $f eq "floppy" ? 'Mandrake/base/auto_inst.cfg' : "patch"; unless ($::testing) { fs::mount(devices::make("fd0"), "/mnt", (arch() =~ /sparc/ ? "romfs" : "vfat"), 'readonly'); $f = "/mnt/$f"; diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index c0246035e..ca5cd2a2a 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -432,6 +432,9 @@ Consoles 1,3,4,7 may also contain interesting information"; substInFile { s/^urpmi\n//; $_ .= "urpmi\n" if eof } "$msec/group.conf" if -d $msec; } + install_any::getAndSaveFile('RPM-GPG-KEYS', '/root/tmp/RPM-GPG-KEYS'); + run_program::rooted($o->{prefix}, qw(gpg --fast-import --keyring /etc/rpm/pubring.gpg /root/tmp/RPM-GPG-KEYS)); + # #- update language and icons for KDE. # update_userkderc($o->{prefix}, 'Locale', Language => ""); # log::l("updating kde icons according to available devices"); diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm index 6144af723..6eb6ac2d7 100644 --- a/perl-install/install_steps_gtk.pm +++ b/perl-install/install_steps_gtk.pm @@ -82,7 +82,7 @@ sub new($$) { my $prog = /Xsun|Xpmac/ ? $_ : "XF86_$_"; unless (-x "$dir/$prog") { unlink $_ foreach glob_("$dir/X*"); - install_any::getAndSaveFile("$dir/$prog", "$dir/$prog") or die "failed to get server $prog: $!"; + install_any::getAndSaveFile("Mandrake/mdkinst$dir/$prog", "$dir/$prog") or die "failed to get server $prog: $!"; chmod 0755, "$dir/$prog"; } if (/FB/) { diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index e142d4c47..cc4a93e1d 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -913,7 +913,7 @@ _("Do you want to generate an auto install floppy for linux replication?"), $flo my $workdir = "$o->{prefix}/tmp/work"; -d $workdir or rmdir $workdir; my $w = $o->wait_message('', _("Creating auto install floppy")); - install_any::getAndSaveFile("$image.img", $imagefile) or log::l("failed to write $dev"), return; + install_any::getAndSaveFile("images/$image.img", $imagefile) or log::l("failed to write $dev"), return; devices::make($_) foreach qw(/dev/loop6 /dev/ram); run_program::run("losetup", "/dev/loop6", $imagefile); @@ -943,7 +943,7 @@ _("Do you want to generate an auto install floppy for linux replication?"), $flo } else { { my $w = $o->wait_message('', _("Creating auto install floppy")); - install_any::getAndSaveFile("$image.img", $dev) or log::l("failed to write $dev"), return; + install_any::getAndSaveFile("images/$image.img", $dev) or log::l("failed to write $dev"), return; } fs::mount($dev, "/floppy", "vfat", 0); substInFile { s/timeout.*//; s/^(\s*append)/$1 kickstart=floppy/ } "/floppy/syslinux.cfg"; diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm index a1debd013..3366e0807 100644 --- a/perl-install/mouse.pm +++ b/perl-install/mouse.pm @@ -202,12 +202,18 @@ sub detect() { # find one whether or not I had one installed! So.. default to it. "busmouse|2 buttons"); } + + if ($::isStandalone) { + detect_devices::hasMousePS2("psaux") and return fullname2mouse("PS/2|Standard", unsafe => 1); + } #- probe serial device to make sure a wacom has been detected. eval { commands::modprobe("serial") }; my ($r, $wacom) = mouseconfig(); return ($r, $wacom) if $r; - detect_devices::hasMousePS2("psaux") and return fullname2mouse("PS/2|Standard", unsafe => 1), $wacom; + if (!$::isStandalone) { + detect_devices::hasMousePS2("psaux") and return fullname2mouse("PS/2|Standard", unsafe => 1), $wacom; + } if (modules::get_alias("usb-interface") && detect_devices::hasUsbMouse()) { eval { diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index c74e4365b..593e574ef 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -383,7 +383,7 @@ sub skipSetWithProvides { sub psUpdateHdlistsDeps { my ($prefix, $method) = @_; - my $listf = install_any::getFile('hdlists') or die "no hdlists found"; + my $listf = install_any::getFile('Mandrake/base/hdlists') or die "no hdlists found"; #- WARNING: this function should be kept in sync with functions #- psUsingHdlists and psUsingHdlist. @@ -403,20 +403,20 @@ sub psUpdateHdlistsDeps { my $fakemedium = $method . $medium; my $newf = "$prefix/var/lib/urpmi/hdlist.$fakemedium.cz2" . ($hdlist =~ /\.cz2/ && "2"); -e $newf and do { unlink $newf or die "cannot remove $newf: $!"; }; - install_any::getAndSaveFile($hdlist, $newf) or die "no $hdlist found"; + install_any::getAndSaveFile("Mandrake/base/$hdlist", $newf) or die "no $hdlist found"; symlinkf $newf, "/tmp/$hdlist"; ++$medium; } #- this is necessary for urpmi. - install_any::getAndSaveFile("depslist.ordered", "$prefix/var/lib/urpmi/depslist.ordered"); - install_any::getAndSaveFile("provides", "$prefix/var/lib/urpmi/provides"); - install_any::getAndSaveFile("compss", "$prefix/var/lib/urpmi/compss"); + install_any::getAndSaveFile('Mandrake/base/depslist.ordered', "$prefix/var/lib/urpmi/depslist.ordered"); + install_any::getAndSaveFile('Mandrake/base/provides', "$prefix/var/lib/urpmi/provides"); + install_any::getAndSaveFile('Mandrake/base/compss', "$prefix/var/lib/urpmi/compss"); } sub psUsingHdlists { my ($prefix, $method) = @_; - my $listf = install_any::getFile('hdlists') or die "no hdlists found"; + my $listf = install_any::getFile('Mandrake/base/hdlists') or die "no hdlists found"; my @packages = ({}, [], {}); my @hdlists; @@ -466,7 +466,7 @@ sub psUsingHdlist { #- for getting header of package during installation or after by urpmi. my $newf = "$prefix/var/lib/urpmi/hdlist.$fakemedium.cz" . ($hdlist =~ /\.cz2/ && "2"); -e $newf and do { unlink $newf or die "cannot remove $newf: $!"; }; - install_any::getAndSaveFile($fhdlist || $hdlist, $newf) or die "no $hdlist found"; + install_any::getAndSaveFile($fhdlist || "Mandrake/base/$hdlist", $newf) or die "no $hdlist found"; symlinkf $newf, "/tmp/$hdlist"; #- extract filename from archive, this take advantage of verifying @@ -553,8 +553,8 @@ sub getDeps($) { my ($prefix, $packages) = @_; #- this is necessary for urpmi. - install_any::getAndSaveFile("depslist.ordered", "$prefix/var/lib/urpmi/depslist.ordered"); - install_any::getAndSaveFile("provides", "$prefix/var/lib/urpmi/provides"); + install_any::getAndSaveFile('Mandrake/base/depslist.ordered', "$prefix/var/lib/urpmi/depslist.ordered"); + install_any::getAndSaveFile('Mandrake/base/provides', "$prefix/var/lib/urpmi/provides"); #- beware of heavily mismatching depslist.ordered file against hdlist files. my $mismatch = 0; @@ -619,7 +619,7 @@ sub readCompss { my ($p, @compss); #- this is necessary for urpmi. - install_any::getAndSaveFile("compss", "$prefix/var/lib/urpmi/compss"); + install_any::getAndSaveFile('Mandrake/base/compss', "$prefix/var/lib/urpmi/compss"); local *F; open F, "$prefix/var/lib/urpmi/compss" or die "can't find compss"; @@ -640,7 +640,7 @@ sub readCompss { sub readCompssList { my ($packages, $langs) = @_; - my $f = install_any::getFile("compssList") or die "can't find compssList"; + my $f = install_any::getFile('Mandrake/base/compssList') or die "can't find compssList"; my @levels = split ' ', <$f>; foreach (<$f>) { @@ -675,7 +675,7 @@ sub readCompssUsers { $l or return; $_ = $packages->[0]{$_} or log::l("unknown package $1 (in compssUsers)") foreach @$l; }; - my $f = install_any::getFile("compssUsers") or die "can't find compssUsers"; + my $f = install_any::getFile('Mandrake/base/compssUsers') or die "can't find compssUsers"; foreach (<$f>) { /^\s*$/ || /^#/ and next; s/#.*//; @@ -794,7 +794,7 @@ sub selectPackagesToUpgrade($$$;$$) { #- get filelist of package to avoid getting all header into memory. my %filelist; my $current; - my $f = install_any::getFile("filelist") or log::l("unable to get filelist of packages"); + my $f = install_any::getFile('Mandrake/base/filelist') or log::l("unable to get filelist of packages"); foreach (<$f>) { chomp; if (/^#(.*)/) { diff --git a/perl-install/standalone/mousedrake b/perl-install/standalone/mousedrake index 2b646e334..93fc3081e 100755 --- a/perl-install/standalone/mousedrake +++ b/perl-install/standalone/mousedrake @@ -2,28 +2,30 @@ use lib qw(/usr/lib/libDrakX); -use common qw(:system); +use common qw(:common :system); use interactive; use mouse; use c; local $_ = join '', @ARGV; -/-h/ and die "usage: mousedrake [--auto] [--noauto] [--testing]\n"; +/-h/ and die "usage: mousedrake [--auto] [--testing]\n"; $::auto = /-auto/; -$::noauto = /-noauto/; $::testing = /-testing/; $::isStandalone = 1; my $in = vnew interactive('su'); -my $mouse = eval { mouse::detect() } unless $::noauto; +my ($mouse) = mouse::detect() unless $::noauto; -if (!(my $name = $mouse && $mouse->{FULLNAME}) || !$::auto) { - $name ||= "Generic Mouse (serial)"; - $name = $in->ask_from_list_('', _("What is the type of your mouse?"), [ mouse::names() ], $name); - $mouse = mouse::name2mouse($name); +if (!$mouse || !$::auto) { + $mouse ||= mouse::fullname2mouse("serial|Generic 2 Button Mouse"); + my $name = $in->ask_from_treelistf('', _("Please, choose the type of your mouse."), '|', + sub { join '|', map { translate($_) } split '\|', $_[0] }, + [ mouse::fullnames ], + $mouse->{type} . '|' . $mouse->{name}); + $mouse = mouse::fullname2mouse($name); if ($mouse->{device} eq "usbmouse") { require pci_probing::main; @@ -45,23 +47,24 @@ modules::write_conf('') if $mouse->{device} eq "usbmouse" && !$::testing; my $f = "/etc/X11/XF86Config"; my $g = "/etc/X11/XF86Config-4"; -my $zaxis = "\n ZAxisMapping 4 5" if $mouse->{nbuttons} > 3; - $zaxis .= "\n ZAxisMapping 6 7" if $mouse->{nbuttons} > 5; - $zaxis = " - Emulate3Buttons - Emulate3Timeout 50" if $mouse->{nbuttons} < 3; +my @zaxis = ( + $mouse->{nbuttons} > 3 ? [ "ZAxisMapping", "4 5" ] : (), + $mouse->{nbuttons} > 5 ? [ "ZAxisMapping", "6 7" ] : (), + $mouse->{nbuttons} < 3 ? ([ "Emulate3Buttons" ], [ "Emulate3Timeout", "50" ]) : () +); +my $zaxis = join('', map { qq(\n $_->[0]) . ($_->[1] && qq( $_->[1])) } @zaxis); substInFile { - if (/^Section "Pointer"/ .. /^EndSection/) { + if (/^Section\s+"Pointer"/ .. /^EndSection/) { $_ = '' if /(ZAxisMapping|Emulate3)/; #- remove existing line s|^(\s*Protocol\s+).*|$1"$mouse->{XMOUSETYPE}"|; s|^(\s*Device\s+).*|$1"/dev/mouse"$zaxis|; } } $f if -e $f && !$::testing; -$zaxis =~ s/(ZAxisMapping|Emulate3\w+)/Option "$1"/g; +$zaxis = join('', map { qq(\n Option "$_->[0]") . ($_->[1] && qq( "$_->[1]")) } @zaxis); substInFile { - if (/^Identifier "Mouse1"/ .. /^EndSection/) { + if (/Identifier\s+"Mouse1"/ .. /^EndSection/) { $_ = '' if /(ZAxisMapping|Emulate3)/; #- remove existing line s|^(\s*Option\s+"Protocol"\s+).*|$1"$mouse->{XMOUSETYPE}"|; s|^(\s*Option\s+"Device"\s+).*|$1"/dev/mouse"$zaxis|; diff --git a/rescue/tree/etc/oem b/rescue/tree/etc/oem index d76e6db78..fe8abac15 100755 --- a/rescue/tree/etc/oem +++ b/rescue/tree/etc/oem @@ -2,8 +2,10 @@ [ "$1" = "-f" ] || { echo "Call it with option -f, but don't fear loosing all your data, this command is dangerous!"; exit 1; } -echo "I'm going to install the oem version on your hard drive" -echo "!!ALL DATA IS GOING TO BE LOST!!" +echo +echo +echo "I'm going to install the OEM version on your hard drive" +echo "!!ALL DATA IS GOING TO BE LOST!!" echo echo "Press enter to go on" @@ -36,6 +38,8 @@ echo "Copying cdrom on hard drive" cp -a /boot /cdrom/boot /cdrom/Mandrake /hd rm /hd/Mandrake/mdkinst/usr/bin/runinstall2 -echo "Done, oem hard drive ready! Press enter to reboot" +echo +echo "Done. OEM hard drive ready!" +echo "Press enter to reboot" read reboot diff --git a/update_kernel b/update_kernel index 35451dfac..68d0bd268 100755 --- a/update_kernel +++ b/update_kernel @@ -8,7 +8,8 @@ function f() { ARCH=`uname -m | sed -e 's/i.86/i386/' -e 's/sparc.*/sparc/'` -f "scsi disk" ; SCSI_DRIVERS=$v +f "scsi" ; SCSI_DRIVERS=$v +f "disk" ; DISK_DRIVERS=$v f "net" ; NETWORK_DRIVERS=$v f "scsi cdrom" ; CD_DRIVERS=$v f "pcmcia net_raw cdrom_raw scsi_raw disk_raw" ; PCMCIA_DRIVERS=$v @@ -16,12 +17,13 @@ f "big net_raw cdrom_raw scsi_raw disk_raw" ; BIG_DRIVERS=$v f "pcmcia net cdrom scsi disk keepbig" ; ALL_DRIVERS=$v [ $ARCH == "i386" ] && FSMODULES="vfat.o fat.o" -NETWORK_MODULES="$FSMODULES $NETWORK_DRIVERS" -CDROM_MODULES=" $FSMODULES $CD_DRIVERS" -HD_MODULES=" $FSMODULES $SCSI_DRIVERS loop.o isofs.o" -PCMCIA_MODULES=" $FSMODULES $PCMCIA_DRIVERS" -BIG_MODULES=" $FSMODULES $BIG_DRIVERS" -ALL_MODULES=" $FSMODULES $ALL_DRIVERS reiserfs.o" +NETWORK_MODULES=" $FSMODULES $NETWORK_DRIVERS" +CDROM_MODULES=" $FSMODULES $CD_DRIVERS" +HD_MODULES=" $FSMODULES $SCSI_DRIVERS $DISK_DRIVERS loop.o isofs.o" +HD_REISER_MODULES="$FSMODULES $SCSI_DRIVERS reiserfs.o loop.o isofs.o" +PCMCIA_MODULES=" $FSMODULES $PCMCIA_DRIVERS" +BIG_MODULES=" $FSMODULES $BIG_DRIVERS" +ALL_MODULES=" $FSMODULES $ALL_DRIVERS reiserfs.o" NOT_USEFULL_IN_STAGE1="nls_*.o parport_probe.o raid*.o serial.o smbfs.o usb-*.o" PCMCIA_INSTALLMODULES="pcmcia_core.o tcic.o ds.o i82365.o" @@ -42,14 +44,15 @@ rm -rf modules ; install -d modules cp -f `find ../"$KERNEL_BOOT_PATH"/lib/modules/ -name "*.o"` . /sbin/depmod -m ../System.map -i -e *.o | perl -pe 's/\\\n//' | perl -ne 's/\.o//g; s/[ \t]+/ /g; print if /: /' > modules.dep perl -pi -e 's/((plip|ppa|imm): parport)/$1 parport_pc/' modules.dep - ls *.o | packdrake -b9s modules.cz 400000 - ls *.o | cpio --quiet -H crc -o | bzip2 -9> modules.cpio.bz2 - ls $NETWORK_MODULES | cpio --quiet -H crc -o | gzip -9 > network_modules.cgz - ls $CDROM_MODULES | cpio --quiet -H crc -o | gzip -9 > cdrom_modules.cgz - ls $HD_MODULES | cpio --quiet -H crc -o | gzip -9 > hd_modules.cgz - ls $PCMCIA_MODULES | cpio --quiet -H crc -o | gzip -9 > pcmcia_modules.cgz - ls $BIG_MODULES | cpio --quiet -H crc -o | gzip -9 > other_modules.cgz - ls $ALL_MODULES | cpio --quiet -H crc -o | gzip -9 > all_modules.cgz + ls *.o | packdrake -b9s modules.cz 400000 + ls *.o | cpio --quiet -H crc -o | bzip2 -9> modules.cpio.bz2 + ls $NETWORK_MODULES | cpio --quiet -H crc -o | gzip -9 > network_modules.cgz + ls $CDROM_MODULES | cpio --quiet -H crc -o | gzip -9 > cdrom_modules.cgz + ls $HD_MODULES | cpio --quiet -H crc -o | gzip -9 > hd_modules.cgz + ls $HD_REISER_MODULES| cpio --quiet -H crc -o | gzip -9 > hd_reiser_modules.cgz + ls $PCMCIA_MODULES | cpio --quiet -H crc -o | gzip -9 > pcmcia_modules.cgz + ls $BIG_MODULES | cpio --quiet -H crc -o | gzip -9 > other_modules.cgz + ls $ALL_MODULES | cpio --quiet -H crc -o | gzip -9 > all_modules.cgz [ "$ARCH" == "i386" ] && { cp $PCMCIA_INSTALLMODULES ../install_pcmcia_modules/ } -- cgit v1.2.1