From 7969dda435fe3a8b3d1dd89bd3551853003c3649 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 19 May 2005 09:01:42 +0000 Subject: use install-xml-file-list --- rescue/aliases | 4 +- rescue/list | 157 --------------------------------- rescue/list.alpha | 1 - rescue/list.i386 | 15 ---- rescue/list.ia64 | 7 -- rescue/list.ppc | 13 --- rescue/list.sparc | 2 - rescue/list.x86_64 | 18 ---- rescue/list.xml | 233 +++++++++++++++++++++++++++++++++++++++++++++++++ rescue/make_rescue_img | 76 +++------------- 10 files changed, 249 insertions(+), 277 deletions(-) delete mode 100644 rescue/list delete mode 100644 rescue/list.alpha delete mode 100644 rescue/list.i386 delete mode 100644 rescue/list.ia64 delete mode 100644 rescue/list.ppc delete mode 100644 rescue/list.sparc delete mode 100644 rescue/list.x86_64 create mode 100644 rescue/list.xml (limited to 'rescue') diff --git a/rescue/aliases b/rescue/aliases index eae42f0ce..cec7b82ba 100644 --- a/rescue/aliases +++ b/rescue/aliases @@ -1,4 +1,6 @@ /bin/zcat gzip /bin/gunzip gzip -/bin/rpm /usr/bin/rpm-dynamic /bin/vi vim-minimal +/sbin/lsmod lsmod-25 +/sbin/rmmod rmmod-25 +/sbin/insmod insmod-25 diff --git a/rescue/list b/rescue/list deleted file mode 100644 index d817c7288..000000000 --- a/rescue/list +++ /dev/null @@ -1,157 +0,0 @@ -/bin/bash -/bin/cat -/bin/chmod -/bin/chown -/bin/cp -/bin/date -/bin/dd -/bin/df -/bin/dmesg -/bin/false -/bin/grep -/bin/gzip -/usr/bin/bzip2 -/usr/bin/bunzip2 -/usr/bin/bzcat -/usr/bin/packdrake -/usr/bin/parsehdlist -/bin/hostname -/bin/kill -/bin/ln -/usr/bin/du -/usr/lib/kbd -/bin/ls -/bin/mkdir -/bin/mknod -/bin/mount -/bin/mount -/bin/mv -/bin/ping -/bin/ps -/bin/pwd -/bin/rm -/bin/rmdir -/bin/setserial -/sbin/lsmod -/sbin/lsmod.old -/bin/cpio -/usr/bin/diff -/bin/sh -/bin/sleep -/bin/sync -/bin/touch -/bin/tar -/bin/true -/bin/umount -/etc/inputrc -/etc/termcap -/LIB/libnss_files-* -/LIB/libnss_files.so.2 -/sbin/badblocks -/sbin/debugfs -/sbin/e2fsck -/sbin/fdisk -/sbin/fsck.ext2 -/sbin/fsck.ext3 -/sbin/halt -/sbin/ifconfig -/sbin/init -/sbin/insmod -/sbin/insmod.old -/sbin/ldconfig -/sbin/mingetty -/sbin/mkdosfs -/sbin/mkfs.ext2 -/sbin/xfs_repair -/sbin/reboot -/sbin/rmmod -/sbin/rmmod.old -/sbin/shutdown -/usr/bin/strace -/sbin/route -/sbin/mkswap -/sbin/swapoff -/sbin/swapon -/sbin/tune2fs -/sbin/update -/usr/bin/cmp -/usr/bin/cut -/usr/bin/eject -/usr/bin/fdformat -/usr/bin/file -/usr/bin/find -/usr/bin/ftp -/usr/bin/head -/usr/bin/hexedit -/usr/bin/less -/usr/bin/less.bin -/usr/bin/loadkeys -/usr/bin/reset -/usr/bin/split -/usr/bin/tail -/usr/bin/tee -/usr/bin/telnet -/usr/bin/tset -/usr/sbin/chroot -/usr/sbin/parted -/usr/sbin/partimage -/usr/share/misc/file/magic -/usr/share/terminfo/l/linux -/var/run/utmp -/sbin/killall5 -/usr/bin/perl -/usr/bin/perl5 -/usr/bin/perlPERL_VERSION -/bin/sort -/usr/bin/md5sum -/etc/protocols -/etc/services -/bin/rpm -/sbin/mdadm -/sbin/lvm2 -/usr/lib/rpm/rpmrc -/usr/lib/rpm/macros -/usr/lib/rpm/rpmpopt-* -/usr/bin/rpm2cpio -/usr/bin/rpmdb -/usr/lib/rpm/rpmd -/usr/bin/rpme -/usr/lib/rpm/rpme -/usr/bin/rpmi -/usr/lib/rpm/rpmi -/usr/bin/rpmu -/usr/lib/rpm/rpmu -/usr/bin/rpmquery -/usr/lib/rpm/rpmq -/usr/bin/rpmverify -/usr/lib/rpm/rpmv -/usr/lib/perl5/PERL_VERSION/AutoLoader.pm -/usr/lib/perl5/PERL_VERSION/strict.pm -/usr/lib/perl5/PERL_VERSION/vars.pm -/usr/lib/perl5/PERL_VERSION/warnings/register.pm -/usr/lib/perl5/PERL_VERSION/warnings.pm -/usr/lib/perl5/PERL_VERSION/Carp.pm -/usr/lib/perl5/PERL_VERSION/Exporter.pm -/usr/lib/perl5/PERL_VERSION/*-linux/CORE/libperl.so -/usr/lib/perl5/PERL_VERSION/*-linux/auto/POSIX/autosplit.ix -/usr/lib/perl5/PERL_VERSION/*-linux/auto/POSIX/load_imports.al -/usr/lib/perl5/PERL_VERSION/*-linux/auto/POSIX/POSIX.so -/usr/lib/perl5/PERL_VERSION/*-linux/POSIX.pm -/usr/lib/perl5/PERL_VERSION/*-linux/XSLoader.pm -/usr/lib/perl5/vendor_perl/*/packdrake.pm -/usr/lib/perl5/vendor_perl/*/Packdrakeng.pm -/usr/bin/lspci -/usr/share/pci.ids -/usr/bin/lspcidrake -/usr/share/ldetect-lst/pcitable -/usr/share/ldetect-lst/usbtable -/bin/vim-minimal -/LIB/libnss_dns.so.2 -/LIB/libresolv.so.2 -/LIB/ld-linux*.so.2 -/bin/mt -/sbin/stinit -/usr/bin/rsync -/usr/bin/ssh -/usr/bin/scp -/etc/ssh/ssh_config diff --git a/rescue/list.alpha b/rescue/list.alpha deleted file mode 100644 index af48e87a9..000000000 --- a/rescue/list.alpha +++ /dev/null @@ -1 +0,0 @@ -/sbin/sfdisk diff --git a/rescue/list.i386 b/rescue/list.i386 deleted file mode 100644 index 2ede95622..000000000 --- a/rescue/list.i386 +++ /dev/null @@ -1,15 +0,0 @@ -/usr/bin/gpart -/sbin/resize2fs -/sbin/resize_reiserfs -/sbin/rescuept -/usr/sbin/grub -/usr/sbin/grub-install -/usr/sbin/dmidecode -/sbin/reiserfsck -/sbin/fsck.jfs -/sbin/fsck.xfs -/sbin/xfs_repair -/sbin/sfdisk -/boot/grub/stage[12] -/usr/lib/extipl/aldebaran.bin -/usr/sbin/ntfsresize diff --git a/rescue/list.ia64 b/rescue/list.ia64 deleted file mode 100644 index 42bb9b75b..000000000 --- a/rescue/list.ia64 +++ /dev/null @@ -1,7 +0,0 @@ -/sbin/resize2fs -/sbin/mkreiserfs -/sbin/reiserfsck -/usr/sbin/fsck.xfs -/usr/sbin/xfs_repair -/sbin/sfdisk -/usr/sbin/efibootmgr diff --git a/rescue/list.ppc b/rescue/list.ppc deleted file mode 100644 index f5709ca64..000000000 --- a/rescue/list.ppc +++ /dev/null @@ -1,13 +0,0 @@ -/sbin/resize2fs -/sbin/resize_reiserfs -/sbin/mkreiserfs -/sbin/reiserfsck -/sbin/xfs_repair -/sbin/pdisk -/usr/sbin/ybin -/usr/sbin/mkofboot -/usr/lib/yaboot/ofboot -/usr/lib/yaboot/yaboot -/usr/sbin/ofpath -/sbin/nvsetenv -/usr/bin/hformat diff --git a/rescue/list.sparc b/rescue/list.sparc deleted file mode 100644 index 2eff55cec..000000000 --- a/rescue/list.sparc +++ /dev/null @@ -1,2 +0,0 @@ -/sbin/silo -/sbin/sfdisk diff --git a/rescue/list.x86_64 b/rescue/list.x86_64 deleted file mode 100644 index 33e1153dd..000000000 --- a/rescue/list.x86_64 +++ /dev/null @@ -1,18 +0,0 @@ -/usr/bin/gpart -/sbin/resize2fs -/sbin/resize_reiserfs -/sbin/rescuept -/usr/sbin/grub -/usr/sbin/grub-install -/sbin/mkreiserfs -/sbin/reiserfsck -/sbin/fsck.xfs -/sbin/xfs_repair -/sbin/sfdisk -/boot/grub/stage[12] -/lib/libnss_files-* -/lib/libnss_files.so.2 -/lib/libnss_dns.so.2 -/lib/libresolv.so.2 -/lib/ld-linux*.so.2 -/lib/libdevmapper.so.* diff --git a/rescue/list.xml b/rescue/list.xml new file mode 100644 index 000000000..c9c5bcf66 --- /dev/null +++ b/rescue/list.xml @@ -0,0 +1,233 @@ + + + + bash sh + + false true + pwd reset + + ls + cp ln mkdir mknod mv rm rmdir + chmod chown + dd touch + + cat less + tail head tee + sort split cut + grep + + cmp diff + find + file md5sum + + gzip + bzip2 bunzip2 bzcat + + df du + + packdrake parsehdlist + cpio ftp tar + rsync + ssh scp + telnet + + date + dmesg + chroot + sleep + sync update + + eject + mount umount + + ldconfig + mingetty init + reboot halt shutdown + kill killall5 ps strace + + loadkeys tset + + ping hostname ifconfig route + + fdformat badblocks + e2fsck fsck.ext2 fsck.ext3 mkfs.ext2 resize2fs + debugfs tune2fs + fsck.xfs xfs_repair + resize_reiserfs reiserfsck + mkswap swapoff swapon + + fsck.jfs + + + ntfsresize + mkdosfs + + + hformat + + + + fdisk gpart sfdisk + rescuept + + + pdisk + + parted partimage + + mdadm lvm2 + + dmraid + + + lsmod-25 + insmod-25 + rmmod-25 + + setserial + mt stinit + + lspci lspcidrake + + rpm + rpm2cpio rpmdb + rpme rpmi rpmu rpmquery rpmverify + + vim-minimal hexedit + + perl + + + dmidecode + + + + grub grub-install + + + efibootmgr + + + ybin + mkofboot ofpath + nvsetenv + + + silo + + + + + /usr/lib/kbd/keymaps/include + + /usr/lib/kbd/keymaps/i386/include + /usr/lib/kbd/keymaps/i386/azerty/be-latin1.kmap.gz + + /usr/share/misc/file/magic + /usr/share/terminfo/l/linux + /usr/share/pci.ids + /var/run/utmp + + + /boot/grub/stage1 + /boot/grub/stage2 + /usr/lib/extipl/aldebaran.bin + + + + /usr/lib/yaboot/ofboot + /usr/lib/yaboot/yaboot + + + + perl -Mkeyboard -I../perl-install -le 'print foreach keyboard::loadkeys_files()' + + + + + + rpmrc + macros + rpmpopt-* + rpmd rpme rpmi rpmu rpmq rpmv + + + + + + AutoLoader.pm + strict.pm + vars.pm + warnings/register.pm + warnings.pm + Carp.pm + Exporter.pm + ARCH-linux/CORE/libperl.so + ARCH-linux/auto/POSIX/autosplit.ix + ARCH-linux/auto/POSIX/load_imports.al + ARCH-linux/auto/POSIX/POSIX.so + ARCH-linux/POSIX.pm + ARCH-linux/XSLoader.pm + + + + packdrake.pm + Packdrakeng.pm + + + + + inputrc + termcap + protocols + services + ssh/ssh_config + + + + + libnss_files.so.2 + libnss_dns.so.2 + libresolv.so.2 + ld-linux*.so.2 + + + + + + *table + + + + + + modules.cz + modules.dep + + + + + + + rescue-doc drvinst lsparts + guessmounts install_bootloader + + restore_ms_boot + + + + partimage_whole_disk + + + + + + + rescue-gui + + + dhcp-client + + + + diff --git a/rescue/make_rescue_img b/rescue/make_rescue_img index bf9e9c1d7..b350218ca 100755 --- a/rescue/make_rescue_img +++ b/rescue/make_rescue_img @@ -18,27 +18,6 @@ BEGIN { undef *_ } sub __ { print @_, "\n"; system(@_) } sub _ { __ @_; $? and die } -sub install_raw { - s|^/|| foreach @_; - _ "tar c -C / @_ | tar x -C $tmp" if @_; -} -sub install_deref { - s|^/|| foreach @_; - _ "tar c -C / --dereference @_ | tar x -C $tmp" if @_; -} - -sub install_l { - my @l = @_; - - @l = uniq(map { chomp_($_) } @l); - push @l, - `ldd @l 2>/dev/null | grep "=>" | perl -pe 's/.*=> //; s/ .*//; s,^/(lib|lib64)/.*?/,/\\1/,'`; - - my ($deref, $raw) = partition { /lib.*\.so/ || readlink("/$_") =~ m|/etc/alternatives| } uniq(map { chomp_($_) } @l); - install_raw(@$raw); - install_deref(@$deref); -} - sub installown($$) { my ($own, $dir) = @_; return if -e "$tmp$dir/" . basename($own); @@ -62,16 +41,21 @@ sub install_perl_script { _ "$sudo rm -rf $tmp" if -e $tmp; _ "mkdir $tmp"; _ 'find . -name "*~" | xargs rm -f'; -foreach (cat_("dirs")) { - chomp; - mkdir_p("$tmp$_"); -} +mkdir_p($tmp . chomp_($_)) foreach cat_("dirs"); _ "cp -a tree/* $tmp"; _ "find $tmp -name 'CVS*' | xargs rm -rf"; _ "perl devices.pl $tmp/dev"; substInFile { s/DISTRIB_DESCR/$ENV{DISTRIB_DESCR}/ } "$tmp/etc/issue"; -install_raw(keyboard::loadkeys_files()); +{ + _ "cd ../mdk-stage1 && make rescue-gui dhcp-client"; + -e "../kernel/all.kernels" or die "use ./update_kernel in gi/kernel first\n"; + + $ENV{MAIN_KERNEL} = chomp_(`cat ../kernel/all.kernels/.main`); + + _ "../tools/install-xml-file-list list.xml $tmp"; +} + my %keytable_conflicts; my @less_important_keytables = qw(am_old am_phonetic no-dvorak fr_CH-latin1); foreach (keyboard::loadkeys_files()) { @@ -86,49 +70,13 @@ foreach (keyboard::loadkeys_files()) { } } -my $perl_version = join ".", unpack "C3", $^V; -my @bad; -my @files = map { - chomp; - s/PERL_VERSION/$perl_version/g; - s|/LIB/|/$lib/|g; - my @l = glob($_) or push @bad, $_; - m|\*.*/| && @l != 1 and die "multiple match for $_\n"; - @l; -} (cat_("list"), cat_(`../tools/specific_arch list`)); -@bad and die "files missing\n" . join("\n", @bad) . "\n"; -install_l(@files); - foreach (cat_("aliases")) { chomp; my ($f, $dest) = split; symlink $dest, "$tmp$f"; } --e "../kernel/all.kernels" or die "use ./update_kernel in gi/kernel first\n"; - -my $main = chomp_(`cat ../kernel/all.kernels/.main`); - -_ "cp ../kernel/all.kernels/$main/modules.{cz,dep} $tmp/modules"; - -installown("drvinst", "/usr/bin"); -install_perl_script("guessmounts", "/usr/bin"); -install_perl_script("install_bootloader", "/usr/bin"); -if (arch() =~ /^i.86|x86_64/) { - install_perl_script("restore_ms_boot", "/usr/bin"); -} -install_perl_script("lsparts", "/usr/bin"); -installown("rescue-doc", "/usr/bin"); -_ "cd ../mdk-stage1 && make rescue-gui dhcp-client"; -installown("../mdk-stage1/rescue-gui", "/usr/bin"); -installown("../mdk-stage1/dhcp-client", "/usr/sbin"); - -#- note that on biarch systems, we may need to have both /lib and /lib64 -__ "strip $tmp/{lib,$lib,bin,sbin}/* $tmp/usr/{bin,sbin}/* 2>/dev/null"; - if ($ENV{PARTIMAGE_RPM}) { - install_perl_script('partimage_whole_disk', '/usr/sbin'); - _ "rpm2cpio $ENV{PARTIMAGE_RPM} | (cd $tmp ; cpio -idu ./usr/sbin/partimage)"; my $server = 'partimaged'; $server = 'leia'; @@ -159,7 +107,9 @@ EOF } "$tmp/etc/rc.sysinit"; } +_ "$sudo chown root.root -R $tmp/*"; + exit 0 if $ARGV[0]; _ "mkisofs -quiet -D -R $tmp | create_compressed_fs - 65536 $rescue 200 2>/dev/null"; -_ "$sudo rm -rf $tmp"; +#_ "$sudo rm -rf $tmp"; -- cgit v1.2.1