From 29e9e7320213028530070e5407c87c27e7c86664 Mon Sep 17 00:00:00 2001 From: freesource Date: Wed, 11 Dec 2002 06:53:24 +0000 Subject: [PATCH] This allows adds the kernel option for UML in expect_uml, it's amazing what you find when you remove the system package. Getting closer. --- BootRoot/BootRoot.pm | 9 ++++++--- BootRoot/Yard.pm | 3 ++- expect_uml | 12 +++++++----- gbootroot | 6 +++--- gbootroot_pkg | 14 ++++++++++++++ 5 files changed, 32 insertions(+), 12 deletions(-) diff --git a/BootRoot/BootRoot.pm b/BootRoot/BootRoot.pm index 4c24fd6..6db85b6 100644 --- a/BootRoot/BootRoot.pm +++ b/BootRoot/BootRoot.pm @@ -68,7 +68,10 @@ my $version = "1.4.0"; my $date = "11.19.2002"; my $gtk_perl_version = "0.7002"; my $home_rootfs = "$home/root_filesystem/"; -my $home_uml_kernel = "$home/uml_kernel/"; +my $home_uml_kernel; +$option{gui_mode} ? ($home_uml_kernel = "$home/user-mode-linux/usr/bin/") + : ($home_uml_kernel = "$home/uml_kernel/"); +$option{"uml-kernel"} = $home_uml_kernel . "linux" if !$option{"uml-kernel"}; my $modules_directory = "/lib/modules"; my $Initrd; $option{gui_mode} ? @@ -843,8 +846,8 @@ else { # Let's read in the ARGV - die "specify a template found in $template_dir\nuse --template\n" - if !$option{template}; +### die "specify a template found in $template_dir\nuse --template\n" +### if !$option{template}; start_logging_output($verbosefn,$verbosity); # Yard "tmp dir name" diff --git a/BootRoot/Yard.pm b/BootRoot/Yard.pm index 3950209..698481b 100644 --- a/BootRoot/Yard.pm +++ b/BootRoot/Yard.pm @@ -1550,7 +1550,8 @@ sub create_expect_uml { my $x_count = 1; my $command_line = "$expect_program $ubd0 $ubd1 $options " . - "$mount_point $preserve_ownership $filesystem"; + "$mount_point $preserve_ownership " . + $option{"uml-kernel"} . " $filesystem"; info(0,"\nUsing helper root_fs to $fs_type the filesystem:\n\n"); info(0,"$command_line\n\n"); diff --git a/expect_uml b/expect_uml index d27df8a..27b07f3 100755 --- a/expect_uml +++ b/expect_uml @@ -58,12 +58,13 @@ if ( !$ARGV[0] ) { my $arguments = "$ARGV[0] $ARGV[1] $ARGV[2]"; my $mount_point = "$ARGV[3]"; my $preserve_ownership = "$ARGV[4]"; +my $uml_kernel = "$ARGV[5]"; -my $end = 6; +my $end = 7; my $filesystem; -for ( 5 .. $#ARGV ) { - if ( $_ == 5 ) { - $filesystem = "$ARGV[5]"; +for ( 6 .. $#ARGV ) { + if ( $_ == 6 ) { + $filesystem = "$ARGV[6]"; # What to do with the rieserfs command if ( $filesystem eq "mkreiserfs" ) { $filesystem = $filesystem . " -f -f -q"; @@ -82,6 +83,7 @@ for ( 5 .. $#ARGV ) { my $uml = BootRoot::UML->new( login_prompt => "bootroot login: ", + kernel => $uml_kernel, arguments => $arguments, login => "root", password_prompt => "Password: ", @@ -153,4 +155,4 @@ elsif ( $filesystem =~ /^mkfs\.jffs/ ) { } $uml->command("umount /mnt1; umount /mnt2"); -$uml->halt(); +$uml->halt() diff --git a/gbootroot b/gbootroot index 0f8a86f..5e515e8 100755 --- a/gbootroot +++ b/gbootroot @@ -250,8 +250,8 @@ BEGIN { } - - if ( !%option || $option{gui_mode}) { + + if ( !%option || $option{gui_mode} ) { if ( !$::commandline ) { use Gtk; @@ -262,7 +262,6 @@ BEGIN { } - } @@ -284,3 +283,4 @@ if ( !%option || $option{gui_mode} ) { } } + diff --git a/gbootroot_pkg b/gbootroot_pkg index 0510575..cf9d0ba 100755 --- a/gbootroot_pkg +++ b/gbootroot_pkg @@ -53,6 +53,7 @@ my $urgency = "low"; #my $priority = "optional"; my $gbootroot_cvs = "$user_home/gbootroot/gbootroot"; my $packaging_place = "$user_home/gbootroot/PACKAGING"; +my $packaging_place_orig = $packaging_place; my $packaging_defaults = "$gbootroot_cvs/pkg/dpkg"; my $email = "freesource\@users.sourceforge.net"; my $name = "Jonathan Rosenbaum"; @@ -146,6 +147,9 @@ foreach (@make_lines) { # Stuff not in the Makefile system "cp -fa $makefile $packaging_place/Makefile"; + +# Basically this is stuff we want in the source package, but not the normal +# package system "cp -fa README $packaging_place/README"; system "cp -fa user-mode-linux/usr/lib/uml/cramfs-vfs-order.patch $packaging_place/user-mode-linux/usr/lib/uml/cramfs-vfs-order.patch"; @@ -171,6 +175,16 @@ if (-d $packaging_place) { } , $packaging_place ; } +# At this point we should make a normal tar.gz source package. This is +# a necessary step for packagers who don't want a pre-conditioned package, +# however there will be sections of the Makefile set-up for my own +# personal automation used by this program. + +my $pristine_source_package = "$packaging_place_orig/$prog-$version" . +".tar.gz"; +print "$pristine_source_package $packaging_place\n"; +system "tar cvfz $pristine_source_package $packaging_place"; +exit; # Now we to the dh_make thing, and setup the time, version, and defaults.