aboutsummaryrefslogtreecommitdiffstats
path: root/BCD
diff options
context:
space:
mode:
authorMageia SVN-Git Migration <svn-git-migration@mageia.org>2011-10-29 13:51:03 +0100
committerMageia SVN-Git Migration <svn-git-migration@mageia.org>2011-10-29 13:51:03 +0100
commitdf535a121225f56f65396b80150e7622fea6b9ae (patch)
tree0e456898ddddad7c0b26f8aab4b0ffba1d63b575 /BCD
parente653ea2e7bba20f2891c6b91c96ecfd8b3925324 (diff)
downloadbcd-df535a121225f56f65396b80150e7622fea6b9ae.tar
bcd-df535a121225f56f65396b80150e7622fea6b9ae.tar.gz
bcd-df535a121225f56f65396b80150e7622fea6b9ae.tar.bz2
bcd-df535a121225f56f65396b80150e7622fea6b9ae.tar.xz
bcd-df535a121225f56f65396b80150e7622fea6b9ae.zip
Synthesized commit during git-svn import combining previous Mandriva history with Magiea.
This commit consitsts of the following subversion commits: ------------------------------------------------------------------------ r2105 | ennael | 2011-10-29 13:51:03 +0100 (Sat, 29 Oct 2011) | 2 lines import bcd files for trunk (Mageia 2 alpha 1) ------------------------------------------------------------------------
Diffstat (limited to 'BCD')
-rw-r--r--BCD/Common.pm3
-rw-r--r--BCD/Genisoimage.pm4
-rw-r--r--BCD/Isolinux.pm24
-rw-r--r--BCD/Media.pm47
-rw-r--r--BCD/Web.pm2
5 files changed, 34 insertions, 46 deletions
diff --git a/BCD/Common.pm b/BCD/Common.pm
index 126c207..90cfceb 100644
--- a/BCD/Common.pm
+++ b/BCD/Common.pm
@@ -57,8 +57,7 @@ $version or print_color("You must define the <mediainfo><version>", $color) and
$repo or print_color("You must define the <repo><path> tag",$color) and exit 1;
$based_on or print_color("You must define the <based_on> tag",$color) and exit 1;
$isoconf->{chroot_media} or print_color("Now you must define <chroot_media> in the conf.xml file",$color) and exit 1;
-$isoconf->{chroot_media_exclude} or print_color("Now you must define <chroot_media_exclude> in the conf.xml file",$color) and exit 1;
-
+$isoconf->{chroot_media_exclude} or print_color("Now you must define <chroot_media_exclude> in the conf.xml file",$color) and exit 1;
# password file
#"/home/plop/.signature.gpg";
diff --git a/BCD/Genisoimage.pm b/BCD/Genisoimage.pm
index 96d5b6e..2f031d7 100644
--- a/BCD/Genisoimage.pm
+++ b/BCD/Genisoimage.pm
@@ -106,7 +106,7 @@ sub create_md5 {
sub isohybrid {
print_color("$LOG isohybrid the ISO", $color);
my $ISOFILE = "$isodir/$isoname.iso";
- system("isohybrid -fatfirst $ISOFILE") == 0 or die "$LOG system isohybrid failed: $?\n";
+ #system("isohybrid $iso->{options}{isohybrid} $ISOFILE") == 0 or die "$LOG system isohybrid failed: $?\n";
}
sub copy_textfiles {
@@ -124,7 +124,7 @@ sub main_iso {
print_color("$LOG skipping ISO creation", $color);
} else {
create_iso;
- isohybrid;
+# isohybrid;
create_md5;
}
diff --git a/BCD/Isolinux.pm b/BCD/Isolinux.pm
index 6b0d8df..0f17dd1 100644
--- a/BCD/Isolinux.pm
+++ b/BCD/Isolinux.pm
@@ -20,30 +20,6 @@ my $build_isolinux_dir = "$builddir/isolinux";
sub switch_theme {
my $theme = $isoconf->{theme}{bootsplash};
print_color("$LOG switch to theme $theme", $color);
- -d "$isoconf->{theme}{bootsplash_path}/themes/$theme" or die "$LOG cant find the gfxboot theme: $isoconf->{theme}{bootsplash_path}/themes/$theme";
- opendir my $DIR, $build_isolinux_dir or die "$LOG FATAL switch_theme: unable to open $build_isolinux_dir\n";
- foreach my $f (readdir $DIR) {
- $f =~ /^\.{1,2}$/ and next;
- -d "$build_isolinux_dir/$f" or next;
- opendir my $ALT, "$build_isolinux_dir/$f" or die "LOG FATAL switch_theme: unable to open $dir/$f\n";
- foreach my $all (readdir $ALT) {
- $all =~ /all.rdz/ or next;
- my $initrd = "$build_isolinux_dir/$f/$all";
- my $binary = "/usr/share/bootsplash/scripts/make-boot-splash-raw";
- -x $binary or die "$LOG you need $binary which is available in bootsplash >= 3.2.3\n";
- my $cmd;
- if ($isoconf->{based_on} gt "2009.1" && $isoconf->{based_on} ne "mes5") {
- $cmd = "$binary $initrd $theme";
- } else {
- # old script use a resolution parameter
- $cmd = "$binary $initrd 800x600 $theme";
- }
- print_color("$LOG using $f", $color);
- system($cmd) == 0 or die "$LOG FATAL switch_theme: config file for $theme may not exist\n";
- }
- closedir $ALT;
- }
- closedir $DIR;
# syslinux
my $lilo_sys = "$isoconf->{theme}{bootsplash_path}/themes/$theme/lilo/syslinux";
-f $lilo_sys and system("cp -vf $lilo_sys", "$build_isolinux_dir/boot.msg");
diff --git a/BCD/Media.pm b/BCD/Media.pm
index ed7b7c1..9f603b4 100644
--- a/BCD/Media.pm
+++ b/BCD/Media.pm
@@ -108,7 +108,7 @@ sub use_gendistrib {
print_color("$LOG < 2009.1 or mes5 detected", $color);
print_color("$LOG move hdlists and synthesys from $builddir/media/$destmedia/media_info to $builddir/media/media_info/", $color);
system("rm -vf $builddir/media/media_info/*_$media->{name}.cz");
-# system("rm -vf $builddir/media/media_info/*_main.cz");
+ system("rm -vf $builddir/media/media_info/*_main.cz");
system("rm -vf $builddir/media/media_info/pubkey_$media->{name}");
system("cp -avf $builddir/media/$destmedia/media_info/hdlist.cz $builddir/media/media_info/hdlist_$media->{name}.cz");
system("cp -avf $builddir/media/$destmedia/media_info/pubkey $builddir/media/media_info/pubkey_$media->{name}");
@@ -248,15 +248,31 @@ sub mini_chroot {
# it is usefull to use a mini chroot for add remove media, we have to keep the list of installed packages to copy them on ISO
print_color("$LOG create a mini chroot to run urpmi", $color);
# store all file needed to be installed on the system
- my $cmd = "LC_ALL=C sudo urpmi --quiet --no-suggests --auto --no-verify-rpm --use-distrib $repo/$based_on/$arch --urpmi-root $chroot_path";
+ my $cmd = "LC_ALL=C sudo urpmi --quiet --no-suggests --auto --no-verify-rpm --use-distrib $repo/$based_on/$arch --urpmi-root $chroot_path --media '$isoconf->{chroot_media}' --excludemedia '$isoconf->{chroot_media_exclude}'";
# sudo urpmi --no-verify-rpm --auto --urpmi-root /tmp/mk --use-distrib /mnt/BIG/dis/2009.0/i586/ basesystem-minimal urpmi --test
#
- system("LC_ALL=C sudo urpmi --test --no-suggests --auto --no-verify-rpm --use-distrib $repo/$based_on/$arch --urpmi-root /tmp/$isoconf->{nameid}-$version-$isoconf->{arch} --media '$isoconf->{chroot_media}' --excludemedia '$isoconf->{chroot_media_exclude}' urpmi basesystem-minimal bash basesystem > $chroot_path/$isoconf->{tocopy_file}_TODO_chroot");
+#J print_color("---DEBUG INSTALLABLE_START $LOG test if the chroot is installable\n LC_ALL=C sudo urpmi --test --no-suggests --auto --no-verify-rpm --use-distrib $repo/$based_on/$arch --urpmi-root /tmp/$isoconf->{nameid}-$version-$isoconf->{arch} --media 'Main,Main Updates' --excludemedia 'Main Testing,Main Backports' urpmi basesystem-minimal bash basesystem > $chroot_path/$isoconf->{tocopy_file}_TODO_chroot", $color);
+ system("LC_ALL=C sudo urpmi --test --no-suggests --auto --no-verify-rpm --use-distrib $repo/$based_on/$arch --urpmi-root /tmp/$isoconf->{nameid}-$version-$isoconf->{arch} --media 'Main,Main Updates' --excludemedia 'Main Testing,Main Backports' urpmi basesystem-minimal bash basesystem > $chroot_path/$isoconf->{tocopy_file}_TODO_chroot");
+# print_color("---DEBUG INSTALLABLE_STOP the TEST");
# install all those file to be able to use urpmi.XXXXXX
- system("LC_ALL=C $cmd --prefer $DISTRIB,$THEME urpmi bash");
+# print_color("---DEBUG INSTALL_CHROOT_START now create the chroot:\n $cmd --prefer $DISTRIB,$THEME urpmi bash", $color);
+ system("$cmd --prefer $DISTRIB,$THEME urpmi bash");
+# print_color("---DEBUG INSTALL_CHROOT_STOP", $color);
+ if (! -e "$chroot_path/bin/mkdir") {
+ print_color("$LOG ERROR, mkdir is not available in $chroot_path", $color);
+ exit 1;
+ }
system("sudo chroot $chroot_path mkdir -p $distrib_path");
system("sudo mount -o bind $repo/$based_on/$arch $chroot_path/$distrib_path -o ro");
push @to_umount, $distrib_path;
+ print_color("$LOG Add a profile info", $color);
+ my $INFOFILE = "$chroot_path/etc/profile.d/99info.sh";
+ open my $INFO, ">$INFOFILE";
+ print $INFO "#!/bin/sh\n";
+ print $INFO "DIS=`cat /etc/product.id`\n";
+ print $INFO "export PS1=\"\\n\$DIS\\n [ CHROOT BY BCD \\u@\\h \\W]\$ \"";
+ close $INFO;
+ system("chmod 755 $INFOFILE");
system("sudo chroot $chroot_path urpmi.removemedia -a");
foreach my $media (@{$isoconf->{media}{list}}) {
$media->{name} or next;
@@ -272,9 +288,6 @@ sub mini_chroot {
system("sudo chroot $chroot_path urpmi.addmedia --probe-synthesis '$media->{name} Testing' $distrib_path/media/$media->{mediadir}/testing");
}
}
-# } else {
-# system("sudo chroot $chroot_path urpmi.addmedia --distrib $distrib_path --no-md5sum");
-# }
}
sub add_media {
@@ -418,7 +431,7 @@ sub create_list {
if ($media->{updates} eq "yes") {
$extra_media = "--media \"$isoconf->{media}{first_media} $isoconf->{media}{update_prefix},$extra2,$media_supp,$media->{name},$media->{name} $isoconf->{media}{update_prefix}\"";
} else {
- $extra_media = "--media \"$isoconf->{media}{first_media},$extra2,$media_supp,$media->{name}\"";
+ $extra_media = "--media \"$isoconf->{media}{first_media},$extra2,$media_supp,$media->{name}\"";
}
}
@@ -453,15 +466,15 @@ sub create_list {
###
# do the job with update, find missing package from list
# only if the media as udpate option enable
-## if ($media->{updates} eq "yes") {
-## my $cmd_find_missing_update = "LC_ALL=C sudo chroot $chroot_path urpmq --update --prefer $DISTRIB,$THEME $urpmq_options $urpmq_extra_opt $tested_wanted $tested_exclude 2> $urpmq_error_update";
-## print_color("$LOG first attempt to run urpmq --update on media $media->{name} (to find all packages not availables in update)", $color);
-## system($cmd_find_missing_update);
-## # urpmq error found, so we have to remove some entry in the list of wanted packages
-## my $final_list_update = remove_notpresent($urpmq_error_update, $wanted);
-## my $cmd_do_it_update = "LC_ALL=C sudo -P chroot $chroot_path urpmq --update -a --prefer $DISTRIB,$THEME $urpmq_options $urpmq_extra_opt $tested_exclude";
-## do_fork($final_list_update, "$list_filename" . "_update", $list_update, $cmd_do_it_update);
-## }
+ if ($media->{updates} eq "yes") {
+ my $cmd_find_missing_update = "LC_ALL=C sudo chroot $chroot_path urpmq --update --prefer $DISTRIB,$THEME $urpmq_options $urpmq_extra_opt $tested_wanted $tested_exclude 2> $urpmq_error_update";
+ print_color("$LOG first attempt to run urpmq --update on media $media->{name} (to find all packages not availables in update)", $color);
+ system($cmd_find_missing_update);
+ # urpmq error found, so we have to remove some entry in the list of wanted packages
+ my $final_list_update = remove_notpresent($urpmq_error_update, $wanted);
+ my $cmd_do_it_update = "LC_ALL=C sudo -P chroot $chroot_path urpmq --update -a --prefer $DISTRIB,$THEME $urpmq_options $urpmq_extra_opt $tested_exclude";
+ do_fork($final_list_update, "$list_filename" . "_update", $list_update, $cmd_do_it_update);
+ }
###
# select rpm from all media, find missing from list
diff --git a/BCD/Web.pm b/BCD/Web.pm
index 70cf501..bf0aff5 100644
--- a/BCD/Web.pm
+++ b/BCD/Web.pm
@@ -101,7 +101,7 @@ h3 {
<BODY>
";
print $B "<ul>\n";
- print $B "<li>Date of the synchronisation to the cooker repository: <b>$date_repo</b></li>\n";
+ print $B "<li>Date of the synchronisation to the cauldron repository: <b>$date_repo</b></li>\n";
print $B "<li>Configuration file used: <a href='$conf_file'>$conf_file</a></li>\n";
print $B "<li>Architecture: <b>$arch</b></li>\n";
print $B "<li>Distribution based on: <b>$based_on</b></li>\n";