aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine Ginies <aginies@mandriva.com>2010-10-06 07:58:18 +0000
committerAntoine Ginies <aginies@mandriva.com>2010-10-06 07:58:18 +0000
commitb364785ea90e60806aaaec56d15bcc70a74daf6d (patch)
treeda257e1277bd0218929f12fde2e318657067eb16
parent46324a3fd9b86040b16dc3070b3a22438f7a616d (diff)
downloadbcd-b364785ea90e60806aaaec56d15bcc70a74daf6d.tar
bcd-b364785ea90e60806aaaec56d15bcc70a74daf6d.tar.gz
bcd-b364785ea90e60806aaaec56d15bcc70a74daf6d.tar.bz2
bcd-b364785ea90e60806aaaec56d15bcc70a74daf6d.tar.xz
bcd-b364785ea90e60806aaaec56d15bcc70a74daf6d.zip
end of the move
-rw-r--r--BCD/Bcd.pm101
-rw-r--r--BCD/Common.pm126
-rw-r--r--BCD/Genisoimage.pm123
-rw-r--r--BCD/Isolinux.pm118
-rw-r--r--BCD/Media.pm1132
-rw-r--r--BCD/Resign.pm63
-rw-r--r--BCD/Stagex.pm88
-rw-r--r--BCD/Web.pm222
-rw-r--r--Makefile57
-rw-r--r--README90
-rwxr-xr-xbcd.pl9
-rw-r--r--bcd.xml185
-rwxr-xr-xcheck_sign_by_path.pl62
-rwxr-xr-xcompare_idx27
-rwxr-xr-xcreate_dual.sh107
-rw-r--r--doc/bcd.pod158
-rw-r--r--doc/conf.xml.pod268
-rw-r--r--doc/conf.xml.tex365
-rw-r--r--doc/howto_bcd.pdfbin0 -> 133558 bytes
-rw-r--r--doc/howto_bcd.tex594
-rw-r--r--doc/mandriva-logo.jpgbin0 -> 38289 bytes
-rw-r--r--dual.xml181
-rw-r--r--dual64.xml176
-rw-r--r--dvd_free32.xml191
-rw-r--r--dvd_free64.xml192
-rw-r--r--dvd_pwp32.xml238
-rw-r--r--dvd_pwp64.xml334
-rw-r--r--lists/basesystem_mini147
-rw-r--r--lists/dual_contrib2
-rw-r--r--lists/dual_contrib321
-rw-r--r--lists/exclude134
-rw-r--r--lists/exclude_contrib642
-rw-r--r--lists/exclude_contrib_pwp5
-rw-r--r--lists/exclude_free24
-rw-r--r--lists/exclude_main32_64biso7
-rw-r--r--lists/exclude_main_pwp45
-rw-r--r--lists/exclude_mini30
-rw-r--r--lists/exclude_mini321
-rw-r--r--lists/exclude_nonfree2
-rw-r--r--lists/exclude_tofix31
-rw-r--r--lists/extra-filter8
-rw-r--r--lists/input_cat125
-rw-r--r--lists/input_cat_pwp128
-rw-r--r--lists/input_contrib422
-rw-r--r--lists/input_contrib3211
-rw-r--r--lists/input_contrib32_extra12
-rw-r--r--lists/input_contrib_pwp374
-rw-r--r--lists/input_main230
-rw-r--r--lists/input_main325
-rw-r--r--lists/input_main64_ooo359
-rw-r--r--lists/input_main_ooo359
-rw-r--r--lists/input_nonfree131
-rw-r--r--lists/input_restricted41
-rw-r--r--lists/input_restricted325
-rw-r--r--lists/input_restricted645
-rw-r--r--lists/kernel323
-rw-r--r--lists/kernel32_contrib1
-rw-r--r--lists/kernel643
-rw-r--r--lists/kernel64_contrib1
-rw-r--r--lists/languages33
-rw-r--r--lists/main325
-rw-r--r--lists/theme-free7
-rw-r--r--lists/theme-pwp8
-rwxr-xr-xresign_rpm_by_path.pl41
64 files changed, 7355 insertions, 0 deletions
diff --git a/BCD/Bcd.pm b/BCD/Bcd.pm
new file mode 100644
index 0000000..98a68e1
--- /dev/null
+++ b/BCD/Bcd.pm
@@ -0,0 +1,101 @@
+package BCD::Bcd;
+
+use strict;
+use XML::Simple;
+use Data::Dumper;
+use Pod::Usage;
+use MDK::Common;
+
+use BCD::Resign;
+use BCD::Common qw(:DEFAULT $wd $isoconf $name $arch $version $isodir $builddir $error_color $dir_deps);
+use BCD::Genisoimage;
+use BCD::Isolinux;
+use BCD::Stagex;
+use BCD::Media;
+use BCD::Web;
+
+our @ISA = qw(Exporter);
+our @EXPORT = qw(main_bcd);
+our $conf_file;
+my $color = "cyan";
+
+sub print_info() {
+ print Dumper($isoconf);
+}
+
+sub help_bcd {
+ pod2usage('-verbose' => 2, '-input' => "bcd.pod", '-pathlist' => @INC);
+}
+
+sub do_all {
+ my ($option) = @_;
+ clean_all;
+ check_dir;
+ main_isolinux;
+ main_stagex;
+ main_media($option);
+ main_iso($option);
+ main_html;
+ show_info();
+}
+
+sub show_info {
+ print "\n";
+ print "ISO dir: $isodir\n";
+ print "build dir: $builddir\n";
+ print "LOG of media: /tmp/$name-$version-$arch\n";
+ print "stored URPMQ result: /var/lib/bcd/$name-$version-$arch\n";
+ print "\n";
+}
+
+sub main_bcd() {
+ my %opts = (
+ '' => \&help_bcd,
+ info => \&print_info,
+ iso => \&main_iso,
+ md5 => \&create_md5,
+ stagex => \&main_stagex,
+ isolinux => \&main_isolinux,
+ media => \&main_media,
+ gendistrib => \&use_gendistrib,
+ clean => \&clean_all,
+ list => \&list_media,
+ mediarepo => \&list_medias_available,
+ checkrepo => \&check_repo_hdlist,
+ rpmcheck => \&rpmcheck_launch,
+ doble => \&solve_doble_issue,
+ kernel => \&find_all_kernel,
+ resign => \&resign_media,
+ getsrpm => \&get_srpms_list,
+ clean => \&clean_urpmq_log,
+ html => \&main_html,
+ all => \&do_all,
+ );
+
+
+
+ if (! -d $dir_deps) {
+ print_color(" I will create $dir_deps to store all urpmq queries", $error_color);
+ print_color(" Please give full access RW to your current user to this directory", $color);
+ mkdir_p($dir_deps);
+ }
+ print_color("-- If you don't want to use previous urpmq query:\n ++ remove the directory $dir_deps\n ++ or remove the file wich contains the urpmq result for the package to redo an another one (ie: the file $dir_deps/tocopy_plop_todo_Main-drakconf)", $color);
+# $ARGV[0] or help_bcd;
+# -f $ARGV[0] or die "Cant acces to conf file $ARGV[0]\n";
+ if (my $f = $opts{$ARGV[1]}) {
+ if ($ARGV[2]) {
+ my $options;
+ foreach my $arg (2 .. $#ARGV) {
+ $arg and $options = $options . ' ' . $ARGV[$arg];
+ }
+ $f->($options);
+ } else {
+ $f->();
+ }
+ } else {
+ print_color(" ** Dont know what todo ** \n unknow option", $error_color);
+ }
+}
+
+
+1;
diff --git a/BCD/Common.pm b/BCD/Common.pm
new file mode 100644
index 0000000..df200b5
--- /dev/null
+++ b/BCD/Common.pm
@@ -0,0 +1,126 @@
+package BCD::Common;
+
+use strict;
+use XML::Simple;
+use MDK::Common;
+use Term::ANSIColor;
+use File::Copy::Recursive qw(dircopy pathrm);
+use File::Glob ':glob';
+
+use BCD::Bcd qw(:DEFAULT);
+
+our @ISA = qw(Exporter);
+our @EXPORT = qw(create_needed_dir check_dir clean_all print_color);
+# export all needed var
+our @EXPORT_OK = qw($isoconf $wd $name $arch $file $based_on $version $repo $isodir $builddir $distrib_path $error_color $DISTRIB $THEME $tmp_rpmsrate $NB_FORK $dir_deps @list_of_removed $rpmrc $pwd_file $conf_file $date);
+
+my $LOG="COMMON -";
+my $color = "red";
+
+our @list_of_removed;
+
+my ($sec,$min,$hour,$mday,$mon,$year,undef,undef,undef)= localtime(time);
+$year = $year + 1900; $mon = $mon + 1;
+our $date = $year . '_' . $mon . '_' . $mday . '-' . $hour . 'h' . $min . '-' . $sec;
+
+sub whereisthedoc {
+ print_color(" 'man bcd' and man 'conf.xml'\nREAD the full documentation in pdf format available in the /usr/share/doc/bcd dir",$color) and exit 1;
+}
+if (!$ARGV[0]) {
+ print_color(" First arg must be the XML file to use!", $color);
+ whereisthedoc;
+} elsif (!$ARGV[1]) {
+ print_color(" You must do an action ! actions are:", $color);
+ print_color("###\nstagex isolinux clean media gendistrib rpmcheck list mediarepo checkrepo all\nmd5 resign clean doble nodoble kernel info iso verbose\n###", $color);
+ whereisthedoc;
+}
+our $conf_file = $ARGV[0];
+our $isoconf = XMLin($conf_file, keyattr => ['']);
+
+our $DISTRIB = $isoconf->{theme}{name};
+our $THEME = $isoconf->{theme}{theme};
+our $name = $isoconf->{nameid};
+our $NB_FORK = $isoconf->{nb_fork};
+our $wd = $isoconf->{workdir}{path};
+our $arch = $isoconf->{arch};
+our $version = $isoconf->{mediainfo}{version};
+our $repo = $isoconf->{repo}{path};
+our $based_on = $isoconf->{based_on};
+
+$DISTRIB or print_color("You must define the <theme><name> tag",$color) and exit 1;
+$THEME or print_color("You must define the <theme><theme> tag",$color) and exit 1;
+$name or print_color("You must define the <namedid> tag",$color) and exit 1;
+$wd or print_color("You must define the <workdir><path> tag",$color) and exit 1;
+$arch or print_color("You must define the <arch> tag",$color) and exit 1;
+$NB_FORK or print_color("You must define the <nb_fork> tag",$color) and exit 1;
+$version or print_color("You must define the <mediainfo><version>", $color) and exit 1;
+$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;
+
+# password file
+#"/home/plop/.signature.gpg";
+our $pwd_file = $isoconf->{signature};
+#"/home/plop/.rpmrc";
+our $rpmrc = $isoconf->{rpmrc};
+
+# where to store urpmq queries results
+our $dir_deps = "/var/lib/bcd/$name-$version-$arch";
+our $builddir = "$wd/$isoconf->{iso}{genisoimage}{builddir}/$name-$version-$arch/$arch";
+our $isodir = "$wd/$isoconf->{iso}{genisoimage}{isodir}/$name-$version-$arch";
+# distrib path in chroot (mounted loop)
+our $distrib_path = "/tmp/distrib";
+our $tmp_rpmsrate = "/tmp/rpmsrate_$name-$version-$arch";
+our $error_color = "blue on_magenta";
+
+sub print_color {
+ my ($text, $color) = @_;
+ print color $color;
+ print "$text\n";
+ print color 'reset';
+
+}
+
+sub create_needed_dir {
+ my ($dir) = @_;
+ # create needed dir to create the build tree, and to store the ISO
+ if (! -d $dir) {
+ #mkdir $dir, 0755;
+ print_color("$LOG creation of $dir", $color);
+ mkdir_p($dir);
+ } else {
+ print_color("$LOG $dir already exist", $color);
+ }
+}
+
+sub check_dir {
+ create_needed_dir($builddir);
+ create_needed_dir("$builddir/$isoconf->{mediainfo}{mediainfo_dir}");
+ create_needed_dir($isodir);
+ create_needed_dir("/tmp/$isoconf->{nameid}-$version-$isoconf->{arch}");
+}
+
+sub clean_all {
+ my @l = glob("/tmp/$isoconf->{nameid}-$version-$isoconf->{arch}/$distrib_path/*");
+ foreach (@l) {
+ $_ or next;
+ if (-f "$_" || -d "$_") {
+ print_color("Distribution repositery already mounted exiting !\n Check /tmp/$isoconf->{nameid}-$version-$isoconf->{arch}/$distrib_path directory", $color);
+ print_color("sudo umount /tmp/$isoconf->{nameid}-$version-$isoconf->{arch}$distrib_path", $error_color);
+ foreach my $media (@{$isoconf->{media}{list}}) {
+ $media->{name} or next;
+ $media->{external}{name} and print_color("You should check also umount the external media /tmp/$isoconf->{nameid}-$version-$isoconf->{arch}/tmp/$media->{external}{name}\nsudo umount /tmp/$isoconf->{nameid}-$version-$isoconf->{arch}/tmp/$media->{external}{name}", $error_color);
+ }
+ print_color("WARNING: if you didnt umount repositery or external media you can erase them unless they are mounted bind in RO mode.", $color);
+ exit 1;
+ }
+ }
+ print_color("$LOG rmdir /tmp/$isoconf->{nameid}-$version-$isoconf->{arch}", $color);
+ system("sudo rm -rf /tmp/$isoconf->{nameid}-$version-$isoconf->{arch}");
+ print_color("$LOG rmdir $builddir", $color);
+ #pathrm("$wd/$isoconf->{iso}{genisoimage}{builddir}/$name/$arch") or die $!;
+ -d $builddir and system("rm -rf $builddir");
+ print_color("$LOG rmdir $isodir", $color);
+ #pathrm("$wd/$isoconf->{iso}{genisoimage}{isodir}/$name/$arch") or die $!;
+ -d $isodir and system("rm -rf $isodir");
+}
+1;
diff --git a/BCD/Genisoimage.pm b/BCD/Genisoimage.pm
new file mode 100644
index 0000000..7dba9b1
--- /dev/null
+++ b/BCD/Genisoimage.pm
@@ -0,0 +1,123 @@
+package BCD::Genisoimage;
+
+use strict;
+use XML::Simple;
+use BCD::Common qw(:DEFAULT $isoconf $wd $name $arch $version $builddir $isodir $error_color $repo $based_on);
+
+our @ISA = qw(Exporter);
+our @EXPORT = qw(main_iso);
+our @EXPORT_OK = qw($isoname);
+
+my $LOG="GENISOIMAGE -";
+my $color = "green";
+
+# mandriva-linux-free-2009.1-i586
+our $isoname = $isoconf->{nameid} . '-' . $isoconf->{mediainfo}{version} . '-' . $isoconf->{arch};
+
+# genisoimage -f -sort /home/plop/tmp/build/2009.1/11.sort -r -J -hide-rr-moved -nobak -cache-inodes -A "Mandriva Linux - 2009 Spring (Free64)" -publisher "Mandriva" -sysid "Mandriva Linux" -p "Mandriva-Linux" -volset "Mandriva Linux - 2009 Spring (Free64) - DVD x86_64 [1/1]" -V "Free-20091-x86_64" -o /home/plop/iso/2009.1/11-2009.1.iso -b x86_64/isolinux/isolinux.bin -c x86_64/isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table "/home/plop/build/2009.1/first/11" /home/plop/build/2009.1/11
+
+
+sub create_version {
+ # create the VERSION file available on the base of the ISO
+ my $version_file = "$builddir/VERSION";
+ print_color("$LOG create the $version_file file", $color);
+ open my $VERSION, ">$version_file";
+ my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = gmtime(time());
+ $year += 1900;
+ my $tag = $isoconf->{iso}{tag};
+ my $product = $isoconf->{iso}{product};
+ my $publisher = $isoconf->{iso}{header}{publisherid};
+ printf $VERSION "$publisher $name $tag %04d%02d%02d $hour:%02d\n", $year, $mon+1, $mday, $min;
+ close $VERSION;
+}
+
+sub create_productid {
+ # vendor=Mandriva,distribution=Mandriva Linux,type=basic,version=2009.1,branch=cooker,release=0.1,arch=i586,product=maratangua
+ print_color("$LOG create the $builddir/product.id", $color);
+ my $productid_file = "$builddir/product.id";
+ open my $product_id, ">$productid_file";
+ print $product_id "vendor=$isoconf->{iso}{header}{publisherid},";
+ print $product_id "distribution=$isoconf->{iso}{header}{systemid},";
+ print $product_id "type=$isoconf->{iso}{type},";
+ print $product_id "version=$isoconf->{based_on},";
+ print $product_id "branch=$isoconf->{iso}{branch},";
+ print $product_id "release=$isoconf->{iso}{minor}.$isoconf->{iso}{subversion},";
+ print $product_id "arch=$arch,";
+ print $product_id "product=$isoconf->{iso}{product}";
+ close $product_id;
+}
+
+sub create_idx {
+ print_color("$LOG create the IDX file from $builddir/pkg-$version-$isoconf->{iso}{tag}.idx", $color);
+ # pkg-2009.1-pauillac.idx
+ system("find $builddir -name \*.rpm | awk -F 'media/' {'print \"$isoconf->{iso}{header}{volumeid} \" \$2'} | sed -e 's/\.rpm\$//g' | sort > $builddir/pkg-$version-$isoconf->{iso}{tag}.idx");
+ system("cp -v $builddir/pkg-$version-$isoconf->{iso}{tag}.idx $isodir/$isoname.idx");
+}
+
+sub create_iso {
+ # build the ISO with all args
+ print_color("$LOG Building the ISO", $color);
+ my $cmd = "genisoimage $isoconf->{iso}{genisoimage}{options} \\
+-A '$isoconf->{iso}{header}{applicationid}' \\
+-publisher '$isoconf->{iso}{header}{publisherid}' \\
+-sysid '$isoconf->{iso}{header}{systemid}' \\
+-p '$isoconf->{iso}{header}{datapreparer}' \\
+-volset '$isoconf->{iso}{header}{volumesetid}' \\
+-V '$isoconf->{iso}{header}{volumeid}' \\
+-o '$isodir/$isoname.iso' \\
+-b $arch/isolinux/isolinux.bin \\
+-boot-info-table \\
+$builddir/../
+";
+#-quiet \\
+ print_color("\n------------\n $cmd", $color);
+ system($cmd);
+ system("du -h $isodir/$isoname.iso");
+ system("du -sh $builddir/install");
+
+}
+
+sub create_md5 {
+ # create the MD5 of the ISO
+ print_color("$LOG Create the MD5 and SHA1 of the ISO", $color);
+ my $ISOFILE = "$isodir/$isoname.iso";
+ if (! -f $ISOFILE) {
+ print_color("$LOG can't find $ISOFILE", $error_color);
+ exit 1;
+ } else {
+ print_color("$LOG do a: md5sum $ISOFILE > $ISOFILE.md5", $color);
+ system("cd $isodir && md5sum $isoname.iso > $ISOFILE.md5 &");
+ print_color("$LOG do a: sha1sum $ISOFILE > $ISOFILE.sha1", $color);
+ system("cd $isodir && sha1sum $isoname.iso > $ISOFILE.sha1 &");
+ }
+}
+
+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";
+}
+
+sub copy_textfiles {
+ map { system("cp -vf $repo/$based_on/$arch/$_ $builddir/");
+ } qw(COPYING INSTALL.txt install.htm LICENSE.txt LICENSE-APPS.txt README.txt index.htm release-notes.html release-notes.txt);
+}
+
+sub main_iso {
+ my ($option) = @_;
+ create_version;
+ create_productid;
+ copy_textfiles;
+ create_idx;
+ if ($option =~ /noiso/) {
+ print_color("$LOG skipping ISO creation", $color);
+ } else {
+ create_iso;
+ isohybrid;
+ create_md5;
+ }
+
+}
+
+1;
+
diff --git a/BCD/Isolinux.pm b/BCD/Isolinux.pm
new file mode 100644
index 0000000..41c3d97
--- /dev/null
+++ b/BCD/Isolinux.pm
@@ -0,0 +1,118 @@
+package BCD::Isolinux;
+
+use File::Copy::Recursive qw(dircopy pathrm);
+use BCD::Common qw(:DEFAULT $isoconf $wd $name $arch $version $based_on $repo $builddir);
+
+our @ISA = qw(Exporter);
+our @EXPORT = qw(main_isolinux);
+
+my $LOG="ISOLINUX -";
+my $color = "yellow";
+
+my $repo_isolinux;
+if (!defined($isoconf->{isolinux}{fullpath})) {
+ $repo_isolinux = "$repo/$based_on/$arch/$isoconf->{isolinux}{defaultpath}/";
+} else {
+ $repo_isolinux = $isoconf->{isolinux}{fullpath};
+}
+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") {
+ $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");
+ print_color("$LOG copy $isoconf->{theme}{gfxboot_path}/themes/*.jpg to $build_isolinux_dir/",, $color);
+ system("cp -vf $isoconf->{theme}{gfxboot_path}/themes/$theme/welcome.jpg $build_isolinux_dir/");
+ system("cp -vf $isoconf->{theme}{gfxboot_path}/themes/$theme/back.jpg $build_isolinux_dir/");
+}
+
+sub add_entry {
+ my $syslinuxcfg = "$build_isolinux_dir/isolinux.cfg";
+ -f $syslinuxcfg or die "$LOG can't path $syslinuxcfg";
+ foreach my $syslinux (@{$isoconf->{isolinux}{entry}}) {
+ $syslinux->{name} or next;
+ print_color("$LOG add $syslinux->{name} in $syslinuxcfg", $color);
+ open my $SYS, ">> $syslinuxcfg";
+ print $SYS "label $syslinux->{label}\n";
+ print $SYS " kernel $syslinux->{kernel}\n";
+ print $SYS " append $syslinux->{append}\n";
+ close $SYS;
+ if (-f $syslinux->{bin}) {
+ system("cp -vf $syslinux->{bin} $build_isolinux_dir/");
+ } else {
+ die "$LOG $syslinux->{bin} is not present on the system !\n";
+ }
+ }
+}
+
+sub use_firmware {
+ print_color("$LOG copy fw.gz to $build_isolinux_dir/alt0/", $color);
+ my $syslinuxcfg = "$build_isolinux_dir/isolinux.cfg";
+ open (IN, "+<$syslinuxcfg");
+ @file = <IN>;
+ seek IN,0,0;
+ foreach (@file){
+ $_ =~ s|alt0/all.rdz|alt0/all.rdz,alt0/fw.gz|g;
+ print IN $_;
+ }
+ close IN;
+ system("cp -v /usr/lib*/drakx-installer-images/isolinux/alt0/fw.gz $build_isolinux_dir/alt0/")
+}
+
+sub copy_files {
+ foreach my $file (@{$isoconf->{isolinux}{tocopy}}) {
+ $file->{name} or next;
+ if (-f $file->{file}) {
+ print_color("$LOG copy $file->{file} in $build_isolinux_dir", $color);
+ system("cp -avf $file->{file} $build_isolinux_dir/");
+ } else {
+ die "$LOG $file->{file} is not present on the system !\n";
+ }
+ }
+}
+
+sub main_isolinux {
+ if (! -d $repo_isolinux) {
+ print_color("$LOG I can't find the isolinux dir $repo_isolinux !", $color);
+ exit;
+ }
+ print_color("$LOG Remove old copy of isolinux", $color);
+ pathrm("$build_isolinux_dir/isolinux") or die $!;
+ print_color("$LOG copy $repo_isolinux to $build_isolinux_dir", $color);
+ dircopy($repo_isolinux, $build_isolinux_dir) or die $!;
+ add_entry;
+ if ($isoconf->{isolinux}{firmware} eq "yes") {
+ use_firmware;
+ }
+ copy_files;
+ switch_theme;
+}
+
+1;
+
diff --git a/BCD/Media.pm b/BCD/Media.pm
new file mode 100644
index 0000000..9499d44
--- /dev/null
+++ b/BCD/Media.pm
@@ -0,0 +1,1132 @@
+package BCD::Media;
+
+use File::Copy::Recursive qw(dircopy pathrm);
+use strict;
+use URPM;
+use File::Copy;
+use File::stat;
+use Data::Dumper;
+use MDK::Common;
+use File::Glob ':glob';
+use Parallel::ForkManager;
+
+use BCD::Common qw(:DEFAULT $isoconf $wd $name $arch $version $based_on $repo $builddir $distrib_path $error_color $DISTRIB $THEME $tmp_rpmsrate $NB_FORK $dir_deps @list_of_removed);
+
+our @ISA = qw(Exporter);
+our @EXPORT = qw(main_media list_media use_gendistrib list_medias_available check_repo_hdlist rpmcheck_launch solve_doble_issue clean_urpmq_log get_srpms_list find_all_kernel);
+our @EXPORT_OK = qw($rpmcheck_list_pkg $file_rpmcheck_log);
+
+my $verbose;
+my $LOG="MEDIA -";
+my $color = "magenta";
+
+# all mounted loop dir to umount
+my @to_umount;
+my @add_media;
+
+my $mediainfo_sourcedir;
+if (defined($isoconf->{mediainfo}{fullpath})) {
+ $mediainfo_sourcedir = $isoconf->{mediainfo}{fullpath};
+} else {
+ $mediainfo_sourcedir = "$repo/$based_on/$arch/$isoconf->{mediainfo}{mediainfo_dir}";
+}
+
+my $chroot_path = "/tmp/$isoconf->{nameid}-$version-$isoconf->{arch}";
+our $rpmcheck_list_pkg = "/tmp/rpmcheck_list_pkg_to_add_$isoconf->{nameid}-$version-$isoconf->{arch}";
+our $file_rpmcheck_log = "/tmp/rpmcheck_failure_$isoconf->{nameid}-$version-$isoconf->{arch}";
+
+sub create_media {
+ print_color("$LOG Create the media dir in $builddir", $color);
+ foreach my $media (@{$isoconf->{media}{list}}) {
+ create_needed_dir("$builddir/media/$media->{destmedia}");
+ }
+}
+
+sub show_size {
+ print_color("$LOG size of the builddir", $color);
+ system("du -sLh $builddir");
+}
+
+sub list_media {
+ print_color("$LOG all media are listed there:", $color);
+ foreach my $media (@{$isoconf->{media}{list}}) {
+ $media->{name} or next;
+ print "
+name: $media->{name}
+ desc: $media->{desc}
+ mediadir: $media->{mediadir}
+ destmedia: $media->{destmedia}
+ pubkey: $media->{pubkey}\n";
+ foreach my $files (@{$media->{input}}) {
+ $files->{file} or next;
+ if (-f $files->{file}) {
+ print "list of wanted: $files->{file}\n";
+ } else { print_color("$files->{file} not present", $error_color); }
+ }
+ foreach my $files (@{$media->{exclude}}) {
+ $files->{file} or next;
+ if (-f $files->{file}) {
+ print "list of exclusion: $files->{file}\n";
+ } else { print_color("$files->{file} not present", $error_color); }
+ }
+ }
+}
+
+sub copy_pubkey {
+ my ($source_key, $destmedia) = @_;
+ print_color("$LOG copy $source_key to the $builddir/media/$destmedia/media_info directory", $color);
+ create_needed_dir("$builddir/media/$destmedia/media_info/");
+ if (! -f $source_key) {
+ print_color("$LOG can't find the $source_key", $error_color);
+ #exit;
+ }
+ system("cp -vf $source_key $builddir/media/$destmedia/media_info/");
+}
+
+sub use_gendistrib {
+ my $destmedia;
+ print_color("$LOG remove hdlists and synthesys from $builddir/media/$destmedia/media_info and $builddir/media/media_info", $color);
+ system("rm -vf $builddir/media/media_info/*.cz");
+ foreach my $media (@{$isoconf->{media}{list}}) {
+ $media->{name} or next;
+ $media->{destmedia} or next;
+ if ($destmedia eq $media->{destmedia}) { next }
+ $destmedia = $media->{destmedia};
+ system("rm -vf $builddir/media/$destmedia/media_info/*.cz");
+ system("rm -vf $builddir/media/$destmedia/media_info/MD5SUM");
+ }
+ undef $destmedia;
+ print_color("$LOG gendistrib --mediacfg $builddir/$isoconf->{iso}{mediacfg} $builddir", $color);
+ my $cmd = "gendistrib --mediacfg $builddir/$isoconf->{iso}{mediacfg} $builddir";
+ system($cmd) == 0 or die "$LOG system $cmd failed: $?\n";
+ if ($isoconf->{based_on} lt "2009.1") {
+ foreach my $media (@{$isoconf->{media}{list}}) {
+ $media->{name} or next;
+ if ($destmedia eq $media->{destmedia}) { next }
+ $destmedia = $media->{destmedia};
+ 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/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}");
+ system("cp -avf $builddir/media/$destmedia/media_info/synthesis.hdlist.cz $builddir/media/media_info/synthesis.hdlist_$media->{name}.cz");
+ system("rm -vf $builddir/media/$destmedia/media_info/*.cz");
+ system("rm -vf $builddir/media/$destmedia/media_info/MD5SUM");
+ }
+ }
+}
+
+sub copy_rpm {
+ my ($source_dir, $dest_dir) = @_;
+ system ("cp -a $source_dir/*.rpm $dest_dir");
+}
+
+sub create_mediacfg {
+ print_color("$LOG $builddir/$isoconf->{iso}{mediacfg}", $color);
+ system("rm -rf $builddir/$isoconf->{mediainfo}{mediainfo_dir}");
+ create_needed_dir("$builddir/$isoconf->{mediainfo}{mediainfo_dir}");
+ my $media_cfg = "$builddir/$isoconf->{iso}{mediacfg}";
+ open my $MEDIACFG, ">$media_cfg";
+ print $MEDIACFG "\n";
+ print $MEDIACFG "[media_info]\n";
+ print $MEDIACFG "version=$version\n";
+ if ($isoconf->{based_on} gt "2009.1") {
+ print $MEDIACFG "mediacfg_version=2\n";
+ }
+ print $MEDIACFG "branch=$isoconf->{iso}{branch}\n";
+ print $MEDIACFG "arch=$arch\n";
+ print $MEDIACFG "minor=$isoconf->{iso}{minor}\n";
+ print $MEDIACFG "subversion=$isoconf->{iso}{subversion}\n";
+ if ($isoconf->{mediainfo}{suppl}{todo} eq "yes") {
+ print $MEDIACFG "suppl=1\n";
+ }
+ if ($isoconf->{mediainfo}{askmedia}{todo} eq "yes") {
+ print $MEDIACFG "askmedia=1\n";
+ }
+ if ($isoconf->{mediainfo}{xmlinfo}{todo} eq "yes") {
+ print $MEDIACFG "xml-info=1\n";
+ }
+ my $destmedia;
+ foreach my $media (@{$isoconf->{media}{list}}) {
+ $media->{name} or next;
+ if ($destmedia eq $media->{destmedia}) { next }
+ $destmedia = $media->{destmedia};
+ if ($isoconf->{based_on} lt "2009.1") {
+ print $MEDIACFG "
+
+[$media->{destmedia}]
+hdlist=hdlist_$media->{name}.cz
+pubkey=pubkey_$media->{name}
+name=$isoconf->{iso}{header}{volumesetid}
+desc=$isoconf->{iso}{header}{volumesetid}
+\n";
+} else {
+ print $MEDIACFG "
+[$media->{destmedia}]
+synthesis=$media->{destmedia}/media_info/synthesis.hdlist.cz
+hdlist=$media->{destmedia}/media_info/hdlist.cz
+pubkey=$media->{destmedia}/media_info/pubkey
+name=$media->{desc}
+\n";
+ }
+ }
+ close $MEDIACFG;
+}
+
+# based on a similar functions in pkgs.pm
+sub get_list_from_CAT {
+ #4 META_CLASS"desktop" mandriva-xfce-config-One
+ my ($file, $cat, $poids) = @_;
+ my (%rates, @need_to_copy);
+ my (@l);
+ local $_;
+ foreach (cat_($file)) {
+ s/#.*//; # comments
+ my ($indent, $data) = /(\s*)(.*)/;
+ next if !$data; # skip empty lines
+
+ @l = grep { $_->[0] < length $indent } @l;
+
+ my @m = @l ? @{$l[-1][1]} : ();
+ my ($t, $flag, @l2);
+ while ($data =~
+ /^((
+ [1-5]
+ |
+ (?: (?: !\s*)? [0-9A-Z_]+(?:".*?")?)
+ (?: \s*\|\|\s* (?: !\s*)? [0-9A-Z_]+(?:".*?")?)*
+ )
+ (?:\s+|$)
+ )(.*)/x) { #@")) {
+ ($t, $flag, $data) = ($1,$2,$3);
+ while ($flag =~ s,^\s*(("[^"]*"|[^"\s]*)*)\s+,$1,) {}
+ push @m, $flag;
+ push @l2, [ length $indent, [ @m ] ];
+ $indent .= $t;
+ }
+ if ($data) {
+ # has packages on same line
+ my ($rates, $flags) = partition { /^\d$/ } @m;
+ foreach my $name (split ' ', $data) {
+ if (member($cat, @$flags)) {
+ if ("@$rates" ge "$poids") {
+ push @need_to_copy, $name;
+ } else {
+ print "exclude $name of $cat (@$rates < $poids)\n";
+ }
+ next;
+ }
+ }
+ push @l, @l2;
+ } else {
+ push @l, [ $l2[0][0], $l2[-1][1] ];
+ }
+ }
+ \%rates, \@need_to_copy;
+}
+
+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";
+ # 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 'Main,Main Updates' --excludemedia 'Main Testing,Main Backports' urpmi basesystem-minimal bash basesystem > $chroot_path/$isoconf->{tocopy_file}_TODO_chroot");
+ # install all those file to be able to use urpmi.XXXXXX
+ system("LC_ALL=C $cmd --prefer $DISTRIB,$THEME urpmi bash");
+ 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;
+ system("sudo chroot $chroot_path urpmi.removemedia -a");
+ foreach my $media (@{$isoconf->{media}{list}}) {
+ $media->{name} or next;
+ chomp($media->{name});
+ system("LC_ALL=C sudo chroot $chroot_path urpmi.addmedia --probe-synthesis '$media->{name}' $distrib_path/media/$media->{mediadir}/release");
+ if ($media->{updates} eq "yes") {
+ system("LC_ALL=C sudo chroot $chroot_path urpmi.addmedia --update --probe-synthesis \"$media->{name} Updates\" $distrib_path/media/$media->{mediadir}/updates");
+ }
+ if ($media->{backports} eq "yes") {
+ system("sudo chroot $chroot_path urpmi.addmedia --probe-synthesis '$media->{name} Backports' $distrib_path/media/$media->{mediadir}/backport");
+ }
+ if ($media->{testing} eq "yes") {
+ 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 {
+ my ($name, $path, $update) = @_;
+ print_color("$LOG add media $name from $path", $color);
+ system("sudo chroot $chroot_path mkdir -p /tmp/$name");
+ system("sudo mount -o bind $path $chroot_path/tmp/$name -o ro");
+ # check if path contain sub direcroty or not (media/release media/updates etc...)
+ if (-d "$path/release" and -d "$path/updates") {
+ print_color("$LOG This supp media contains release and updates sub-directory", $color);
+ system("LC_ALL=C sudo chroot $chroot_path urpmi.addmedia $name-release /tmp/$name/release");
+ if ($update =~ /yes/) {
+ system("LC_ALL=C sudo chroot $chroot_path urpmi.addmedia --update '$name Updates' /tmp/$name/updates");
+ }
+ } else {
+ system("LC_ALL=C sudo chroot $chroot_path urpmi.addmedia $name /tmp/$name");
+ }
+ push @to_umount, "/tmp/$name";
+ push @add_media, "$name";
+}
+
+sub drop_media {
+ my ($name) = @_;
+ print_color("$LOG remove media $name from urpmi config", $color);
+ system("LC_ALL=C sudo chroot $chroot_path urpmi.removemedia $name");
+}
+
+
+
+my $listcopy = "$chroot_path/$isoconf->{tocopy_file}";
+sub generate_list_of_rpm_2_copy {
+ my @toget;my @toexclude;my $extra;
+ mini_chroot;
+ foreach my $media (@{$isoconf->{media}{list}}) {
+ $media->{name} or next;
+ $media->{external}{name} and add_media($media->{external}{name}, $media->{external}{fullpath_mediadir}, $media->{updates});
+ foreach my $input (@{$media->{input}}) {
+ $input->{file} or next;
+ -f $input->{file} or print_color("$LOG i can not find the $input->{file}, remove this list or fix...", $error_color);
+ foreach my $tohave (cat_($input->{file})) {
+ if ($tohave =~ /^\s/ || $tohave =~ /^\#/) {
+ next;
+ } elsif ($tohave =~ /^\S*\s\d$/) {
+ my ($section, $poids) = $tohave =~ /^(\S*)\s(\d)/;
+ print "$LOG get packages from $section using weight of $poids\n";
+ # TOFIX remove META_CLASS to avoid theme pb
+ system("cat $builddir/$isoconf->{mediainfo}{mediainfo_dir}/rpmsrate | grep -v META_CLASS > $tmp_rpmsrate");
+# system("cat $tmp_rpmsrate | grep -v theme > $tmp_rpmsrate");
+ my ($rates, $need_to_copy) = get_list_from_CAT($tmp_rpmsrate, $section, $poids);
+ foreach my $data (@{$need_to_copy}) {
+ push @toget, $data;
+ }
+ next;
+ } else {
+ chomp($tohave);
+ $verbose and print "$LOG $tohave\n";
+ push @toget, $tohave;
+ next;
+ }
+ }
+ }
+ foreach my $exclude (@{$media->{exclude}}) {
+ $exclude->{file} or next;
+ -f $exclude->{file} or print_color("$LOG i can not find the $exclude->{file}, remove this list or fix...", $error_color);
+ foreach my $totest (cat_($exclude->{file})) {
+ if ($totest =~ /^\s/ || $totest =~ /^\#/) {
+ next;
+ } else {
+ chomp($totest);
+ push @toexclude, $totest;
+ next;
+ }
+ }
+ }
+# print "$LOG $media, $toget, $toexclude";
+ create_list($media, \@toget, \@toexclude, $media->{external}{name}, $media->{media_supp});
+ @toexclude = "";
+ @toget = "";
+ }
+}
+
+sub rpmcheck_list {
+ my @toget = cat_($rpmcheck_list_pkg);
+ my $todo = @toget;
+ if ($todo ne "0") {
+ print_color("$LOG calculate deps from the auto-generated rpmcheck list file", $error_color);
+ my $list_filename = "$isoconf->{tocopy_file}_todo_rpmcheck";
+ my $list = "$chroot_path/urpmq/$list_filename";
+ my $urpmq_options = "--requires-recursive -c --sources $isoconf->{mediainfo}{urpmi_option}";
+ my $pkgs;
+ foreach (@toget) { $_ or next ; chomp($_); $pkgs = "$_ " . $pkgs; }
+ my $cmd_do_it = "LC_ALL=C sudo -P chroot $chroot_path urpmq --prefer $DISTRIB,$THEME $urpmq_options --no-suggests";
+ do_fork($pkgs, $list_filename, $list, $cmd_do_it);
+ } else {
+ print_color("$LOG No rpmcheck error", $error_color);
+ }
+}
+
+sub remove_notpresent {
+ my ($urpmi_error, $wanted) = @_;
+ my @toremove;
+ foreach my $entry (cat_($urpmi_error)) {
+ my ($data, $tor) = $entry =~ /(.*)\s(.*)\n/;
+ $data =~ /-/ and next;
+ $data =~ /^\s/ and next;
+ $tor or next;
+ push @toremove, $tor;
+ }
+ # keep only one line per packages
+ my %already_seen; my @final_list;
+ @already_seen{@toremove} = ();
+ foreach my $object (@{$wanted}) {
+ if (exists $already_seen{$object} and $verbose) { print_color("$LOG i cant find this package: $object, remove it from list", $error_color); }
+ push(@final_list, $object) unless exists $already_seen{$object};
+ }
+ # prepare the final list
+ my $final_list;
+ foreach (@final_list) {
+ chomp($_);
+ $final_list = $final_list . " $_";
+ }
+ return $final_list;
+}
+
+sub create_list {
+ my ($media, $wanted, $exclude, $extra, $media_supp) = @_;
+ my $extra_media;
+ # Main media is mandatory for all other media !
+ # we will use only Main + updates and this media + updates to calculte the list of wanted pkg
+ if ($media->{name} eq "Main") {
+ if ($media->{updates} eq "yes") {
+ #$extra_media = "--media \"Main,Main Updates,$extra,$media_supp\" --sortmedia \"Main Updates,Main\"";
+ $extra_media = "--media \"Main,Main Updates,$extra,$media_supp\"";
+ } else {
+ $extra_media = "--media \"Main,$extra,$media_supp\"";
+ }
+ } else {
+ my $extra2;
+ foreach (@add_media) { chomp($_); $_ and $extra2 = $_ . ',' . $extra2; };
+ #$extra_media = "--media \"Main,Main Updates,$extra2,$media_supp,$media->{name},$media->{name} Updates\" --sortmedia \"Main Updates,Main,$media->{name} Updates,$media->{name}\"";
+ if ($media->{updates} eq "yes") {
+ $extra_media = "--media \"Main,Main Updates,$extra2,$media_supp,$media->{name},$media->{name} Updates\"";
+ } else {
+ $extra_media = "--media \"Main,$extra2,$media_supp,$media->{name}\"";
+ }
+ }
+
+ # check the suggests option in the XML configuration
+ my $opt_sug;
+ if ($media->{nosuggests} eq "yes") {
+ $opt_sug = "--no-suggests";
+ } else { $opt_sug = ""; }
+ # list of wanted RPM per media name
+ my $list_filename = "$isoconf->{tocopy_file}_todo_$media->{name}";
+# my $list_filename_update = "$isoconf->{tocopy_file}_todo_$media->{name}_update";
+ my $list = "$chroot_path/urpmq/$list_filename";
+ my $list_update = "$chroot_path/urpmq/$list_filename" . "_update";
+ system("sudo chroot $chroot_path mkdir -m 777 -p urpmq");
+ # urpmq error file
+ my $urpmq_error = "$chroot_path/$isoconf->{tocopy_file}_urpmi_error_$media->{name}";
+ my $urpmq_error_update = "$chroot_path/$isoconf->{tocopy_file}_urpmi_error_update_$media->{name}";
+
+ # create list of wanted and exlude
+ my $tested_exclude;
+ my $tested_wanted;
+ foreach (@{$wanted}) { $tested_wanted = $tested_wanted . " $_" }
+ foreach (@{$exclude}) {
+ $_ or next;
+ $tested_exclude = $tested_exclude . " --skip $_"
+ };
+ print_color("$LOG remove unwanted mandriva-release, use $DISTRIB", $color);
+ # urpmq options (with option in the xml file)
+ my $urpmq_options = "--requires-recursive -c --sources $isoconf->{mediainfo}{urpmi_option}";
+ my $urpmq_extra_opt = "$opt_sug $extra_media";
+
+ ###
+ # 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);
+ }
+
+ ###
+ # select rpm from all media, find missing from list
+ my $cmd_find_missing = "LC_ALL=C sudo chroot $chroot_path urpmq --prefer $DISTRIB,$THEME $urpmq_options $urpmq_extra_opt $tested_wanted $tested_exclude 2> $urpmq_error > $list";
+ print_color("$LOG first attempt to run urpmq on media $media->{name} (to find all packages not availables)", $color);
+ system($cmd_find_missing);
+ # urpmq error found, so we have to remove some entry in the list of wanted packages
+ my $final_list = remove_notpresent($urpmq_error, $wanted);
+ print_color("$LOG launch urpmq on media $media->{name} (to create $list)", $color);
+ my $cmd_do_it = "LC_ALL=C sudo -P chroot $chroot_path urpmq --prefer $DISTRIB,$THEME $urpmq_options $urpmq_extra_opt $tested_exclude";
+ do_fork($final_list, $list_filename, $list, $cmd_do_it);
+}
+
+
+sub do_fork {
+ my ($final_list, $list_filename, $list, $cmd) = @_;
+ my @list_alone = split(/ /, $final_list);
+ my $count = @list_alone;
+ my $status = "0";
+ my $pm = new Parallel::ForkManager($NB_FORK);
+ print_color("$LOG $count transactions to do ... be patient !!!!", $color);
+ $| = 1;
+ foreach my $pkg (@list_alone) {
+ $pkg or next;
+ $status++;
+ my $pid = $pm->start and next;
+ back_and_print($status, $count);
+ # check an urpmq has been done before in an other media
+ foreach my $media (@{$isoconf->{media}{list}}) {
+ $media->{name} or next;
+ if (-f "$dir_deps/$isoconf->{tocopy_file}_todo_$media->{name}-$pkg") {
+ $verbose and print_color("$LOG found the urpmq transaction for $pkg, i will use it $dir_deps/$isoconf->{tocopy_file}_todo_$media->{name}-$pkg", $color);
+ system("touch $dir_deps/bypass-$pkg");
+ system("cp -f $dir_deps/$isoconf->{tocopy_file}_todo_$media->{name}-$pkg $list-$pkg");
+ #system("cp -f $dir_deps/$isoconf->{tocopy_file}_todo_$media->{name}-$pkg $dir_deps/$list_filename-$pkg");
+ last;
+ } else {
+ $verbose and print_color("$LOG can't found the urpmq transaction", $color);
+ }
+ }
+ # check an urpmq has been done before in this media
+ if (-f "$dir_deps/bypass-$pkg") {
+ #my $pkg_found = `grep -P '\/$pkg-' $dir_deps/$list_filename-$pkg`;
+ #$pkg_found = basename($pkg_found);
+ $verbose and print_color("$LOG found the urpmq transaction for $pkg, i will the previous one found in $dir_deps directory", $color);
+ #system("cp -f $dir_deps/$list_filename-$pkg $list-$pkg");
+ } else {
+ # match the case using --update option
+ my $cmd_do_it = "$cmd $pkg > $list-$pkg";
+ if ($cmd =~ /\-\-update/) {
+ my @result = `urpmq --update $pkg`;
+ foreach (@result) {
+ # exact match with --update option
+ $_ or next;
+ if ($_ =~ /^$pkg/) {
+ system($cmd_do_it);
+ system("cp -f $list-$pkg $dir_deps/$list_filename-$pkg");
+ last;
+ } else { $verbose and print "$LOG $pkg is not in update, it's a package that contains the string $pkg!\n"; last }
+ }
+ } else {
+ system($cmd_do_it);
+ system("cp -f $list-$pkg $dir_deps/$list_filename-$pkg");
+ }
+ }
+ $pm->finish;
+ }
+ print_color("$LOG Waiting for the end of some urpmq command...", $color);
+ $pm->wait_all_children;
+ print_color("$LOG all urpmq command are done...", $color);
+}
+
+
+sub back_and_print {
+ my ($status, $total) = @_;
+ printf STDERR "%s / %2d \n", $status, $total;
+ print STDERR "\e[A";
+}
+
+
+sub concatenate_files {
+ # remove urpmq queries from excluded packages
+ print_color("$LOG remove urpmq queries from removed packages", $color);
+ foreach my $media (@{$isoconf->{media}{list}}) {
+ $media->{name} or next;
+ foreach my $exclude (@{$media->{exclude}}) {
+ $exclude->{file} or next;
+ -f $exclude->{file} or print_color("$LOG i can not find the $exclude->{file}, remove this list or fix...", $error_color);
+ foreach my $totest (cat_($exclude->{file})) {
+ chomp($totest);
+ if (! $totest) { next };
+ system("rm -vf $chroot_path/urpmq/$isoconf->{tocopy_file}_todo_*$totest");
+ }
+ }
+ }
+ print_color("$LOG create the final list: $listcopy", $color);
+ system("cat $chroot_path/urpmq/$isoconf->{tocopy_file}_todo_* > $listcopy.tmp");
+ system("sed -e 's|^\\w*\\s/|/|' $listcopy.tmp > $listcopy");
+ system("grep '^/' $listcopy > $listcopy.tmp");
+ system("cat $listcopy.tmp | sort | uniq > $listcopy");
+}
+
+sub target_size {
+ print_color("$LOG calculate the size of all packages:", $color);
+ my $total;my $pkg_info;
+ foreach my $pkg (cat_($listcopy)) {
+ chomp($pkg);
+ if (-f "$pkg") {
+ # stat is not really good to get size file of linked packages over nfs
+ $pkg_info = stat($pkg);
+ $total = ($total+$pkg_info->size);
+ next;
+ } else { next; }
+ }
+ my $human_total = int(($total/1024)/1024);
+ print_color("$LOG Size of all RPMS: $human_total Mo", $color);
+ my $left = ($isoconf->{iso}{size} - $human_total);
+ # i need to add the install/ directory size
+ if ("$isoconf->{iso}{size}" ge "$human_total") {
+ print_color("$LOG all you data will fit on the CD/DVD, extra size: $left", $color);
+ } else {
+ print_color("$LOG all packages will not fit on $isoconf->{iso}{size}, i need $left Mo", $error_color);
+ }
+}
+
+sub count_nb_to_copy {
+ my ($file) = @_;
+ my $lines = 0;
+ open(FILE, $file) or die "Can't open `$file': $!";
+ while (sysread FILE, my $buffer, 4096) {
+ if ($buffer =~ /^install/ || $buffer =~ /^\-/ || $buffer =~ /^More/ || $buffer =~ /^Install/ ) {
+ next;
+ } else {
+ $lines += ($buffer =~ tr/\n//);
+ }
+ }
+ close FILE;
+ return $lines;
+}
+
+sub find_source_dest_media {
+ my ($todeal) = @_;
+ # distribution path
+ if ($todeal =~ m!^$distrib_path!) {
+ # find the source media name
+ # f_path will contrib/release, dir_f_path will be contrib
+ my ($f_path) = $todeal =~ /^$distrib_path\/media\/(.*)/;
+ my $dir_f_path = dirname($f_path);
+ foreach my $media (@{$isoconf->{media}{list}}) {
+ # find a mediadir or next one
+ $media->{mediadir} or next;
+ #print "DEBUG media->name: $media->{mediadir} f_path: $f_path\n";
+ # try to find the source media
+ if ($media->{mediadir} eq $dir_f_path) {
+ #print "DEBUG todeal: $todeal FROM $repo/$based_on/$arch/media/$f_path TO media/$media->{destmedia}\n";
+ return("$repo/$based_on/$arch/media/$f_path", "media/$media->{destmedia}");
+ }
+ }
+ next;
+ } else {
+ #external repository
+ #/tmp/u_xos or /tmp/u_xos/release and /tmp/u_xos/updates
+ my ($source_media) = $todeal =~ /\/tmp\/(.*)/;
+ # find the dest media from source media
+ foreach my $media (@{$isoconf->{media}{list}}) {
+ # find a media or next one
+ $media->{name} or next;
+ if ($source_media eq $media->{name}) {
+ #print "DEBUG todeal: $todeal DEBUG media->name: $media->{name} source_media: $source_media\n";
+ # we have found the media so destmedia is $media->{destmedia}
+ # return the destmedia
+ return($media->{external}{fullpath_mediadir}, "media/$media->{destmedia}");
+ } elsif ($source_media eq "$media->{name}/release") {
+ return("$media->{external}{fullpath_mediadir}/release", "media/$media->{destmedia}");
+ } elsif ($source_media eq "$media->{name}/updates") {
+ return("$media->{external}{fullpath_mediadir}/updates", "media/$media->{destmedia}");
+ }
+ next;
+ }
+ }
+}
+
+sub parse_copy_link {
+ my ($wichaction) = @_;
+ my $count;my $action;
+ if ($wichaction =~ /link/) {
+ $action = "ln -sf";
+ } else {
+ $action = "cp -fa";
+ }
+ my $total = count_nb_to_copy($listcopy);
+ print_color("$LOG $wichaction all wanted packages to $builddir/XXXX ($total packages)", $color);
+ # chroot packages
+ if (!-f "$chroot_path/$isoconf->{tocopy_file}_TODO_chroot") { exit 1 }
+ foreach my $line (cat_("$chroot_path/$isoconf->{tocopy_file}_TODO_chroot")) {
+ chomp($line);
+ my @list = split(/ /, $line);
+ my $data = $list[$#list];
+ # if (! -d $data) { print "$data is not a directory !\n"; }
+ foreach my $pkg (@list) {
+ if (-f "$data/$pkg") {
+ #print "$LOG $action $data/$pkg TO1 $builddir/media/main/$pkg\n";
+ system("$action $data/$pkg $builddir/media/main/$pkg");
+ next;
+ } elsif (-f $data) {
+ my $package = basename($data);
+ chomp($package);
+ #print "$LOG $action $data TO2 $builddir/media/main/$package\n";
+ system("$action $data $builddir/media/main/$package");
+ next;
+ }
+ }
+ }
+ foreach my $tocopy (cat_($listcopy)) {
+ chomp($tocopy);
+ #print "info tocopy $tocopy\n";
+ my @list = split(/ /, $tocopy);
+ # path final
+ my $data2 = $list[$#list];
+ my ($path, $pkg) = $tocopy =~ m!^(/.*)/(.*)\.[rpm|]$!;
+ # une ligne avec un mot avant
+ # $pkg or ($path, $pkg) = $tocopy =~ m!^\w+\s(/.*)/(.*)\.rpm$!;
+
+ my $source_media; my $dest_media;
+ my $package = basename($data2);
+ my $dirn = dirname($data2);
+ if (-f "$chroot_path/$data2" || !-d "$chroot_path/$data2") {
+ chomp($package);
+ ($source_media, $dest_media) = find_source_dest_media($dirn);
+ $dest_media or print "$LOG $package is require/suggest but has no destination, removing it from list\n" and next;
+ #print "parse_copy_link package: $package, sourcemedia: $source_media, dest_media: $dest_media\n";
+ #print "parse_copy_link $LOG $action $source_media/$package TO3 $builddir/$dest_media/$package\n";
+ system("$action $source_media/$package $builddir/$dest_media/$package");
+ next;
+ } else {
+ #print "$chroot_path/$data2 data2 is a directory \n";
+ ($source_media, $dest_media) = find_source_dest_media($data2);
+ foreach my $pkg2 (@list) {
+ if (-f "$chroot_path/$data2/$pkg2") {
+ print "DATA2/pkg2 i found $chroot_path/$data2/$pkg2 \n";
+ #print "$LOG $action $source_media/$pkg2 TO4 $builddir/$dest_media/$pkg2\n";
+ system("$action $source_media/$pkg2 $builddir/$dest_media/$pkg2");
+ next;
+ }
+ }
+ }
+ $path or next;
+ if (!-d "$chroot_path/$path") {
+ print "";
+ #print "$chroot_path/$path isnt a directory\n";
+ } elsif (-f "$chroot_path/$path/$pkg") {
+ #print "$chroot_path/$path/$pkg is a package\n";
+ ($source_media, $dest_media) = find_source_dest_media($path);
+ $package = basename("chroot_path/$path/$pkg");
+ chomp($package);
+ #print "$LOG $action $source_media/$package TO5 $builddir/$dest_media/$pkg\n";
+ system("$action $source_media/$package $builddir/$dest_media/$pkg");
+ next;
+ } else { print "lost in space !!\n"; }
+ next;
+ }
+}
+
+sub rpmVersionCompare {
+ my ($pkg1, $pkg2) = @_;
+ my ($name_a, $av, $ar) = $pkg1 =~ /^(?:([^:]*):)?([^-]*)(?:-(.*))?$/;
+ my ($name_b, $bv, $br) = $pkg2 =~ /^(?:([^:]*):)?([^-]*)(?:-(.*))?$/;
+ my $rc = 0;
+ if(defined($name_a) && ! defined($name_b)) {
+ return 1;
+ } elsif(!defined($name_a) && defined($name_b)) {
+ return -1;
+ } else {
+ $rc = URPM::rpmvercmp($name_a, $name_b) if (defined($name_a) && defined($name_b));
+ if ($rc == 0) {
+ $rc = URPM::rpmvercmp($av, $bv);
+ if ($rc == 0) {
+ if(defined($ar) && !defined($br)) {
+ return 1;
+ } elsif(!defined($ar) && defined($br)) {
+ return -1;
+ } elsif (!defined($ar) && !defined($br)) {
+ return 0;
+ } else {
+ return URPM::rpmvercmp($ar, $br);
+ }
+ } else {
+ return $rc;
+ }
+ } else {
+ return $rc;
+ }
+ }
+}
+
+sub remove_all_excluded {
+ # this functions should be available if explicitely needed, it's really too dangerous to remove packages from a list...
+ print_color("$LOG remove all RPM from exclude list", $color);
+ print_color("$LOG WARNING remove needed packages can break dependencies, check rpmcheck messages", $error_color);
+ foreach my $media (@{$isoconf->{media}{list}}) {
+ $media->{name} or next;
+ if ($media->{remove_noarch} =~ /yes/) {
+ print_color("$LOG remove noarch from media $media->{name} $builddir/media/$media->{destmedia}/", $color);
+ system("rm -rf $builddir/media/$media->{destmedia}/*.noarch.rpm");
+ }
+ foreach my $exclude (@{$media->{exclude}}) {
+ $exclude->{file} or next;
+ -f $exclude->{file} or print_color("$LOG i can not find the $exclude->{file}, remove this list or fix...", $error_color);
+ foreach my $totest (cat_($exclude->{file})) {
+ chomp($totest);
+ if (! $totest) { next };
+ if ($totest =~ /^\s.*/ || $totest =~ /^\#/) {
+ next;
+ } else {
+ my @l = glob("$builddir/media/$media->{destmedia}/$totest*.rpm");
+ foreach my $file (@l) {
+ $file or next;
+ if (-f $file) {
+ $verbose and print "$LOG $file found, removing this file\n";
+ system("rm -f $file");
+ next;
+ }
+ }
+ }
+ next;
+ }
+ next;
+ }
+ }
+}
+
+sub copy_filedeps {
+ print_color("$LOG copy $mediainfo_sourcedir/$isoconf->{mediainfo}{filedeps} in $builddir/$isoconf->{mediainfo}{mediainfo_dir}", $color);
+ -f "$mediainfo_sourcedir/$isoconf->{mediainfo}{filedeps}" or print "$LOG missing filedeps\n";
+ system("cp -vf $mediainfo_sourcedir/$isoconf->{mediainfo}{filedeps} $builddir/$isoconf->{mediainfo}{mediainfo_dir}/file-deps") == 0 or die "$LOG copy of $mediainfo_sourcedir/$isoconf->{mediainfo}{filedeps} failed: $?\n";
+}
+
+sub copy_rpmsrate {
+ print_color("$LOG copy $mediainfo_sourcedir/$isoconf->{mediainfo}{rpmsrate} in $builddir/$isoconf->{mediainfo}{mediainfo_dir}", $color);
+ -f "$mediainfo_sourcedir/$isoconf->{mediainfo}{rpmsrate}" or print "$LOG missing rpmsrate\n";
+ system("cp -vf $mediainfo_sourcedir/$isoconf->{mediainfo}{rpmsrate} $builddir/$isoconf->{mediainfo}{mediainfo_dir}/rpmsrate") == 0 or die "$LOG copy of $mediainfo_sourcedir/$isoconf->{mediainfo}{rpmsrate} failed: $?\n";
+}
+
+sub copy_compssusers {
+ print_color("$LOG copy $mediainfo_sourcedir/$isoconf->{mediainfo}{compssusers} in $builddir/$isoconf->{mediainfo}{mediainfo_dir}", $color);
+ -f "$mediainfo_sourcedir/$isoconf->{mediainfo}{compssusers}" or print "$LOG missing compssusers\n";
+ system("cp -vf $mediainfo_sourcedir/$isoconf->{mediainfo}{compssusers} $builddir/$isoconf->{mediainfo}{mediainfo_dir}/compssUsers.pl") == 0 or die "$LOG copy of $mediainfo_sourcedir/$isoconf->{mediainfo}{compssusers} failed: $?\n";;
+}
+
+sub use_genhdlist2 {
+ my $destmedia;
+ foreach my $media (@{$isoconf->{media}{list}}) {
+ $media->{name} or next;
+ if ($destmedia eq $media->{destmedia}) { next }
+ $destmedia = $media->{destmedia};
+ print_color("$LOG build hdlists and synthesys in $builddir/media/$media->{destmedia}", $color);
+ system("genhdlist2 -v --clean --file-deps $builddir/media/media_info/$isoconf->{medianfo}{filedeps} --media_info-dir $builddir/media/media_info/ $builddir/media/$media->{destmedia}");
+ system("mv $builddir/media/$destmedia/media_info/hdlist.cz $builddir/media/media_info/hdlist_$media->{name}.cz");
+ system("mv $builddir/media/$destmedia/media_info/synthesis.hdlist.cz $builddir/media/media_info/synthesis.hdlist_$media->{name}.cz");
+# system("genhdlist2 --quiet --clean --no-hdlist --file-deps $builddir/media/media_info/$isoconf->{medianfo}{filedeps} $builddir/media/$media->{destmedia}");
+ }
+ system("cd $builddir/media/media_info/ && md5sum *.cz > MD5SUM");
+}
+
+sub rpmcheck_launch {
+ my $options = "-explain -failures";
+ my $destmedia = "0";
+ print_color("$LOG launch rpmcheck to check hdlists", $color);
+ foreach my $media (@{$isoconf->{media}{list}}) {
+ $media->{name} or next;
+ $media->{drop} =~ /yes/ and drop_media("$media->{name}-release");
+ if ($destmedia eq $media->{destmedia}) { next }
+ $destmedia = $media->{destmedia};
+ system("cp $builddir/media/$destmedia/media_info/hdlist.cz $builddir/media/media_info/hdlist_$media->{name}.cz");
+ }
+ my $cmd = "zcat $builddir/media/media_info/hdlist*.cz | rpmcheck $options";
+ print_color("$LOG $cmd", $color);
+ system("$cmd 2> /dev/null > $file_rpmcheck_log") == 0 or die "$LOG system $cmd failed: $?\n";
+ open my $LIST_FAILURE, ">$rpmcheck_list_pkg.tmp";
+ my @list_failure = cat_($file_rpmcheck_log);
+ foreach my $package (@list_failure) {
+ print "$package";
+ my ($package2) = $package =~ /^\s+(\S*)\s.*/;
+ $package2 and print $LIST_FAILURE "$package2\n";
+ }
+ close $LIST_FAILURE;
+ system("cat $rpmcheck_list_pkg.tmp | sort | uniq > $rpmcheck_list_pkg");
+ print_color("$LOG check this file $file_rpmcheck_log", $color);
+ print_color("$LOG check this file $rpmcheck_list_pkg", $color);
+}
+
+sub remove_hdlist {
+ my $destmedia;
+ if ($isoconf->{based_on} gt "2009.1") {
+ print_color("$LOG remove hdlists*.cz from $builddir/media/media_info", $color);
+ system("rm -vf $builddir/media/media_info/hdlist*.cz");
+ foreach my $media (@{$isoconf->{media}{list}}) {
+ $media->{name} or next;
+ if ($destmedia eq $media->{destmedia}) { next }
+ $destmedia = $media->{destmedia};
+ print_color("$LOG remove hdlists from $builddir/media/$destmedia/media_info", $color);
+ system("rm -vf $builddir/media/$destmedia/media_info/hdlist.cz");
+ system("cd $builddir/media/$destmedia/media_info ; md5sum *.cz > MD5SUM");
+ }
+ }
+}
+
+sub copy_all_pubkey {
+ foreach my $media (@{$isoconf->{media}{list}}) {
+ $media->{name} or next;
+ if ($media->{pubkey} eq "") {
+ print_color("$LOG using $media->{file_pubkey}", $color);
+ copy_pubkey($media->{file_pubkey}, "$media->{destmedia}");
+ } else {
+ # media/ dir will be added in the copy_pubkey functions
+ print_color("$LOG $repo/$based_on/$arch/media/$media->{mediadir}/$media->{pubkey}, $media->{destmedia}", $color);
+ copy_pubkey("$repo/$based_on/$arch/media/$media->{mediadir}/$media->{pubkey}", "$media->{destmedia}");
+ }
+ next;
+ }
+}
+
+sub list_medias_available {
+ #my @mediacfg = cat_("$repo/$based_on/$arch/$isoconf->{mediainfo_dir}/media.cfg");
+ print_color("$LOG list all medias availables in $repo/$based_on/$arch repositery", $color);
+ my @mediacfg = cat_("$repo/$based_on/$arch/media/media_info/media.cfg");
+ my @medias = grep {/^name=/} @mediacfg;
+ foreach my $media (@medias) {
+ $media =~ s/name\=//;
+ $media and print("$media");
+ }
+}
+
+sub check_repo_hdlist {
+ my $options = "-explain -failures";
+ print_color("$LOG check media repositery hdlists in $repo/$version/$arch", $color);
+ system("zcat $repo/$version/$arch/media/media_info/hdlist*ain.cz | rpmcheck $options");
+}
+
+sub umount_all_mountloop {
+ print "$LOG umount all mounted loop dir\n";
+ foreach (@to_umount) {
+ system("sudo umount $chroot_path/$_");
+ }
+}
+
+sub get_srpms_list {
+ my $pm = new Parallel::ForkManager(20);
+ my $pkg_name; my @srpms; my @checked; my $already_done;
+ my $tmp_bs = "/tmp/list_BS-$isoconf->{nameid}-$version-$isoconf->{arch}";
+ system("mkdir $tmp_bs");
+ system("rm -f $tmp_bs/*");
+ foreach my $media (@{$isoconf->{media}{list}}) {
+ $media->{name} or next;
+ $media->{destmedia} or next;
+ foreach (@checked) { $_ or next ; $media->{destmedia} =~ /^$_$/ and $already_done = 1; };
+ $already_done and next;
+ push @checked, $media->{destmedia};
+ my @list_pkg = glob("$builddir/media/$media->{destmedia}/*.rpm");
+ my $list_srpm = "$tmp_bs/list_SRPM-$isoconf->{nameid}-$version-$isoconf->{arch}-$media->{name}-$media->{destmedia}";
+ my $list_buildreq = "$tmp_bs/list_BUILDREQ-$isoconf->{nameid}-$version-$isoconf->{arch}-$media->{name}-$media->{destmedia}";
+ my $total = @list_pkg;
+ my $status = "0";
+ print_color("$LOG i have to find $total SRPMS name in the media media/$media->{destmedia} ... be patient !!!!", $color);
+ foreach my $pkg (@list_pkg) {
+ $status++;
+ my $pid = $pm->start and next;
+ $pkg_name = `rpm -qp --queryformat %{SOURCERPM} $pkg`;
+ # tostore somewhere
+ # $media->{name} $pkg_name
+ system("sudo chroot $chroot_path echo '$pkg_name' > $list_srpm-$pkg_name");
+ back_and_print($status, $total);
+ $pm->finish;
+ $pm->wait_all_children;
+ }
+ system("cat $tmp_bs/list_SRPM-* | sort | uniq > $list_srpm");
+ my @list_srpm = cat_($list_srpm);
+ $total = @list_srpm;
+ $status = "0";
+ print_color("$LOG get the buildrequires from SRPMS", $color);
+ foreach my $srpm (@list_srpm) {
+ $srpm or next;
+ $status++;
+ chomp($srpm);
+ my $pid = $pm->start and next;
+ my $pkg = `basename $srpm .src.rpm`;
+ my $SRPMS_PATH;
+ # find the package in an official sub dir
+ my @struct = qw(release updates backport testing);
+ back_and_print($status, $total);
+ my @data; my $q;
+ foreach (@struct) {
+ #print "$repo/$based_on/SRPMS/$media->{mediadir}/$_/$srpm";
+ if (-f "$repo/$based_on/SRPMS/$media->{mediadir}/$_/$srpm") {
+ $SRPMS_PATH="$repo/$based_on/SRPMS/$media->{mediadir}/$_/";
+ my $media="--sortmedia \"Main Updates,Main,Contrib Updates,Contrib\"";
+ system("LC_ALL=C urpmq --use-distrib $repo/$based_on/$arch $media --sources --requires-recursive --prefer $DISTRIB,$THEME,kernel-source-dekstop --no-suggests $SRPMS_PATH/$srpm > $list_buildreq-$srpm");
+ last;
+ } else {
+ #print "$repo/$based_on/SRPMS/$media->{mediadir}/$_/$srpm doesnt exist \n";
+ next;
+ }
+ }
+ $pm->finish;
+ $pm->wait_all_children;
+ }
+ system("cat $tmp_bs/list_BUILDREQ-* | sort | uniq > $list_buildreq");
+ system("cp $list_buildreq $chroot_path/list_ALL_BUILDREQ");
+ system("cp $list_srpm $chroot_path/list_ALL_SRPM");
+# system("rm -f $tmp_bs/list_BUILDREQ-* $tmp_bs/list_SRPM-*");
+ }
+}
+
+
+sub extra_filter {
+ my ($filter) = @_;
+ print_color("$LOG compare versions of $filter and keep the latest one", $color);
+ my @l; my $keeped;
+ foreach my $media (@{$isoconf->{media}{list}}) {
+ $media->{name} or next;
+ $media->{destmedia} or next;
+ @l = glob("$builddir/media/$media->{destmedia}/$filter-*.rpm");
+ my $l = @l; $l eq "0" and last;
+ foreach (@l) {
+ my $pkg = basename($_);
+ # check it will be a number after the filter name
+ $pkg =~ /$filter\-\d.*/ or next;
+ $keeped or $keeped = $pkg;
+ $pkg ne $keeped and print "$LOG COMPARE $pkg and $keeped:\n" or next;
+ my $r = rpmVersionCompare($pkg, $keeped);
+ if ($r eq "-1") {
+ $keeped = $keeped;
+ print "i will keep $keeped\n";
+ system("rm -vf $builddir/media/$media->{destmedia}/$pkg");
+ next;
+ } elsif ($r eq "1") {
+ system("rm -vf $builddir/media/$media->{destmedia}/$keeped");
+ $keeped = $pkg;
+ print "i will keep $keeped\n";
+ next;
+ };
+ }
+ }
+}
+
+sub solve_doble_issue {
+ my $pkg_name; my $pkg_version;
+ my @list_to_filter; my @todeal;
+ my %already_seen; my @final_list;
+ my $keeped;
+ # 50 should not cause any trouble... NB_FORK is too small...
+ my $pm = new Parallel::ForkManager(50);
+ my @checked; my $already_done;
+ foreach my $media (@{$isoconf->{media}{list}}) {
+ $media->{name} or next;
+ $media->{destmedia} or next;
+ foreach (@checked) { $_ or next; $_ =~ /^\#/ and next ; $media->{destmedia} =~ /^$_$/ and $already_done = 1; };
+ $already_done and next;
+ push @checked, $media->{destmedia};
+ # get all rpm from the media dir
+ my @list_pkg = glob("$builddir/media/$media->{destmedia}/*.rpm");
+ my $total = @list_pkg;
+ my $status = "0";
+ print_color("$LOG i have to check $total doble in the media media/$media->{destmedia} ... be patient !!!!", $color);
+ # parse all files in the media
+ foreach my $pkg (@list_pkg) {
+ $status++;
+ # get the rpm name
+ my $pid = $pm->start and next;
+ $pkg_name = `rpm -qp --queryformat %{name} $pkg`;
+ my @l = glob("$builddir/media/$media->{destmedia}/$pkg_name*.rpm");
+ my $l = @l; $l eq "0" and last;
+ foreach (@l) {
+ #print_color("$LOG compare versions of $filter and keep the latest one", $color);
+ $_ or next; my $found = 0;
+ my $pkg = basename($_);
+ foreach (cat_($isoconf->{mediainfo}{filter})) {
+ if ($_ =~ /^$pkg_name/) { print "- skipping $_\n (from $isoconf->{mediainfo}{filter} file)" and $found = 1; }
+ }
+ if ($_ =~ /kernel/) { print "- $pkg_name is a package relative to a kernel ! will be treated later\n"; }
+ $found eq "1" and next;
+ $pkg =~ /^$pkg_name\-\d.*/ or next;
+ # bypass special case like libwnck-1_22
+ $pkg =~ /^$pkg_name\-\d\_.*/ and print "- $pkg comparaison skipped... (bcd regexp)\n" and next;
+ # check it will be a number after the filter name
+ $keeped or $keeped = $pkg;
+ #print "$LOG COMPARE $pkg and $keeped: \n";
+ my $r = rpmVersionCompare($pkg, $keeped);
+ if ($r eq "-1") {
+ $keeped = $keeped;
+ $verbose and print "i will keep $keeped and erase $builddir/media/$media->{destmedia}/$pkg\n";
+ system("rm -f $builddir/media/$media->{destmedia}/$pkg");
+ push @list_of_removed, "$builddir/media/$media->{destmedia}/$pkg";
+ } elsif ($r eq "1") {
+ system("rm -f $builddir/media/$media->{destmedia}/$keeped");
+ $keeped = $pkg;
+ $verbose and print "i will keep $keeped and remove $builddir/media/$media->{destmedia}/$keeped\n";
+ push @list_of_removed, "$builddir/media/$media->{destmedia}/$keeped";
+ };
+ }
+ back_and_print($status, $total);
+ $pm->finish;
+ print_color("$LOG Waiting for the end of some system command...", $color);
+ $pm->wait_all_children;
+ }
+ }
+}
+
+sub find_all_kernel {
+ print_color("$LOG kernel comparaison", $color);
+ foreach my $media (@{$isoconf->{media}{list}}) {
+ $media->{name} or next;
+ $media->{destmedia} or next;
+ my @l = glob("$builddir/media/$media->{destmedia}/kernel-*.rpm");
+ my $l = @l; $l eq "0" and last;
+ foreach my $k (@l) {
+ my ($kname, $kversion) = $k =~ m/kernel-([\w]+(?:\-[\w]+){0,3})-([0-9]+(?:\.[0-9]+){2,3})/;
+ $kname or next;
+ #print_color("$LOG i will compare all versions of kernel-$kname and keep the latest one", $color);
+ extra_filter("kernel-$kname");
+ next;
+ }
+ }
+}
+
+sub process_list_link {
+ my ($option) = @_;
+ concatenate_files;
+ # link or copy
+ if ($option =~ /copy/) {
+ parse_copy_link("copy");
+ } else {
+ parse_copy_link("link");
+ }
+ # remove packages listed in exclude list
+ remove_all_excluded;
+ if ($option =~ /nodoble/) { print_color("$LOG skipping doble\n", $color); } else { solve_doble_issue; }
+ find_all_kernel;
+ use_gendistrib;
+## use_genhdlist2;
+}
+
+sub clean_urpmq_log {
+ my ($option) = @_;
+ if ($option =~ /clean/) {
+ print_color("$LOG i will remove all previous urpmq log", $color);
+ system("rm -rf $dir_deps");
+ }
+}
+
+sub main_media {
+ my ($option) = @_;
+ if ($option =~ /verbose/) { $verbose = "1"; }
+ list_media;
+ create_media;
+ copy_all_pubkey;
+
+ create_mediacfg;
+
+ copy_filedeps;
+ copy_rpmsrate;
+ copy_compssusers;
+
+ create_needed_dir($chroot_path);
+ print_color("$LOG erase previous bypasss file", $color);
+ system("rm -f $dir_deps/bypass-*");
+ generate_list_of_rpm_2_copy;
+ process_list_link($option);
+ # target_size;
+ # first rpmcheck launch
+ rpmcheck_launch;
+ rpmcheck_list;
+ process_list_link($option);
+ # second laucn of rpmcheck (should have fix a lot of missing deps)
+ rpmcheck_launch;
+ umount_all_mountloop;
+ remove_hdlist;
+ show_size;
+ my $l = @list_of_removed;
+ if ($l ne "0") {
+ print_color("$LOG List of package removed, if you dont want to remove them, just add them in the file $isoconf->{mediainfo}{filter}:", $color);
+ foreach (@list_of_removed) { print "$_\n"; }
+ }
+}
+
+1;
+
diff --git a/BCD/Resign.pm b/BCD/Resign.pm
new file mode 100644
index 0000000..b6cc001
--- /dev/null
+++ b/BCD/Resign.pm
@@ -0,0 +1,63 @@
+package BCD::Resign;
+
+use strict;
+use Parallel::ForkManager;
+use File::Glob ':glob';
+use File::Basename;
+use Expect;
+
+use BCD::Common qw(:DEFAULT $isoconf $NB_FORK $rpmrc $pwd_file $builddir);
+
+our @ISA = qw(Exporter);
+our @EXPORT = qw(resign_media);
+
+my $verbose;
+my $LOG="MEDIA -";
+my $color = "yellow";
+
+my $password;
+if (defined $pwd_file) {
+ -f $pwd_file and $password = `cat $pwd_file`;
+}
+
+sub print_info {
+ map { if (!-f $pwd_file) { print_color("$LOG I cant find $_ file, i cant sign packages...", $color); } } $rpmrc, $pwd_file;
+ print_color("$LOG i will resign using info in those files: $rpmrc $pwd_file", $color);
+}
+
+sub resign_media {
+ print_info();
+ my $pm = new Parallel::ForkManager($NB_FORK);
+ my @list_path; my @checked; my $already_done;
+ foreach my $media (@{$isoconf->{media}{list}}) {
+ foreach (@checked) { $_ or next ; $media->{destmedia} =~ /^$_$/ and $already_done = 1; };
+ $already_done and next;
+ push @checked, $media->{destmedia};
+ push @list_path, $media->{destmedia};
+ print_color("$LOG resigning packages from $media->{destmedia} media", $color);
+ }
+ foreach (@list_path) {
+ my @list_pkg = glob("$builddir/media/$_/*.rpm");
+ my $count = @list_pkg;
+ print_color("$count transactions to do ... be patient !!!!", $color);
+ my $status = "0";
+ foreach my $pkg (@list_pkg) {
+ $pkg or next;
+ my $basename_pkg = basename($pkg);
+ $status++;
+ my $pid = $pm->start and next;
+ print("$basename_pkg ($status/$count)\n");
+ my $command = Expect->spawn("LC_ALL=C rpm --rcfile=$rpmrc --resign $pkg") or die "Couldn't start rpm: $!\n";
+ $command->log_stdout($verbose);
+ $command->expect(20, -re, 'Enter pass phrase:' => sub { print $command $password; });
+ $command->expect(undef);
+ $command->soft_close();
+ $pm->finish;
+ }
+ print_color("Waiting for the end of some signature...", $color);
+ $pm->wait_all_children;
+ print_color("all signature are done...", $color);
+ }
+}
+
+1;
diff --git a/BCD/Stagex.pm b/BCD/Stagex.pm
new file mode 100644
index 0000000..ed9bd2d
--- /dev/null
+++ b/BCD/Stagex.pm
@@ -0,0 +1,88 @@
+package BCD::Stagex;
+
+
+use strict;
+use XML::Simple;
+use File::Copy::Recursive qw(dircopy pathrm);
+use BCD::Common qw(:DEFAULT $isoconf $wd $name $arch $based_on $repo $version $builddir $error_color);
+
+our @ISA = qw(Exporter);
+our @EXPORT = qw(main_stagex);
+
+my $LOG="STAGEX -";
+my $color = "blue";
+my $installer_destdir = "$builddir/$isoconf->{installer}{defaultpath}";
+
+sub update_stage {
+-d $repo or print_color("$LOG $repo does not exists !", $color) and exit;
+
+my $installer_dir;
+if (!defined($isoconf->{installer}{fullpath})) {
+ $installer_dir = "$repo/$based_on/$arch/$isoconf->{installer}{defaultpath}";
+} else {
+ $installer_dir = "$isoconf->{installer}{fullpath}/install";
+}
+-d $installer_dir or print_color("$LOG $installer_dir does not exists !", $error_color) and exit;
+
+
+# print "$LOG remove old copy $builddir\n";
+# pathrm($builddir) or die $!;
+ print_color("$LOG copy $installer_dir to $installer_destdir", $color);
+ dircopy($installer_dir, $installer_destdir) or die $!;
+}
+
+sub update_advertising {
+if (defined($isoconf->{installer}{advertising}{fullpath})) {
+ print_color("$LOG copy $isoconf->{installer}{advertising}{fullpath} to $installer_destdir/extra/", $color);
+ system("rm -rf $installer_destdir/extra/advertising");
+ system("cp -a $isoconf->{installer}{advertising}{fullpath} $installer_destdir/extra/");
+ }
+}
+
+sub copy_dosutils {
+ print_color("$LOG copy of dosutils directory from $repo/$based_on/$arch to $builddir/../", $color);
+ if (-d "$repo/$based_on/$arch/dosutils") {
+ system("cp -a $repo/$based_on/$arch/dosutils $builddir/../");
+ system("cp -a $repo/$based_on/$arch/autorun.inf $builddir/../");
+ } else {
+ print_color("$LOG FAILED copy of dosutils directory from $repo/$based_on/$arch", $error_color);
+ }
+}
+
+sub copy_doc {
+ print_color("$LOG copy of doc directory from $repo/$based_on/$arch to $builddir/", $color);
+ if (-d "$repo/$based_on/$arch/doc") {
+ system("cp -a $repo/$based_on/$arch/doc $builddir/");
+ } else {
+ print_color("$LOG FAILED copy of doc directory from $repo/$based_on/$arch", $error_color);
+ }
+}
+
+sub copy_misc {
+ print_color("$LOG copy of misc directory from $repo/$based_on/$arch to $builddir/../", $color);
+ if (-d "$repo/$based_on/$arch/misc") {
+ system("rm -rf $builddir/misc && mkdir $builddir/misc");
+ system("cp -a $repo/$based_on/$arch/misc/drakx-in-chroot $builddir/misc/");
+ system("cp -a $repo/$based_on/$arch/misc/mdkinst_stage2_tooldosutils $builddir/misc/");
+ } else {
+ print_color("$LOG FAILED copy of misc directory from $repo/$based_on/$arch", $error_color);
+ }
+}
+
+sub patch_oem {
+ if (-f $isoconf->{installer}{patch}) {
+ print_color("$LOG copy $isoconf->{installer}{patch} to $installer_destdir/", $color);
+ system("cp -a $isoconf->{installer}{patch} $installer_destdir/");
+ }
+}
+
+sub main_stagex {
+ update_stage;
+ update_advertising;
+ copy_dosutils;
+ copy_doc;
+ copy_misc;
+ patch_oem;
+}
+
+1;
diff --git a/BCD/Web.pm b/BCD/Web.pm
new file mode 100644
index 0000000..235e375
--- /dev/null
+++ b/BCD/Web.pm
@@ -0,0 +1,222 @@
+package BCD::Web;
+
+use strict;
+use BCD::Media qw($rpmcheck_list_pkg $file_rpmcheck_log);
+use BCD::Genisoimage qw($isoname);
+use URPM;
+use File::Slurp;
+use MDK::Common;
+
+use BCD::Common qw(:DEFAULT $isoconf $isodir $wd $arch $version $based_on $repo $THEME $name $conf_file $date);
+
+our @ISA = qw(Exporter);
+our @EXPORT = qw(main_html);
+
+my $verbose;
+my $LOG="MEDIA -";
+my $color = "pink";
+
+my $index = $isoconf->{nameid} . '-' . $isoconf->{mediainfo}{version} . '-' . $isoconf->{arch} . ".html";
+my $public_html = "~/public_html";
+my $webdir = "$public_html/$isoname-$date";
+
+map { !-d "$webdir/$_" and system("mkdir -p $webdir/$_"); } qw(log rpmcheck input iso);
+
+sub main_html {
+ #next_build_info;
+ show_general_info();
+ copy_conf();
+ link_input();
+ prep_build_log();
+ show_rpmcheck();
+ rename_iso();
+ link_urpmq_log();
+ clean_previous_iso();
+ link_iso();
+ open my $B, ">>$index";
+ print $B "</html>";
+ close $B;
+ system("mv $index $webdir/");
+ system("ln -sf $webdir/$index $webdir/index.html");
+}
+
+sub show_general_info {
+ my $date_repo;
+ if (-f "$repo/$based_on/$arch/VERSION") {
+ $date_repo = read_file("$repo/$based_on/$arch/VERSION");
+ } else { $date_repo = "UNKNOW date"; print "You should check that a VERSION file is present"; }
+ open my $B, ">$index";
+ print $B "<HTML>
+ <HEAD>
+ <STYLE TYPE='text/css'>
+a:link {
+ color: #0073c7;
+ background-color: inherit;
+}
+
+a:visited {
+ color: #5A88B5;
+ background-color: inherit;
+}
+
+a:hover,
+a:active {
+ color: #0073c7;
+ background-color: #f0f0f0;
+}
+h2 {
+ padding: 0.2em;
+ margin: 0 0 0.5em 0;
+ border: 1px solid #405871;
+ background-color: inherit;
+ color: #036;
+ text-decoration: none;
+ font-size: 22px;
+ font-weight: bold;
+}
+
+h1 {
+ padding: 0.2em 0 0.2em 0.7em;
+ margin: 10px 0 0.5em 0;
+ text-decoration: none;
+ font-size: 18px;
+ font-weight: bold;
+ background: #FF7700;
+ color: white;
+}
+h3 {
+ background-color: inherit;
+ color: #ff7700;
+ text-decoration: none;
+ font-weight: bold;
+ font-size: 16px;
+ margin: 1.3em 0 0.4em 0;
+ padding: 0;
+}
+
+ </STYLE>
+ </HEAD>
+ <TITLE>$isoname</TITLE>
+ <h1 name='main h1'>$isoname build at $date</h1>
+ <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>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";
+ print $B "<li>Version: <b>$version</b></li>\n";
+ print $B "<li>Theme used: <b>$THEME</b></li>\n";
+ print $B "</ul>\n";
+ close $B;
+}
+
+sub copy_conf {
+ system("cp $conf_file $webdir/");
+}
+
+
+sub link_input {
+ open my $B, ">>$index";
+ print $B "<hr>\n";
+ print $B "<h1 name='Media list'>Media list</h1>\n";
+ close $B;
+ foreach my $media (@{$isoconf->{media}{list}}) {
+ $media->{name} or next;
+ open my $B, ">>$index";
+ print $B "<h2 name='Media $media->{name}'>Media $media->{name}</h1>";
+ print $B "<pre>
+Name of the media: $media->{name}
+Description: $media->{desc}
+From wich dir: $media->{mediadir}
+destination dir: $media->{destmedia}
+Pubkey: $media->{pubkey}
+</pre>
+";
+ print $B "<h3 name='list of input file'>list of input file</h3>\n";
+ print $B "<ul>\n";
+ foreach my $files (@{$media->{input}}) {
+ $files->{file} or next;
+ if (-f $files->{file}) {
+ my $short_name = basename($files->{file});
+ print $B "<li><a href='input/$short_name'>$short_name</a></li>\n";
+ system("cp -af $files->{file} $webdir/input/");
+ } else { print $B "<li><b>$files->{file} not present</b></li>"; }
+
+ }
+ print $B "</ul>\n";
+ print $B "<h3 name='list of exclude file'>list of exclude file</h3>\n";
+ print $B "<ul>\n";
+ foreach my $files (@{$media->{exclude}}) {
+ $files->{file} or next;
+ if (-f $files->{file}) {
+ my $short_name = basename($files->{file});
+ print $B "<li><a href='input/$short_name'>$short_name</a></li>\n";
+ system("cp -af $files->{file} $webdir/input/");
+ } else { print $B "</li><b>$files->{file} not present</b></li>"; }
+ }
+ print $B "</ul>\n";
+ close $B;
+ }
+}
+
+sub prep_build_log {
+ system("cp -af /var/lib/bcd/$name-$version-$arch/* $webdir/log/");
+}
+
+sub show_rpmcheck {
+ my $size;
+ system("cp -af $rpmcheck_list_pkg $file_rpmcheck_log $webdir/rpmcheck/");
+ open my $B, ">>$index";
+ print $B "<h1 name='RPMCHECK status'>RPMCHECK Status</h1>\n";
+ my @files = glob("$webdir/rpmcheck/*");
+ foreach (@files) {
+ $size = (stat($_))[7];
+ print $size;
+ if ($size ne 0) {
+ print $B "<fond color=red><b>ERROR in RPMCHECK !</b></font>\n";
+ }
+ }
+ print $B "<a href=rpmcheck/>rpmcheck directory</a> (rpmcheck --explain --failures)\n";
+ close $B;
+}
+
+sub clean_previous_iso {
+ system("find $public_html/$isoname* -name \.iso -exec rm -vf {} \;");
+}
+
+sub rename_iso {
+ #-f "$isodir/$isoname.iso" and system("cp -f $isodir/$isoname.iso $webdir/iso/$isoname-$date.iso");
+ -f "$isodir/$isoname.idx" and system("cp -f $isodir/$isoname.idx $webdir/iso/$isoname-$date.idx");
+ -f "$isodir/$isoname.iso.md5" and system("cp -f $isodir/$isoname.iso.md5 $webdir/iso/$isoname-$date.iso.md5");
+ -f "$isodir/$isoname.iso.sha1" and system("cp -f $isodir/$isoname.iso.sha1 $webdir/iso/$isoname-$date.iso.sha1");
+
+}
+
+sub link_urpmq_log {
+ open my $B, ">>$index";
+ print $B "<hr>\n";
+ print $B "<h1 name='Link to URPMQ logs'>Link to URPMQ logs</h1>\n";
+ print $B "<a href=log/>All log of URPMQ command per package/media</a> (based on: urpmq --requires-recursive -c --sources)\n";
+ close $B;
+}
+
+sub link_iso {
+ open my $B, ">>$index";
+ print $B "<hr>\n";
+ print $B "<h1 name='Link to ISO, IDX, SHA1 and MD5'>Link to ISO, IDX, SHA1 and MD5</h1>\n";
+ print $B "<ul>\n";
+ if (-f "$webdir/iso/$isoname-$date.iso") {
+ print $B "<li><a href=iso/$isoname-$date.iso>$isoname-$date.iso</a></li>\n";
+ print $B "<li><a href=iso/$isoname-$date.iso.md5>$isoname-$date.iso.md5</a></li>\n";
+ print $B "<li><a href=iso/$isoname-$date.iso.sha1>$isoname-$date.iso.sha1</a></li>\n";
+ } else {
+ print $B "<li><fond color=red><b>No ISO available</b></font></li>\n";
+ }
+ print $B "<li><a href=iso/$isoname-$date.idx>$isoname-$date.idx</a></li>\n";
+ print $B "</ul>\n";
+ close $B;
+}
+
+
+1;
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..c603fda
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,57 @@
+NAME=bcd
+VERSION=3.4
+PERL_VENDORLIB=$(shell eval "`perl -V:installvendorlib`"; echo $$installvendorlib)
+
+ALL=
+PM=Bcd.pm Common.pm Genisoimage.pm Isolinux.pm Media.pm Stagex.pm Resign.pm
+POD=${name}.pod
+
+all: man tex
+ #pdf
+
+clean:
+ rm -rf *~
+ rm -rf BCD/*~
+ rm -rf lists/*~
+ rm -rf doc/*~
+ rm -rf ${NAME}.1.lzma
+ cd doc && rm -rf *.toc *.out *.log *.aux
+
+cleandist: clean
+ rm -rf $(NAME)-$(VERSION) $(NAME)-$(VERSION).tar.bz2
+
+install: $(ALL) man
+ install -d $(PREFIX)/usr/bin
+ install bcd.pl $(PREFIX)/usr/bin/bcd
+ install -m755 check_sign_by_path.pl $(PREFIX)/usr/bin/
+ install -m755 resign_rpm_by_path.pl $(PREFIX)/usr/bin/
+ install -d $(PREFIX)/$(PERL_VENDORLIB)/BCD
+ install BCD/*.pm $(PREFIX)/$(PERL_VENDORLIB)/BCD
+ install doc/${NAME}.pod $(PREFIX)/$(PERL_VENDORLIB)
+ install -d $(PREFIX)/usr/share/man/man1
+ install doc/${NAME}.1.lzma $(PREFIX)/usr/share/man/man1/
+ install doc/conf.xml.1.lzma $(PREFIX)/usr/share/man/man1/
+
+man:
+ pod2man doc/${NAME}.pod > doc/${NAME}.1
+ pod2man doc/conf.xml.pod > doc/conf.xml.1
+ lzma -f doc/${NAME}.1
+ lzma -f doc/conf.xml.1
+
+tex:
+ cd doc && pod2latex ${NAME}.pod
+
+pdf:
+ cd doc && latex2pdf howto_bcd.tex
+
+tar: export
+ tar cjf $(NAME)-$(VERSION).tar.bz2 $(NAME)-$(VERSION)
+ rm -rf $(NAME)-$(VERSION)
+# tar cvfj bcd-${VERSION}.tar.bz2 .
+
+dist: cleandist export tar
+
+export:
+ svn export -q -rBASE . $(NAME)-$(VERSION)
+
+dist: cleandist export tar
diff --git a/README b/README
new file mode 100644
index 0000000..fb4a899
--- /dev/null
+++ b/README
@@ -0,0 +1,90 @@
+BCD a new tool to build Mandriva ISO
+
+This tool has been fully writen from scratch.
+I spend a lot of time to understand how to use
+mkcd and all this secrets... i am now a master
+of mkcd, but mkcd's design is quite old
+and a lot of features are no more used.
+Morever adding the suggest support was a pain,
+(they are still some bugs with 64b arch and
+i don't know why...).
+
+I write some specifications for this new tools:
+http://wiki.mandriva.com/en/Development/Tasks/Packaging/Tools/mkcd/Specification
+
+Major problem of Mkcd was the understanding
+of the deps algo... so now to avoid
+the problem of multi-media with sub-media like
+updates and so on... i use urpmi wich
+is the greatest tool i know to solve all
+kinds of conflicts, deps and other rpm problem.
+
+result:
+it takes me now less that 1 minute to
+build an ISO of 650 mo with a Mandrva's repositery
+with release and updates media !
+It's really better than the previous 5 minutes,
+and i do not need to take care of release
+of software (especially update) because urpmi
+kow how to handle them :)
+
+
+NOTE : Your user MUST be sudoers to use urpmi !
+
+
+CAUTION: XML syntax is strict.
+i highly recommand to base your conf on the one provided
+with this packages.
+
+FEATURES:
+- configuration file in XML format
+- use of genhdlist2 with file-deps
+- support the add of isolinux entry
+- change the theme on all.rdz files
+- just need an input and an exclude file
+- write media.cfg
+- use custom rpmsrate of compssusers.pl
+- all sub-media supported (updates, testing...)
+- iso HEADER
+- md5 in a file
+- create a product.id file
+- create a VERSION file
+- support of no-suggests option per media
+- support extra external media with hdlists
+
+
+This tool is not able to:
+- calculate the target size of an ISO
+- support dualarch
+- spread packages on multi-CD
+- md5 in iso header
+
+
+Typical MEDIA list from an MDV repo:
+Main
+Main Updates
+Main Testing
+Main Backports
+Main debug
+Main Updates debug
+Main Testing debug
+Main Backports debug
+Contrib
+Contrib Updates
+Contrib Testing
+Contrib Backports
+Contrib debug
+Contrib Updates debug
+Contrib Testing debug
+Contrib Backports debug
+Non-free
+Non-free Updates
+Non-free Testing
+Non-free Backports
+debug_non-free_release
+debug_non-free_updates
+debug_non-free_testing
+debug_non-free_backports
+Restricted
+Restricted Updates
+
diff --git a/bcd.pl b/bcd.pl
new file mode 100755
index 0000000..721f3a9
--- /dev/null
+++ b/bcd.pl
@@ -0,0 +1,9 @@
+#!/usr/bin/perl -w
+
+use strict;
+
+# internal lib
+use BCD::Bcd;
+use BCD::Common;
+
+main_bcd();
diff --git a/bcd.xml b/bcd.xml
new file mode 100644
index 0000000..28ed2a6
--- /dev/null
+++ b/bcd.xml
@@ -0,0 +1,185 @@
+<?xml version='1.0'?>
+
+<productname desc="The Linux product">
+ <nameid>mandriva-linux-free</nameid>
+ <!-- you should really care about this parameter, how many urpmq could you launch at the same time ? -->
+ <nb_fork>10</nb_fork>
+ <!-- you must specify on wich distrib this iso will be built -->
+ <based_on>2010.1</based_on>
+ <!-- -->
+ <arch>i586</arch>
+ <repo desc="Where is the repositery of the distribution">
+ <path>/mnt/ken/dis/</path>
+ </repo>
+ <workdir desc="Where is my working dir">
+ <path>/home/plop/build_bcd</path>
+ </workdir>
+ <tocopy_file>tocopy_plop</tocopy_file>
+ <isolinux desc="isolinux info">
+ <defaultpath>isolinux</defaultpath>
+ <!--<fullpath></fullpath>-->
+ <!-- add hdt entry in syslinux.cfg -->
+ <entry name="hdt" desc="Main media">
+ <bin>/usr/lib/syslinux/hdt.c32</bin>
+ <label>hdt</label>
+ <kernel>hdt.c32</kernel>
+ <append>modules=modules.pci</append>
+ </entry>
+ <!-- keep this entry to create an array ref -->
+ <entry></entry>
+ <tocopy name="pcimap">
+ <file>/lib/modules/2.6.32-server-1mnb/modules.pcimap</file>
+ </tocopy>
+ <tocopy name="ids">
+ <file>/usr/share/pci.ids</file>
+ </tocopy>
+ <tocopy></tocopy>
+ </isolinux>
+ <installer desc="path to the Mandriva installer (stage1/stage2)">
+ <defaultpath>install</defaultpath>
+ <!--<fullpath></fullpath>-->
+ <advertising>
+ <defaultpath>advertising</defaultpath>
+ <!--<fullpath></fullpath>-->
+ </advertising>
+ </installer>
+
+ <!-- theme must be available to path altx/all.rdz files -->
+ <theme name="mandriva-release-Free">
+ <bootsplash>Mandriva-Free</bootsplash>
+ <bootsplash_path>/usr/share/bootsplash</bootsplash_path>
+ <gfxboot_path>/usr/share/gfxboot</gfxboot_path>
+ </theme>
+
+ <media desc="media to take into account to build the ISO">
+ <!-- WARNING thie media must be named "Main" because main media is mandatory for all other media-->
+ <!-- Morever the "Main" media is always the Name use for an MDV reposiery -->
+ <!-- futur feature will provide a way to specify another name for the basic repo of an MDV distribution -->
+ <list name="Main" desc="Main media">
+ <!-- MANDATORY list of wanted packages on the iso -->
+ <input name="base">
+ <file>lists/input_main</file>
+ </input>
+ <!-- to create an array you must keep this even if it is empty -->
+ <input name="extra">
+ <file>lists/input_main_extra</file>
+ </input>
+ <!-- external media repositery with hdlists -->
+ <external name="corpo">
+ <fullpath_mediadir>/home/plop/pieces/corpo</fullpath_mediadir>
+ </external>
+ <!-- MANDATORY list of unwanted packages on the iso -->
+ <exclude name="exclude">
+ <file>lists/exclude_main</file>
+ </exclude>
+ <!-- to create an array you must keep this even if it is empty -->
+ <exclude name="extra">
+ <file>lists/exclude_main_extra</file>
+ </exclude>
+ <!-- nosuggests options should be yes or no -->
+ <nosuggests>no</nosuggests>
+ <!-- will be taken in {repo}{version}{arch}/media -->
+ <mediadir>main</mediadir>
+ <destmedia>main</destmedia>
+ <!--
+ <fullpath_mediadir>/home/plop/iso/final/t/i586/media/main</fullpath_mediadir>
+ -->
+ <pubkey>release/media_info/pubkey</pubkey>
+ <release>yes</release>
+ <updates>yes</updates>
+ <backport>no</backport>
+ <testing>no</testing>
+ </list>
+ <list name="Contrib" desc="Contrib media">
+ <!-- Supp media needed to install packages from this media, usefull for external media
+ wich need main and contrib, use the urpmi syntax of \-\-media (no space, media separated by coma)
+ <media_supp>Main,Main Updates,Contrib,Contrib Updates</media_supp>
+ -->
+ <input name="base">
+ <file>lists/input_contrib</file>
+ </input>
+ <!-- to create an array you must keep this even if it is empty -->
+ <input name="extra">
+ <file>lists/input_contrib_extra</file>
+ </input>
+ <!-- MANDATORY list of unwanted packages on the iso -->
+ <exclude name="exclude">
+ <file>lists/exclude_contrib</file>
+ </exclude>
+ <!-- to create an array you must keep this even if it is empty -->
+ <exclude name="extra">
+ <file>lists/exclude_contrib_extra</file>
+ </exclude>
+ <!-- nosuggests options should be yes or no -->
+ <nosuggests>no</nosuggests>
+ <!-- will be taken in {repo}{version}{arch}/media -->
+ <mediadir>contrib</mediadir>
+ <destmedia>contrib</destmedia>
+ <!--
+ <fullpath_mediadir>/home/plop/build/2009.1/100/i586/media/contrib</fullpath_mediadir>
+ -->
+ <pubkey>release/media_info/pubkey</pubkey>
+ <release>yes</release>
+ <updates>yes</updates>
+ <backport>no</backport>
+ <testing>no</testing>
+ </list>
+ <!-- keep this entry to create an array ref -->
+ <list></list>
+ </media>
+
+ <mediainfo desc="All files relatives to media_info dir">
+ <!-- since 2009.1 we dont need hdlist anymore -->
+ <version>2010.1</version>
+ <!-- set fullpath if youy want to use an files in a non MDV repositery -->
+ <!--<fullpath></fullpath>-->
+ <mediainfo_dir>media/media_info</mediainfo_dir>
+ <rpmsrate>rpmsrate</rpmsrate>
+ <compssusers>compssUsers.pl</compssusers>
+ <filedeps>file-deps</filedeps>
+ <filter>lists/extra-filter</filter>
+ <urpmi_option>-a</urpmi_option>
+ <askmedia desc="add for other media ?">
+ <todo>yes</todo>
+ </askmedia>
+ <suppl desc="add an external media ?">
+ <todo>yes</todo>
+ </suppl>
+ <xmlinfo>
+ <todo>no</todo>
+ </xmlinfo>
+ </mediainfo>
+
+ <iso>
+ <tag>alpha1</tag>
+ <minor>0</minor>
+ <subversion>1</subversion>
+ <product>Download</product>
+ <branch>Cooker</branch>
+ <type>basic</type>
+ <!-- dual arch not yet supported -->
+ <dualarch>no</dualarch>
+ <!-- SIZE is not YET USED !!! -->
+ <size>700</size>
+ <!-- media.cfg will be stored on genisoimage->{builddir}/{nameid}/{arch} -->
+ <mediacfg>media/media_info/media.cfg</mediacfg>
+ <hdlist>yes</hdlist>
+ <synthesis>yes</synthesis>
+ <header desc="Iso header info">
+ <systemid>Mandriva Linux</systemid>
+ <volumeid>FREE-20101-i586</volumeid>
+ <volumesetid>Mandriva Linux - 2010 Spring (Free) - i586 DVD</volumesetid>
+ <publisherid>Mandriva</publisherid>
+ <datapreparer>Mandriva-Linux</datapreparer>
+ <applicationid>Mandriva Linux - 2010 Spring (Free)</applicationid>
+ <copyrightid>Mandriva Linux</copyrightid>
+ </header>
+ <genisoimage desc="iso generation tool">
+ <options>-f -r -J -hide-rr-moved -nobak -cache-inodes -no-emul-boot -boot-load-size 4 </options>
+ <bootcat>isolinux/boot.cat</bootcat>
+ <!-- builddir and destdir will always use the workdir -->
+ <builddir>build</builddir>
+ <isodir>iso</isodir>
+ </genisoimage>
+ </iso>
+</productname>
diff --git a/check_sign_by_path.pl b/check_sign_by_path.pl
new file mode 100755
index 0000000..ca2c131
--- /dev/null
+++ b/check_sign_by_path.pl
@@ -0,0 +1,62 @@
+#!/usr/bin/perl -w
+
+use strict;
+use Parallel::ForkManager;
+use File::Glob ':glob';
+use File::Basename;
+
+#rpm --checksig -v ~/pieces/2010.1/i586/media/main/release/basesystem-2010.0-2mdv2010.1.i586.rpm
+# Header V3 DSA signature: OK, key ID 26752624
+# Header SHA1 digest: OK (fdeb18c37115229582c4b42dba7d834c7b82bc8c)
+# MD5 digest: OK (74cee8f749ae4443cb6dae3b65cc5a6e)
+# V3 DSA signature: OK, key ID 26752624
+
+#gpg -a pubkey_main
+#pub 1024D/26752624 2003-12-10 MandrakeCooker <cooker@linux-mandrake.com>
+#sub 1024g/E5CC3CAA 2003-12-10
+
+my $NB_FORK=15;
+my $path = $ARGV[0];
+#my $key = $ARGV[1];
+
+$ARGV[0] or die "First arg must be a path to rpm\n";
+#$ARGV[1] or die "Second arg must be a the key (ie: 26752624)\n";
+
+my $B;
+my $convert = $path;
+$convert =~ tr|\/|_|;
+my $log = "log_check_sign_$convert.log";
+system("cp /dev/null -f $log");
+my $pm = new Parallel::ForkManager($NB_FORK);
+my @list_pkg = glob("$path/*.rpm");
+my $count = @list_pkg;
+my $key = `gpg -a $path/media_info/pubkey | grep pub | cut -d "/" -f 2 | cut -d " " -f 1`;
+print "$count transactions to do ... be patient !!!!\n";
+my $status = "0";
+open $B, ">>$log";
+foreach my $pkg (@list_pkg) {
+ $pkg or next;
+ my $basename_pkg = basename($pkg);
+ $status++;
+ my $pid = $pm->start and next;
+ print("$basename_pkg ($status/$count)\n");
+ #my @command = `LC_ALL=C rpm --rcfile=$rpmrc --checksig -v $pkg | grep "key ID"`;
+ my @command = `LC_ALL=C rpm --checksig -v $pkg | grep "key ID"`;
+ foreach (@command) {
+ if ($_ =~ /$key/) {
+ # dont print if it is OK
+ # print "$pkg signature OK\n";
+ last;
+ } else {
+ print "$pkg signature NOK\n";
+ print $B "$pkg NOK\n";
+ last;
+ }
+ next;
+ }
+ $pm->finish;
+}
+#print "Waiting for the end of some check...\n";
+$pm->wait_all_children;
+close $B;
+#print "all check are done...\n";
diff --git a/compare_idx b/compare_idx
new file mode 100755
index 0000000..f86fafd
--- /dev/null
+++ b/compare_idx
@@ -0,0 +1,27 @@
+#!/bin/sh
+# quiqk script to compare 32 and 64 IDX file
+# usefull to compare dual CD and free32 and free64 dvd
+
+TMPDIR=/tmp/compare_idx
+
+if [ -z "$1" ]; then
+ echo "first arg must be a 32 IDX file"
+ exit 1
+fi
+if [ -z "$2" ]; then
+ echo "Second arg must be a 64 IDX file"
+ exit 1
+fi
+
+
+IDX32=$1
+IDX64=$2
+
+rm -rf $TMPDIR/*ok
+mkdir -p $TMPDIR
+
+
+cat $IDX32 | cut -d " " -f 2 | sed -e "s/i586//" | sort > $TMPDIR/IDX32_1_ok
+cat $IDX64 | cut -d " " -f 2 | sed -e "s/x86_64//" | sed -e "s/\/lib64/\/lib/" | sort > $TMPDIR/IDX64_2_ok
+
+diff -rau $TMPDIR/IDX32_1_ok $TMPDIR/IDX64_2_ok
diff --git a/create_dual.sh b/create_dual.sh
new file mode 100755
index 0000000..9797ed9
--- /dev/null
+++ b/create_dual.sh
@@ -0,0 +1,107 @@
+#!/bin/sh
+
+TAG=farman
+VERSION=2010-spring
+VV=2010.1
+
+./bcd.pl dual.xml all copy noiso nodoble
+./bcd.pl dual64.xml all copy noiso nodoble
+
+rm -vf $HOME/build_bcd/build/mandriva-linux-free-dual-$VERSION-i586/i586/install/images/boot.iso
+rm -rvf $HOME/build_bcd/build/mandriva-linux-free-dual-$VERSION-i586/i586/install/images/alternatives
+rm -vf $HOME/build_bcd/build/mandriva-linux-free-dual-$VERSION-x86_64/x86_64/install/images/boot.iso
+rm -vrf $HOME/build_bcd/build/mandriva-linux-free-dual-$VERSION-x86_64/x86_64/install/images/alternatives
+
+sync
+
+du -sh $HOME/build_bcd/build/mandriva-linux-free-dual-$VERSION-i586/i586
+du -sh $HOME/build_bcd/build/mandriva-linux-free-dual-$VERSION-x86_64/x86_64
+
+rm -rf $HOME/build_bcd/build/mandriva-linux-free-dual-$VERSION
+rm -rvf $HOME/build_bcd/iso/mandriva-linux-free-dual-$VERSION
+mkdir -p $HOME/build_bcd/build/mandriva-linux-free-dual-$VERSION
+mkdir -p $HOME/build_bcd/iso/mandriva-linux-free-dual-$VERSION
+
+cp -af $HOME/build_bcd/build/mandriva-linux-free-dual-$VERSION-i586/i586 $HOME/build_bcd/build/mandriva-linux-free-dual-$VERSION
+cp -af $HOME/build_bcd/build/mandriva-linux-free-dual-$VERSION-x86_64/x86_64 $HOME/build_bcd/build/mandriva-linux-free-dual-$VERSION
+
+cp -af /mnt/pieces/pieces/$VV/i586/dosutils $HOME/build_bcd/build/mandriva-linux-free-dual-$VERSION/
+cp -af /mnt/pieces/pieces/$VV/i586/autorun.inf $HOME/build_bcd/build/mandriva-linux-free-dual-$VERSION/
+
+cd $HOME/build_bcd/build/mandriva-linux-free-dual-$VERSION/x86_64/media/main
+
+for i in *noarch.rpm
+do
+ if [ -f "../../../i586/media/main/$i" ];then
+ echo $i
+ echo "erase package $i"
+ rm -vf $i
+ echo "link with the i586 one"
+ ln -sf ../../../i586/media/main/$i .
+ else
+ echo "no ../../../i586/media/main/$i package"
+ fi
+done
+
+cat >> $HOME/build_bcd/build/mandriva-linux-free-dual-$VERSION/i586/isolinux/isolinux.cfg <<EOF
+label harddisk64
+ localboot 0x80
+label linux64
+ kernel /x86_64/isolinux/alt0/vmlinuz
+ append initrd=/x86_64/isolinux/alt0/all.rdz automatic=method:cdrom vga=788 splash=silent
+label vgalo64
+ kernel /x86_64/isolinux/alt0/vmlinuz
+ append initrd=/x86_64/isolinux/alt0/all.rdz automatic=method:cdrom vga=785
+label vgahi64
+ kernel /x86_64/isolinux/alt0/vmlinuz
+ append initrd=/x86_64/isolinux/alt0/all.rdz automatic=method:cdrom vga=791
+label text64
+ kernel /x86_64/isolinux/alt0/vmlinuz
+ append initrd=/x86_64/isolinux/alt0/all.rdz automatic=method:cdrom text
+label rescue64
+ kernel /x86_64/isolinux/alt0/vmlinuz
+ append initrd=/x86_64/isolinux/alt0/all.rdz automatic=method:cdrom rescue
+label noacpi64
+ kernel /x86_64/isolinux/alt0/vmlinuz
+ append initrd=/x86_64/isolinux/alt0/all.rdz automatic=method:cdrom vga=788 splash=silent acpi=off
+label hdt64
+ kernel /x86_64/isolinux/hdt.c32
+ append modules=modules.pci
+label alt064
+ kernel /x86_64/isolinux/alt0/vmlinuz
+ append initrd=/x86_64/isolinux/alt0/all.rdz vga=788 splash=silent
+label alt164
+ kernel /x86_64/isolinux/alt1/vmlinuz
+ append initrd=/x86_64/isolinux/alt1/all.rdz vga=788 splash=silent
+label memtest64
+ kernel memtest
+EOF
+
+#cp -avf $HOME/bcd/compssUsers.pl $HOME/build_bcd/build/mandriva-linux-free-dual-$TAG-$VERSION/i586/media/media_info/compssUsers.pl
+#cp -avf $HOME/bcd/compssUsers.pl $HOME/build_bcd/build/mandriva-linux-free-dual-$TAG-$VERSION/x86_64/media/media_info/compssUsers.pl
+cat $HOME/build_bcd/build/mandriva-linux-free-dual-$VERSION-i586/i586/pkg-$VERSION-$TAG.idx >> \
+ $HOME/build_bcd/build/mandriva-linux-free-dual-$VERSION/mandriva-linux-free-$VERSION-dual.idx
+cat $HOME/build_bcd/build/mandriva-linux-free-dual-$VERSION-x86_64/x86_64/pkg-$VERSION-$TAG.idx >> \
+ $HOME/build_bcd/build/mandriva-linux-free-dual-$VERSION/mandriva-linux-free-$VERSION-dual.idx
+
+
+genisoimage -f -r -J -hide-rr-moved -nobak -cache-inodes -no-emul-boot -boot-load-size 4 \
+ -A 'Mandriva Linux - 2010 Spring (Free)' \
+ -publisher 'Mandriva' \
+ -sysid 'Mandriva Linux' \
+ -p 'Mandriva-Linux BCD' \
+ -volset 'Mandriva Linux - 2010 Spring (Free) - DUAL CD' \
+ -V 'FREE-2010S-DUAL' \
+ -o '/home/plop/build_bcd/iso/mandriva-linux-free-dual-2010-spring/mandriva-linux-free-2010-spring-dual.iso' \
+ -b i586/isolinux/isolinux.bin \
+ -boot-info-table \
+ -quiet \
+ $HOME/build_bcd/build/mandriva-linux-free-dual-$VERSION/
+
+du -sh $HOME/build_bcd/iso/mandriva-linux-free-dual-$VERSION/mandriva-linux-free-$VERSION-dual.iso
+echo "$HOME/build_bcd/build/mandriva-linux-free-dual-$VERSION/mandriva-linux-free-$VERSION-dual.idx"
+cd $HOME/build_bcd/iso/mandriva-linux-free-dual-$VERSION/
+isohybrid -fatfirst $HOME/build_bcd/iso/mandriva-linux-free-dual-$VERSION/mandriva-linux-free-$VERSION-dual.iso
+cp $HOME/build_bcd/build/mandriva-linux-free-dual-$VERSION/mandriva-linux-free-$VERSION-dual.idx .
+md5sum mandriva-linux-free-$VERSION-dual.iso > mandriva-linux-free-$VERSION-dual.iso.md5
+sha1sum mandriva-linux-free-$VERSION-dual.iso > mandriva-linux-free-$VERSION-dual.iso.sha1
diff --git a/doc/bcd.pod b/doc/bcd.pod
new file mode 100644
index 0000000..237d929
--- /dev/null
+++ b/doc/bcd.pod
@@ -0,0 +1,158 @@
+=head1 NAME
+
+bcd tools - A simple program to generate Mandriva's ISO
+
+=head1 SYNOPSIS
+
+bcd configuration.xml [options]
+
+=cut
+
+=head1 OPTIONS
+
+=over 8
+
+=item B<First arg must be:>
+
+ The XML configuration file
+
+=item B<Second arg must be:>
+
+ stagex: update the stage1/stage2 in builddir
+ isolinux: update the isolinux in builddir
+ clean: clean the builddir and isodir
+ media: create the list of wanted packages, create all media in builddir,
+ link/copy packages in builddir/media, create the media.cfg,
+ and generate the hdtlist/synthesis
+ gendistrib: create the hdlists/synthesis in builddir (depends on the based_on tag)
+ rpmcheck: check the hdlist in the buildir
+ list: list all media and list of input/exclude (from the xml conf file)
+ mediarepo: list all medias availables in the repositery
+ checkrepo: rpmcheck main hdlists in the repositery
+ all: run all stage in order to get an ISO
+ md5: create MD5 sum of the ISO
+ resign: resign all rpms with a password and a gpg file
+ clean: clean previous urpmq log file
+ doble: check doble rpm in the media build_dir
+ kernel: compare kernel and keep the latest one
+ nodoble: don't check doble rpm in the media build_dir
+ html: generate a log report web page
+ info: parse the configuration file (usefull to check the XML syntax)
+ iso: create the final ISO from the builddir
+ verbose: be more verbose
+
+=item B<extra arg:>
+
+ noiso: don't build the iso (md5, isohybrid) in case of 'all' process
+ copy: copy rpm instead of link them from the repositery
+
+=back
+
+=head1 EXAMPLES
+
+the folowing example will do all step to create an ISO:
+
+ bcd mdv-20091.xml all
+
+the following example will create the build dir without creating ISO:
+ bcd.pl mdv-20091.xml all noiso
+
+same as above but copy packages instead of link them from the repositery:
+ bcd.pl mdv-20091.xml all noiso copy
+
+the following will update the isolinux in the build directory:
+ bcd.pl mdv-20091.xml isolinux
+
+to check the main hdlist in the repositery with rpmcheck
+ bcd.pl mdv-20091.xml checkrepo
+
+clean the builddir and isodir
+ bcd.pl mdv-20091.xml clean
+
+=cut
+
+=head1 COPYRIGHT
+
+Copyright (C) 2009-2010 Mandriva <aginies_@_mandriva.com>
+
+=cut
+
+=head1 DESCRIPTION
+
+BCD is used to create Mandriva ISO.
+features are:
+- configuration file is in XML format
+- use of genhdlist2 with file-deps
+- support the add of an isolinux entry
+- change the theme on all.rdz files
+- just need an input and an exclude file for package list
+- write media.cfg
+- support of custom rpmsrate of compssusers.pl
+- support of custom advertising
+- support of custom stage2
+- extra filter to remove doble packages (keep latest version)
+- all sub-media supported (updates, testing...)
+- create the iso HEADER
+- use of urpmq to calculate deps/conflicts/suggests
+- support of no-suggests option per media
+- support extra external media with hdlists
+- create an md5 file
+- create a product.id file
+- create a VERSION file
+- speed up the process using previous urpmq --requires-recursive query
+
+=cut
+
+=head1 USER conf
+
+Your user must have some sudo root right to be able to use chroot, urpmi,
+rm, mount umount tools. IE: for user plop in /etc/sudoers file
+
+ plop ALL=(root) NOPASSWD:/bin/mount, /bin/umount, \
+ /usr/sbin/chroot, \
+ /usr/sbin/urpmi, \
+ /usr/sbin/urpmi.addmedia, \
+ /usr/sbin/urpmi.removemedia, \
+ /bin/rm
+
+Moreover to speed up the process, each urpmq --requires-recursive queries
+will be stored in /var/lib/bcd/ directory, so you should add an access to
+this directory for the user you use.
+
+ chown plop.users /var/lib/bcd/
+
+=cut
+
+=head1 LISTS
+
+input list:
+list of rpm needed on the CD. Those list should contains the name
+or the provides of a package. You may also use a CAT_XXX from the
+rpmsrate file, with the wheigth parameter.
+
+ ie: of lists/input_main
+ INSTALL 1
+ CAT_X 1
+ CAT_GNOME 1
+ CAT_AUDIO 1
+ aumix
+ task-lxde
+
+exclude list:
+list of unwanted packages on the CD. Be carreful to do not exclude mandatory packages
+or you CD will be unusable. Rpmcheck will report any bug in hdlists at the end of
+the 'media' step process. Packages listed in exclude list will be removed from the
+DVD at the end of the build process.
+
+extra-filter:
+list of RPM you want to do not compare and the keep the latest one.
+Usefull if you want to keep more than one version of a package.
+
+=cut
+
+=head1 ISSUE
+
+ - if you want to build ISO for x86_64 you must used an x86_64 system (due to urpmi)
+ - if hdlist/synthesis are corrupted in your repositery, you can't build ISO
+
+=cut
diff --git a/doc/conf.xml.pod b/doc/conf.xml.pod
new file mode 100644
index 0000000..063f1e3
--- /dev/null
+++ b/doc/conf.xml.pod
@@ -0,0 +1,268 @@
+=head1 conf.xml
+
+Example of a commented conf.xml file. Keep in mind that most of those
+parameters are correct, and you don't need to change whole of them.
+Examples are available in this package, so please use one of them to
+base your configuration.
+
+You should only change those one:
+{nameid}
+{version}
+{arch}
+{repo}{path}
+{media}{list}*
+{iso}{header}*
+
+Fully commented file:
+---------------------
+first it's an xml file:
+ <?xml version='1.0'?>
+
+name of the product
+ <productname desc="The Linux product">
+
+identification of the product
+ <nameid>XtreemOS</nameid>
+
+you should really care about this parameter, how many urpmq could you launch at the same time ?
+10 is an high value, use it only on multi-core computer.
+ <nb_fork>10</nb_fork>
+
+If you want to resign you packages, define in wich file you store the password to sign RPMS, and the
+gnupg file used to sign them. BCD can only sign for the moment all packages with the same key. It will
+be able to sign later a media with a specific public key.
+ <signature>/home/xtreemos/.signature.gpg</signature>
+ <rpmrc>/home/xtreemos/.rpmrc</rpmrc>
+
+based_on parameter define on wich version of Mandriva this product will be built.
+This parameter define if we need synthesis or hdlists (since 2009.1 only synthesis are needed)
+It will be use to get the path of the Mandriva repositery
+ <based_on>2009.0</based_on>
+
+Arch parameter is mandatory, it will be also used to get the path of the MDV repositery
+ <arch>i586</arch>
+
+path to the repositery
+ <repo desc="Where is the repositery of the distribution">
+ <path>/mnt/BIG/dis</path>
+ </repo>
+
+so the full path of the Mandriva repositery will be in our example
+ </mnt/BIG/dis/2009.0/i586>
+
+workdir is where you want to store the result of the build
+ <workdir desc="Where is my working dir">
+ <path>/home/xtreemos/build_bcd</path>
+ </workdir>
+
+basename of log files
+ <tocopy_file>tocopy_plop</tocopy_file>
+
+all Isolinux information
+ <isolinux desc="isolinux info">
+ <defaultpath>isolinux</defaultpath>
+
+if you want to use proprietary firmware in stage1 (from the non-free/initrd-firmware package) set the option to yes
+ <firmware>yes</firmware>
+
+if you want to point to a custom isolinux directory
+ <fullpath>/home/xtreemos/export_i386/isolinux</fullpath>
+
+if you want to add a entry in your isolinux.cfg
+ <!-- add hdt entry in syslinux.cfg -->
+ <entry name="hdt" desc="Main media">
+ <bin>/usr/lib/syslinux/hdt.c32</bin>
+ <label>hdt</label>
+ <kernel>hdt.c32</kernel>
+ <append>modules=modules.pci</append>
+ </entry>
+
+some section are mandatory to keep the array structure of the xml file
+ <!-- keep this entry to create an array ref -->
+ <entry></entry>
+
+if you want to copy extra files to the isolinux buildir
+ <tocopy name="pcimap">
+ <file>/lib/modules/2.6.31-server-2mnb/modules.pcimap</file>
+ </tocopy>
+ <tocopy name="ids">
+ <file>/usr/share/pci.ids</file>
+ </tocopy>
+ <tocopy></tocopy>
+ </isolinux>
+
+all information relatives to the installer (stage2)
+ <installer desc="path to the Mandriva installer (stage1/stage2)">
+ <defaultpath>install</defaultpath>
+
+if you want to use a custom installer
+ <fullpath>/home/xtreemos/export_i386</fullpath>
+
+path to custom advertising
+ <advertising>
+ <defaultpath>advertising</defaultpath>
+ <fullpath>/home/xtreemos/Build/pieces/advertising</fullpath>
+ </advertising>
+
+full path and name of your patch for stage2 to copy in the buildir/install directory
+ <patch>/home/xtreemos/Build/pieces/patch-oem.pl</patch>
+ </installer>
+
+theme to use to patch all.rdz file
+theme name will be used to install mandriva-release-THEMENAME and avoid
+problem of mixing theme on a same product
+ <!-- theme must be available to path altx/all.rdz files -->
+ <theme name="mandriva-release-Free">
+ <bootsplash>Mandriva-Free</bootsplash>
+ <bootsplash_path>/usr/share/bootsplash</bootsplash_path>
+ <gfxboot_path>/usr/share/gfxboot</gfxboot_path>
+ </theme>
+
+media section will defined wich media you want to use and you want to create on the DVD
+ <media desc="media to take into account to build the ISO">
+ <!-- WARNING this media must be named "Main" because main media is mandatory for all other media-->
+ <!-- Morever the "Main" media is always the Name use for an MDV repositery -->
+ <!-- futur feature will provide a way to specify another name for the basic repo of an MDV distribution -->
+ <!-- use the supp_media option if you needed to use media option of urpmi, usefull for external media
+ wich need main and contrib to be installed, use the urpmi syntax of \-\-media (no space, media separated by coma)
+ <media_supp>Main,Main Updates,Contrib,Contrib Updates</media_supp>-->
+ <list name="Main" desc="Main_media">
+
+drop option is usefull to remove the media before the rpmcheck (usefull for media main32)
+ <drop>yes</drop>
+
+remove_noarch is used to remove all noarch.rpm from a media (usefull for media main32 on pwp64 and free64)
+ <remove_noarch>yes</remove_noarch>
+
+input files
+ <!-- MANDATORY list of wanted packages on the iso -->
+ <input name="base">
+ <file>lists/input_main</file>
+ </input>
+ <input name="lang">
+ <file>lists/languages</file>
+ </input>
+ <!-- to create an array you must keep this even if it is empty -->
+ <input name="xos">
+ <file>lists/xos_list</file>
+ </input>
+
+you can use an external media, but this media must have a media_info directory
+you must use external media if this media is not available in the repositery.
+IE: restricted32 packages on a PowerPack 64bits product
+ <!-- external media repositery with hdlists -->
+ <external name="xos">
+ <fullpath_mediadir>/home/xtreemos/repo_xos/2009.0/i586/media/xtreemos/release</fullpath_mediadir>
+ </external>
+
+Packages unwated on the DVD, they will be removed at the end of the installation process
+ <!-- MANDATORY list of unwanted packages on the iso -->
+ <exclude name="exclude">
+ <file>lists/exclude_main</file>
+ </exclude>
+ <!-- to create an array you must keep this even if it is empty -->
+ <exclude>
+ </exclude>
+
+switch nosuggest options to yes if you don't want to use RPMS's suggests
+ <!-- nosuggests options should be yes or no -->
+ <nosuggests>no</nosuggests>
+
+I will use the media name "mediadir" and put it in the directory media/'destmedia' on the DVD
+ <!-- will be taken in {repo}{version}{arch}/media -->
+ <mediadir>main</mediadir>
+ <destmedia>main</destmedia>
+
+where to find the pubkey in the repositery (the path will be media/'mediadir'/'pubkey')
+If you want to specify a specific file to use as pubkey, leave <pubkey> empty.
+ <pubkey>release/media_info/pubkey</pubkey>
+ <file_pubkey>/path_to_file/the_pubkey</file_pubkey>
+
+if you want to use backports, testing or updates sub-media, set option to yes, note: release media should be mandatory
+ <release>yes</release>
+ <updates>yes</updates>
+ <backport>no</backport>
+ <testing>no</testing>
+ </list>
+ <!-- keep this entry to create an array ref -->
+ <list></list>
+ </media>
+
+all media_info informations are in this section
+ <mediainfo desc="All files relatives to media_info dir">
+
+version will be used to generate a good media.cfg files (we don't use hdlits.cz since 2009.1 release)
+ <version>2009.0</version>
+
+use 'fullpath' parameter to use custom files
+ <!-- set fullpath if you want to use an files in a non MDV repositery -->
+ <fullpath>/home/xtreemos/Build/pieces</fullpath>
+ <mediainfo_dir>media/media_info</mediainfo_dir>
+ <rpmsrate>rpmsrate</rpmsrate>
+ <compssusers>compssUsers.pl</compssusers>
+ <filedeps>file-deps</filedeps>
+
+if you want to add an urpmi options to install packages
+ <urpmi_option>-a</urpmi_option>
+
+If you want to do some extra filter to keep latest release of a packages on the DVD.
+All packages listed in extra-filter are NOT filtered: so if you have more than one
+version of a package in the builddir, it will bypass the rpm comparaison.
+For all other packages available in the builddir, BCD
+will keep the latest one (rpm version comparaison)
+ <filter>lists/extra-filter</filter>
+
+media.cfg options
+ <askmedia desc="add for other media ?">
+ <todo>yes</todo>
+ </askmedia>
+ <suppl desc="add an external media ?">
+ <todo>yes</todo>
+ </suppl>
+ <xmlinfo>
+ <todo>no</todo>
+ </xmlinfo>
+ </mediainfo>
+
+ISO section
+ <iso>
+
+tag name and some extra parameters
+ <tag>rc1</tag>
+ <minor>0</minor>
+ <subversion>1</subversion>
+ <product>Download</product>
+ <branch>Devel</branch>
+ <type>basic</type>
+ <!-- dual arch not yet supported -->
+ <dualarch>no</dualarch>
+ <!-- SIZE is not YET USED !!! -->
+ <size>700</size>
+ <!-- media.cfg will be stored on genisoimage->{builddir}/{nameid}/{arch} -->
+ <mediacfg>media/media_info/media.cfg</mediacfg>
+ <hdlist>yes</hdlist>
+ <synthesis>yes</synthesis>
+
+info used by the genisoimage tool
+ <header desc="Iso header info">
+ <systemid>XtreemOS Linux</systemid>
+ <volumeid>XOS-2.0-i586</volumeid>
+ <volumesetid>XtreemOS Linux - 2.0 - i586 DVD </volumesetid>
+ <publisherid>XtreemOS</publisherid>
+ <datapreparer>XtreemOS-Linux</datapreparer>
+ <applicationid>XtreemOS Linux - 2.0</applicationid>
+ <copyrightid>XtreemOS Linux</copyrightid>
+ </header>
+
+genisoimage paramater
+ <genisoimage desc="iso generation tool">
+ <options>-f -r -J -hide-rr-moved -nobak -cache-inodes -no-emul-boot -boot-load-size 4 </options>
+ <bootcat>isolinux/boot.cat</bootcat>
+ <!-- builddir and destdir will always use the workdir -->
+ <builddir>build</builddir>
+ <isodir>iso</isodir>
+ </genisoimage>
+ </iso>
+ </productname>
+
+=cut
diff --git a/doc/conf.xml.tex b/doc/conf.xml.tex
new file mode 100644
index 0000000..f512179
--- /dev/null
+++ b/doc/conf.xml.tex
@@ -0,0 +1,365 @@
+\section{conf xml}
+
+Example of a commented conf.xml file. Keep in mind that most of those
+parameters are correct, and you don't need to change whole of them.
+Examples are available in this package, so please use one of them to
+base your configuration.
+
+
+You should only change those one:
+\begin{itemize}
+ \item \{nameid\}
+ \item \{version\}
+ \item \{arch\}
+ \item \{repo\}\{path\}
+ \item \{media\}\{list\}*
+ \item \{iso\}\{header\}*
+\end{itemize}
+
+first it's an xml file
+\begin{verbatim}
+<?xml version='1.0'?>
+\end{verbatim}
+
+name of the product
+\begin{verbatim}
+<productname desc="The Linux product">
+\end{verbatim}
+
+identification of the product, used for the name of the final ISO
+\begin{verbatim}
+<nameid>XtreemOS</nameid>
+\end{verbatim}
+
+you should really care about this parameter, how many \textbf{urpmq} could you launch at the same time ?
+10 is an high value, use it only on multi-core computer.
+ \begin{verbatim}
+<nb_fork>10</nb_fork>
+\end{verbatim}
+
+If you want to resign you packages, define in wich file you store the password to sign RPMS, and the
+gnupg file used to sign them. BCD can only sign for the moment all packages with the same key. It will
+be able to sign later a media with a specific public key.
+\begin{verbatim}
+<signature>/home/xtreemos/.signature.gpg</signature>
+<rpmrc>/home/xtreemos/.rpmrc</rpmrc>
+\end{verbatim}
+
+based\_on parameter defines on wich version of Mandriva this product will be built.
+This parameter define if we need synthesis or hdlists (since 2009.1 only synthesis are needed)
+It will be use to get the path of the Mandriva repositery.
+\begin{verbatim}
+<based_on>2009.0</based_on>
+\end{verbatim}
+
+Arch parameter is mandatory, it will be also used to get the path of the Mandriva repositery
+\begin{verbatim}
+ <arch>i586</arch>
+\end{verbatim}
+
+path to the repositery (without version and arch)
+\begin{verbatim}
+ <repo desc="Where is the repositery of the distribution">
+ <path>/mnt/BIG/dis</path>
+ </repo>
+\end{verbatim}
+
+so the full path of the Mandriva repositery will be in our example
+\begin{verbatim}
+ </mnt/BIG/dis/2009.0/i586>
+\end{verbatim}
+
+workdir is where you want to store the result of the build. Two directories
+will be built, \textbf{build} to store the base of the DVD, \textbf{iso} to store the final ISO.
+\begin{verbatim}
+ <workdir desc="Where is my working dir">
+ <path>/home/xtreemos/build_bcd</path>
+ </workdir>
+\end{verbatim}
+
+basename of log files, if you want you can change it, but this option
+should not exist, i should remove it...
+\begin{verbatim}
+ <tocopy_file>tocopy_plop</tocopy_file>
+\end{verbatim}
+
+all Isolinux information
+\begin{verbatim}
+ <isolinux desc="isolinux info">
+ <defaultpath>isolinux</defaultpath>
+\end{verbatim}
+
+if you want to point to a custom \textbf{isolinux} directory
+\begin{verbatim}
+ <fullpath>/home/xtreemos/export_i386/isolinux</fullpath>
+\end{verbatim}
+
+if you want to add a entry in your \textbf{isolinux.cfg}. In this example we add an HDT entry
+(hardware detection tool)
+\begin{verbatim}
+ <!-- add hdt entry in syslinux.cfg -->
+ <entry name="hdt" desc="Main media">
+ <bin>/usr/lib/syslinux/hdt.c32</bin>
+ <label>hdt</label>
+ <kernel>hdt.c32</kernel>
+ <append>modules=modules.pci</append>
+ </entry>
+\end{verbatim}
+
+some section are mandatory to keep the array structure of the xml file
+\begin{verbatim}
+ <!-- keep this entry to create an array ref -->
+ <entry></entry>
+\end{verbatim}
+
+if you want to copy extra files to the isolinux buildir
+\begin{verbatim}
+ <tocopy name="pcimap">
+ <file>/lib/modules/2.6.31-server-2mnb/modules.pcimap</file>
+ </tocopy>
+ <tocopy name="ids">
+ <file>/usr/share/pci.ids</file>
+ </tocopy>
+ <tocopy></tocopy>
+ </isolinux>
+\end{verbatim}
+
+all information relatives to the installer (stage2)
+\begin{verbatim}
+ <installer desc="path to the Mandriva installer (stage1/stage2)">
+ <defaultpath>install</defaultpath>
+\end{verbatim}
+
+if you want to use a custom installer, really usefull if you custom it
+\begin{verbatim}
+ <fullpath>/home/xtreemos/export_i386</fullpath>
+\end{verbatim}
+
+path to custom advertising (images used during slideshow)
+\begin{verbatim}
+ <advertising>
+ <defaultpath>advertising</defaultpath>
+ <fullpath>/home/xtreemos/Build/pieces/advertising</fullpath>
+ </advertising>
+\end{verbatim}
+
+full path and name of your patch for stage2 to copy in the \textbf{buildir/install} directory. This
+is an option, leave it blank if you don't use a patch
+\begin{verbatim}
+ <patch>/home/xtreemos/Build/pieces/patch-oem.pl</patch>
+ </installer>
+\end{verbatim}
+
+Theme to use to patch \textbf{all.rdz} file.
+Theme name will be used to install mandriva-release-THEMENAME and avoid
+problem of mixing theme on a same product
+\begin{verbatim}
+ <!-- theme must be available to path altx/all.rdz files -->
+ <theme name="mandriva-release-Free">
+ <theme>Mandriva-Free</theme>
+ <bootsplash>Mandriva-Free</bootsplash>
+ <bootsplash_path>/usr/share/bootsplash</bootsplash_path>
+ <gfxboot_path>/usr/share/gfxboot</gfxboot_path>
+ </theme>
+\end{verbatim}
+
+media section will defined wich media you want to use and you want to create on the DVD.
+Keep in mind that it works like \textbf{urpmi} and \textbf{urpmq}, if you want to install a package, you need
+all his dependencies, so for some specific package like restricted one on a 64bits product,
+you need to use the extra parameter \begin{verbatim}<media_supp>Main,contrib,main32</media_supp>\end{verbatim}
+to be sure that you will provide all needed deps. For each list bcd will add a media, and will add
+\textbf{updates/backport/testing} if the tag is set to yes. Be sure you use a uniq media name, because \textbf{urpmi}
+will not add a new media with a name wich already exist.
+\begin{verbatim}
+ <media desc="media to take into account to build the ISO">
+ <!-- WARNING this media must be named "Main" because main media is mandatory for all other media-->
+ <!-- Morever the "Main" media is always the Name use for an MDV repositery -->
+ <!-- futur feature will provide a way to specify another name for the basic repo of an MDV distribution -->
+ <!-- use the supp_media option if you needed to use media option of urpmi, usefull for external media
+ wich need main and contrib to be installed, use the urpmi syntax of \-\-media (no space, media separated by coma)
+\end{verbatim}
+
+drop option is usefull to remove the media before the rpmcheck (usefull for media main32)
+\begin{verbatim}
+ <drop>yes</drop>
+\end{verbatim}
+
+remove\_noarch is used to remove all noarch packages from a media (usefull for media main32 on pwp64 and free64)
+\begin{verbatim}
+ <remove_noarch>yes</remove_noarch>
+\end{verbatim}
+
+input list for a specific media
+\begin{verbatim}
+ <media_supp>Main,Main Updates,Contrib,Contrib Updates</media_supp>-->
+ <list name="Main" desc="Main_media">
+ <!-- MANDATORY list of wanted packages on the iso -->
+ <input name="base">
+ <file>lists/input_main</file>
+ </input>
+ <input name="lang">
+ <file>lists/languages</file>
+ </input>
+ <!-- to create an array you must keep this even if it is empty -->
+ <input name="xos">
+ <file>lists/xos_list</file>
+ </input>
+\end{verbatim}
+
+you can use an external media, but this media must have a \textbf{media\_info} directory
+you must use external media if this media is not available in the repositery.
+IE: restricted32 packages on a PowerPack 64bits product. The \textbf{fullpath\_mediadir} option
+must be the full path to RPM (no subdirectory release/updates/backport).
+\begin{verbatim}
+ <!-- external media repositery with hdlists -->
+ <external name="xos">
+ <fullpath_mediadir>/home/xtreemos/repo_xos/2009.0/i586/media/xtreemos/release</fullpath_mediadir>
+ </external>
+\end{verbatim}
+
+Packages unwanted on the DVD are stored in exclude list.
+They will be removed at the end of the installation process.
+Just add the list of those packages in an exclude list.
+\begin{verbatim}
+ <!-- MANDATORY list of unwanted packages on the iso -->
+ <exclude name="exclude">
+ <file>lists/exclude_main</file>
+ </exclude>
+ <!-- to create an array you must keep this even if it is empty -->
+ <exclude>
+ </exclude>
+\end{verbatim}
+
+Switch nosuggest options to yes if you don't want to use RPMS's suggests
+\begin{verbatim}
+ <!-- nosuggests options should be yes or no -->
+ <nosuggests>no</nosuggests>
+\end{verbatim}
+
+I will use the media name 'mediadir' and put it in the directory media/'destmedia' on the DVD.
+\begin{verbatim}
+ <!-- will be taken in {repo}{version}{arch}/media -->
+ <mediadir>main</mediadir>
+ <destmedia>main</destmedia>
+\end{verbatim}
+
+Where to find the pubkey in the repositery (the path will be media/'mediadir'/'pubkey').
+If you want to specify a specific file to use as pubkey, leave <pubkey> empty.
+\begin{verbatim}
+ <pubkey>release/media_info/pubkey</pubkey>
+ <file_pubkey>/path_to_file/the_pubkey</file_pubkey>
+\end{verbatim}
+
+if you want to use backports, testing or updates sub-media, set option to yes.
+Note: release media should be mandatory
+\begin{verbatim}
+ <release>yes</release>
+ <updates>yes</updates>
+ <backport>no</backport>
+ <testing>no</testing>
+ </list>
+ <!-- keep this entry to create an array ref -->
+ <list></list>
+ </media>
+\end{verbatim}
+
+all \textbf{media\_info} informations are in this section
+\begin{verbatim}
+ <mediainfo desc="All files relatives to media_info dir">
+\end{verbatim}
+
+version will be used to generate a good media.cfg files (we don't use hdlits.cz since 2009.1 release)
+\begin{verbatim}
+ <version>2009.0</version>
+\end{verbatim}
+
+use 'fullpath' parameter to use custom rpmsrate/compssusers files
+\begin{verbatim}
+ <!-- set fullpath if you want to use an files in a non MDV repositery -->
+ <fullpath>/home/xtreemos/Build/pieces</fullpath>
+ <mediainfo_dir>media/media_info</mediainfo_dir>
+ <rpmsrate>rpmsrate</rpmsrate>
+ <compssusers>compssUsers.pl</compssusers>
+ <filedeps>file-deps</filedeps>
+\end{verbatim}
+
+If you want to add an \textbf{urpmi} options to install packages. Be carreful
+this can add or remove a lot of packages, and syntax in your list file can
+lead to error. ie: firefox- in a list file without the parameter \textit{-a} will
+lead to an \textbf{urpmi} error, because there is a lot of firefox packages wich
+began with the strings firefox-
+\begin{verbatim}
+ <urpmi_option>-a</urpmi_option>
+\end{verbatim}
+
+If you want to do some extra filter to keep latest release of a packages on the DVD.
+All packages listed in extra-filter are NOT filtered: so if you have more than one
+version of a package in the builddir, it will bypass the rpm comparaison.
+For all other packages available in the builddir, BCD
+will keep the latest one (rpm version comparaison)
+\begin{verbatim}
+ <filter>lists/extra-filter</filter>
+\end{verbatim}
+
+media.cfg options, do a man gendistrib for more info
+\begin{verbatim}
+ <askmedia desc="add for other media ?">
+ <todo>yes</todo>
+ </askmedia>
+ <suppl desc="add an external media ?">
+ <todo>yes</todo>
+ </suppl>
+ <xmlinfo>
+ <todo>no</todo>
+ </xmlinfo>
+ </mediainfo>
+\end{verbatim}
+
+ISO section
+\begin{verbatim}
+ <iso>
+\end{verbatim}
+
+tag name and some extra parameters
+\begin{verbatim}
+ <tag>rc1</tag>
+ <minor>0</minor>
+ <subversion>1</subversion>
+ <product>Download</product>
+ <branch>Devel</branch>
+ <type>basic</type>
+ <!-- dual arch not yet supported -->
+ <dualarch>no</dualarch>
+ <!-- SIZE is not YET USED !!! -->
+ <size>700</size>
+ <!-- media.cfg will be stored on genisoimage->{builddir}/{nameid}/{arch} -->
+ <mediacfg>media/media_info/media.cfg</mediacfg>
+ <hdlist>yes</hdlist>
+ <synthesis>yes</synthesis>
+\end{verbatim}
+
+info used by the genisoimage tool
+\begin{verbatim}
+ <header desc="Iso header info">
+ <systemid>XtreemOS Linux</systemid>
+ <volumeid>XOS-2.0-i586</volumeid>
+ <volumesetid>XtreemOS Linux - 2.0 - i586 DVD </volumesetid>
+ <publisherid>XtreemOS</publisherid>
+ <datapreparer>XtreemOS-Linux</datapreparer>
+ <applicationid>XtreemOS Linux - 2.0</applicationid>
+ <copyrightid>XtreemOS Linux</copyrightid>
+ </header>
+\end{verbatim}
+
+genisoimage paramaters
+\begin{verbatim}
+ <genisoimage desc="iso generation tool">
+ <options>-f -r -J -hide-rr-moved -nobak -cache-inodes -no-emul-boot -boot-load-size 4 </options>
+ <bootcat>isolinux/boot.cat</bootcat>
+ <!-- builddir and destdir will always use the workdir -->
+ <builddir>build</builddir>
+ <isodir>iso</isodir>
+ </genisoimage>
+ </iso>
+ </productname>
+\end{verbatim}
diff --git a/doc/howto_bcd.pdf b/doc/howto_bcd.pdf
new file mode 100644
index 0000000..f21a855
--- /dev/null
+++ b/doc/howto_bcd.pdf
Binary files differ
diff --git a/doc/howto_bcd.tex b/doc/howto_bcd.tex
new file mode 100644
index 0000000..5cff1dc
--- /dev/null
+++ b/doc/howto_bcd.tex
@@ -0,0 +1,594 @@
+\documentclass[oneside,a4paper,10pt]{article}
+\usepackage{times}
+\usepackage{graphicx}
+\usepackage[T1]{fontenc}
+\usepackage[english]{babel}
+\usepackage{fullpage}
+
+\begin{document}
+
+
+\title{HOW TO use BCD}
+\author{Antoine Ginies}
+\begin{center}
+ \includegraphics{./mandriva-logo.jpg}
+ % mandriva-logo.jpg: 950x239 pixel, 72dpi, 33.51x8.43 cm, bb=0 0 950 239
+\end{center}
+\maketitle
+
+\tableofcontents
+
+\section{Summary}
+
+BCD try to be a simple tool to build ISO using \textbf{urpmi} to create a mini
+chroot of the future system, and \textbf{urpmq} command to calculate dependencies
+of packages on the future DVD/CD.
+
+\section{The environment}
+
+\begin{flushleft}
+BCD is available in Mandriva subversion repository:
+http://svn.mandriva.com/svn/soft/build\_system/bcd
+\end{flushleft}
+
+\begin{flushleft}
+Some release of BCD has been packaged, but you should use the svn version, because this tool is under development, and really unstable....
+All previous XML configuration's file are compatibles with previous version of BCD.
+\end{flushleft}
+
+\begin{flushleft}
+ Create a user on the system:
+ \begin{verbatim}
+adduser plop
+ \end{verbatim}
+\end{flushleft}
+
+\begin{flushleft}
+ You must create a directory to store all \textbf{urpmq} queries. All queries done by \textbf{urpmq} per package
+are stored in this directory + product-name-release-arch. To speed up the process of creating ISO,
+next time you run BCD, it will check for each package in input list if there is a file wich contains the result
+of the urpmq queries, if BCD found one then it will use it, else it will redo an
+\textbf{urpmq --requires-recursives --sources package\_name} and store the result in a new file.
+So if you have update your repository, you should clean this directory. If you have update some packages,
+you should remove file relative to those packages, to redo the \textbf{urpmq} queries otherwise BCD will use
+the old result of the \textbf{urpmq} queries, and this can lead to error if deps are no more the same. Moreover
+if you change the tag \textbf{<nosuggests></nosuggests>} to yes or no, you must erase all
+your previous queries.
+
+ \begin{verbatim}
+mkdir -p /var/lib/bcd
+ \end{verbatim}
+\end{flushleft}
+
+\begin{flushleft}
+ Give you user RW on this directory:
+ \begin{verbatim}
+chown plop.users /var/lib/bcd
+ \end{verbatim}
+\end{flushleft}
+
+\begin{flushleft}
+ Give some \textbf{sudoers} right to your user:
+ \begin{verbatim}
+vi /etc/sudoers
+plop ALL=(root) NOPASSWD:/bin/mount, /bin/umount, \
+ /usr/sbin/chroot, \
+ /usr/sbin/urpmi, \
+ /usr/sbin/urpmi.addmedia, \
+ /usr/sbin/urpmi.removemedia, \
+ /bin/rm
+ \end{verbatim}
+\end{flushleft}
+
+\begin{flushleft}
+ Checkout the source of BCD:
+ \begin{verbatim}
+svn co http://svn.mandriva.com/svn/soft/build_system/bcd
+ \end{verbatim}
+\end{flushleft}
+
+\begin{flushleft}
+ Prepare your distribution repository, you should have
+ an access to it, or a local copy.
+ \begin{verbatim}
+[plop@isobel /mnt/BIG/dis/official] 04:04:28pm
+$ ls
+2008.0/ 2008.1/ 2009.0/ 2009.1/ 2010.0/ iso/
+$ ls -r 2010.0
+x86_64/ SRPMS/ i586/
+ \end{verbatim}
+\end{flushleft}
+
+\begin{flushleft}
+ You need to install some tools and deps to be able to use bcd:
+ \begin{verbatim}
+urpmi perl-File-Copy-Recursive sudo urpmi perl-Parallel-ForkManager \
+ cdrkit-genisoimage cdrkit-isotools syslinux \
+ gfxboot mandriva-gfxboot-theme drakxtools-backend \
+ mandriva-Free-theme rpmtools
+ \end{verbatim}
+\end{flushleft}
+
+\begin{flushleft}
+ Now your system is ready to build ISO.
+\end{flushleft}
+
+\newpage
+\section{configuration file}
+
+You need to have an XML configuration file. You should use
+an example provided in this package and adapt it to your configuration file.
+
+\input{conf.xml.tex}
+
+\newpage
+\section{architecture of a Mandriva DVD}
+
+A Mandriva CD/DVD contains:
+\begin{itemize}
+ \item \textbf{autorun.inf} file and \textbf{dosutils} directory used under Windows OS to popup a dialog box
+ \item \textbf{i586} or \textbf{x86\_64} directory wich contains the installer and packages and other stuff
+\end{itemize}
+
+In the \textbf{i586} or the \textbf{x86\_64} directory:
+\begin{itemize}
+ \item \textbf{doc}: full doc of howto install a Mandriva linux system
+ \item \textbf{install}
+ \begin{itemize}
+ \item \textbf{extra/advertising}: all images used in the slideshow while installing
+ \item \textbf{images}: file used to boot the system
+ \item \textbf{stage2}: mdkinst.sqfs is the stage2 of the installer, rescue.sqfs is the rescue system. Those
+ two files are compressed in squashfs.
+ \end{itemize}
+ \item \textbf{isolinux}: contains file used to boot the CD/DVD, and all gfxboot stuff
+ \item \textbf{media}
+ \item \textbf{main}: a media with packages
+ \item \textbf{contrib}: another one with packages
+ \item \textbf{media\_info}
+ \begin{itemize}
+ \item \textbf{compssUsers.pl}: describe category to display in "select package to install" step
+ \item \textbf{file-deps}: Use the given file to know which file dependencies are used by other media (man \textbf{genhdlist2})
+ \item \textbf{hdlists}: old wayt to describe media on the DVD/CD
+ \item \textbf{media.cfg}: describe the repository of the DVD/CD
+ \item \textbf{rpmsrate}: a package is selected if its category is selected and depending of its priority (5=high, 1=very low)
+ \end{itemize}
+\end{itemize}
+
+\newpage
+\section{Step by step process}
+
+\begin{itemize}
+ \item clean all previous build
+ \item create all needed directory
+ \item isolinux step
+ \begin{itemize}
+ \item erase all previous isolinux directory in the build dir
+ \item copy the \textbf{isolinux} dir in the build dir
+ \item add entry if specidifed in the configuration file (like HDT)
+ \item switch theme for all images in \textbf{isolinux/altX} directory
+ \end{itemize}
+ \item stage1 and stage2
+ \begin{itemize}
+ \item copy all files from the \textit{install} dir to the build dir
+ \item update all \textbf{advertising}
+ \item copy \textbf{dosutils} tools in the build dir
+ \item copy the doc
+ \item copy the patch file if present
+ \end{itemize}
+ \item media step
+ \begin{itemize}
+ \item list all media configured, and report missing list file
+ \item create media directory in the build dir
+ \item copy all pubkey for each media and report missing one
+ \item create the \textbf{media/media\_info/media.cfg} file
+ \item copy the file-deps
+ \item copy the \textbf{rpmsrate}
+ \item copy \textbf{compssUsers.pl}
+ \item create a basic chroot of the futur Distribution (to be able to run urpmq)
+ \item mount loop distribution repository and external media in chroot
+ \item generate a list of rpm to copy and dependencies based on list files
+ \item concatenate all files
+ \item try to define the size of the DVD/CD (not yet implemented)
+ \item link or copy packages on the build dir
+ \item try to solve all doble issue of packages
+ \item remove all packages listed in exclude list
+ \item use \textbf{gendistrib} to create hdlists and synthesys
+ \item launch \textbf{rpmcheck} to check missing deps conflicts and other failure
+ \item use the rpmcheck's package list to solve missing deps using urpmq
+ \item re-link or copy packages on the build dir
+ \item re-try to solve all doble issue of packages
+ \item re-remove all packages listed in exclude list
+ \item re-launch \textbf{gendistrib} to create hdlists and synthesys
+ \item re-launch \textbf{rpmcheck} to check missing deps conflicts and other failure
+ \item umount all mountloop disrectory (distribution repository and extra media)
+ \item remove hdlist if no more needed (Mandriva version > 2010.0)
+ \item show the size of the DVD (not yet implemented)
+ \end{itemize}
+ \item ISO step
+ \begin{itemize}
+ \item create the \textbf{product.id} file
+ \item copy text files (INSTALL, README etc...)
+ \item create the idx
+ \item create the ISO
+ \item \textbf{isohybrid} the ISO
+ \item create the md5 and sha1
+ \item create an html report web page
+ \end{itemize}
+\end{itemize}
+
+\newpage
+\section{list files}
+
+\begin{itemize}
+ \item input list: list of rpm needed on the CD. Those list should contains the name
+or the provides of a package. You may also use a CAT\_XXX from the rpmsrate file, with the weight parameter.
+\end{itemize}
+
+\begin{verbatim}
+ie: of lists/input_main
+ INSTALL 1
+ CAT_X 1
+ CAT_GNOME 1
+ CAT_AUDIO 1
+ aumix
+ task-lxde
+\end{verbatim}
+
+\begin{itemize}
+ \item exclude list: list of unwanted packages on the CD. Be carreful to do not exclude mandatory packages
+or you DVD/CD will be not usable. Rpmcheck will report any bug in hdlists at the end of
+the 'media' step process. Packages listed in exclude list will be removed from the
+DVD/CD at the end of the build process.
+\end{itemize}
+
+\begin{itemize}
+ \item extra-filter: list of RPM you want to compare to keep the latest one. Usefull for kernel and dkms release,
+or if you are mixing release and udpates media.
+\end{itemize}
+
+\newpage
+\section{BCD options}
+
+\begin{itemize}
+ \item First arg must be the XML configuration file
+ \item Second arg must be
+ \begin{itemize}
+ \item stagex: update the stage1/stage2 in builddir
+ \item isolinux: update the isolinux in builddir
+ \item clean: clean the builddir and isodir
+ \item media: create the list of wanted packages, create all media in builddir, link/copy packages in builddir/media,
+create the media.cfg, and generate the hdtlist/synthesis
+ \item gendistrib: create the hdlists/synthesis in builddir (depends on the based\_on tag)
+ \item rpmcheck: check the hdlist in the buildir
+ \item list: list all media and list of input/exclude (from the xml conf file)
+ \item mediarepo: list all medias availables in the repositery
+ \item checkrepo: rpmcheck main hdlists in the repositery
+ \item all: run all stage in order to get an ISO
+ \item md5: create MD5 sum of the ISO
+ \item resign: resign all rpms with a password and a gpg file
+ \item doble: check doble rpm in the media build\_dir
+ \item kernel: compare kernel and keep the latest one
+ \item nodoble: don't check doble rpm in the media build\_dir
+ \item info: parse the configuration file (usefull to check the XML syntax)
+ \item clean: clean previous urpmq log file
+ \item html: generate a log report web page
+ \item iso: create the final ISO from the builddir
+ \item verbose: be more verbose
+ \end{itemize}
+ \item extra arg:
+ \begin{itemize}
+ \item noiso: don't build the iso (md5, isohybrid) in case of 'all' process
+ \item copy: copy rpm instead of link them from the repositery
+ \item verbose: verbose mode to report more info in the output
+ \end{itemize}
+\end{itemize}
+
+\section{Examples of use}
+
+\begin{flushleft}
+the folowing example will do all step to create an ISO:
+ \begin{verbatim}
+bcd mdv-20091.xml all
+ \end{verbatim}
+\end{flushleft}
+
+\begin{flushleft}
+the following example will create the build dir without creating ISO:
+ \begin{verbatim}
+bcd.pl mdv-20091.xml all noiso
+ \end{verbatim}
+\end{flushleft}
+
+\begin{flushleft}
+same as above but copy packages instead of link them from the repositery:
+ \begin{verbatim}
+bcd.pl mdv-20091.xml all noiso copy
+ \end{verbatim}
+\end{flushleft}
+
+\begin{flushleft}
+the following will update the isolinux in the build directory:
+ \begin{verbatim}
+bcd.pl mdv-20091.xml isolinux
+ \end{verbatim}
+\end{flushleft}
+
+\begin{flushleft}
+to check the main hdlist in the repositery with rpmcheck
+ \begin{verbatim}
+bcd.pl mdv-20091.xml checkrepo
+ \end{verbatim}
+\end{flushleft}
+
+\begin{flushleft}
+clean the builddir and isodir
+ \begin{verbatim}
+bcd.pl mdv-20091.xml clean
+ \end{verbatim}
+\end{flushleft}
+
+\newpage
+\section{XtreemOS example}
+
+\subsection{introduction}
+
+XtreemOS is an European project (http://xtreemos.eu/) to build and promote a Linux-based Operating System
+to Support Virtual Organizations for Next Generation Grids. This project was one of the platform used
+to develop and test BCD.
+
+XtreemOS GNU/Linux distribution is based on a Mandriva 2009.0 with updates, and and
+external repository xtreemos, wich contains sub-media release, updates and testing.
+We will explain the full configuration file for x864\_64 arch to help you understand the way
+to create one for your need.
+
+\subsection{the xos64.xml file}
+
+The name of the product will be XtreemOS, we want to do only 5 fork of \textbf{urpmq} queries, this product is based on
+a Mandriva 2009.0 product, and we want to build a DVD for x86\_64 architecture.
+The repository of the distribution is available at /mnt/BIG/dis directory, and i want to
+create my build dir and iso dir in the \textbf{/home/xtreemos/build\_bcd} directory.
+
+\begin{verbatim}
+<?xml version='1.0'?>
+<productname desc="The Linux product">
+ <nameid>XtreemOS</nameid>
+ <nb_fork>5</nb_fork>
+ <based_on>2009.0</based_on>
+ <arch>x86_64</arch>
+ <repo desc="Where is the repositery of the distribution">
+ <path>/mnt/BIG/dis</path>
+ </repo>
+ <workdir desc="Where is my working dir">
+ <path>/home/xtreemos/build_bcd</path>
+ </workdir>
+\end{verbatim}
+
+The prefix for log will be \textbf{tocopy\_plop}. BCD will use the installer in the \textbf{/home/xtreemos/export\_x86\_64}
+directory, and use the \textbf{/home/xtreemos/Build/pieces/patch-oem.pl} patch. New advertising will be taken from
+\textbf{/home/xtreemos/Build/pieces/advertising} directory.
+if you want to use proprietary firmware in stage1 (from the non-free/initrd-firmware package) set the firmware option to yes.
+
+
+\begin{verbatim}
+<tocopy_file>tocopy_plop</tocopy_file>
+ <isolinux desc="isolinux info">
+ <defaultpath>isolinux</defaultpath>
+ <firmware>yes</firmware>
+ <fullpath>/home/xtreemos/export_x86_64/isolinux</fullpath>
+ <entry>
+ </entry>
+ <!-- keep this entry to create an array ref -->
+ <entry></entry>
+ </isolinux>
+ <installer desc="path to the Mandriva installer (stage1/stage2)">
+ <defaultpath>install</defaultpath>
+ <fullpath>/home/xtreemos/export_x86_64</fullpath>
+ <patch>/home/xtreemos/Build/pieces/patch-oem.pl</patch>
+ <advertising>
+ <defaultpath>advertising</defaultpath>
+ <fullpath>/home/xtreemos/Build/pieces/advertising</fullpath>
+ </advertising>
+ </installer>
+\end{verbatim}
+
+Theme is the default one
+\begin{verbatim}
+<!-- theme must be available to path altx/all.rdz files -->
+ <theme name="Mandriva-Free">
+ <bootsplash>Mandriva-Free</bootsplash>
+ <bootsplash_path>/usr/share/bootsplash</bootsplash_path>
+ <gfxboot_path>/usr/share/gfxboot</gfxboot_path>
+ </theme>
+\end{verbatim}
+
+The first list is the Main one, we want to take into account all updates from this media, but
+we don't want to take into account suggests for packages. Package choosen from the list, and all
+dependencies will be stored into \textbf{media/main} directory of the DVD.
+\begin{verbatim}
+<media desc="media to take into account to build the ISO">
+ <list name="main" desc="Main_media">
+ <input name="base">
+ <file>lists/input_main</file>
+ </input>
+ <!-- to create an array you must keep this even if it is empty -->
+ <input>
+ <file>lists/to_add</file>
+ </input>
+ <!-- MANDATORY list of unwanted packages on the iso -->
+ <exclude name="exclude">
+ <file>lists/exclude_main</file>
+ </exclude>
+ <!-- to create an array you must keep this even if it is empty -->
+ <exclude>
+ </exclude>
+ <!-- nosuggests options should be yes or no -->
+ <nosuggests>yes</nosuggests>
+ <!-- will be taken in {repo}{version}{arch}/media -->
+ <mediadir>main</mediadir>
+ <destmedia>main</destmedia>
+ <pubkey>release/media_info/pubkey</pubkey>
+ <release>yes</release>
+ <updates>yes</updates>
+ <backport>no</backport>
+ <testing>no</testing>
+ </list>
+\end{verbatim}
+
+We create the media \textbf{contrib}, taken from the Mandriva 2009.0 repository to be able to
+get dependencies from packages for other media (here the XtreemOS media). We don't use list,
+because we dont want to take packages from contrib except dependencies for packages in the XtreemOS media.
+\begin{verbatim}
+ <list name="contrib" desc="Contrib_media">
+ <!-- to create an array you must keep this even if it is empty -->
+ <input>
+ </input>
+ <input>
+ </input>
+ <!-- MANDATORY list of unwanted packages on the iso -->
+ <exclude name="exclude">
+ <file>lists/exclude_contrib</file>
+ </exclude>
+ <!-- to create an array you must keep this even if it is empty -->
+ <exclude>
+ </exclude>
+ <!-- nosuggests options should be yes or no -->
+ <nosuggests>yes</nosuggests>
+ <!-- will be taken in {repo}{version}{arch}/media -->
+ <mediadir>contrib</mediadir>
+ <destmedia>main</destmedia>
+ <pubkey>release/media_info/pubkey</pubkey>
+ <release>yes</release>
+ <updates>yes</updates>
+ <backport>no</backport>
+ <testing>no</testing>
+ </list>
+\end{verbatim}
+
+The \textbf{r\_xos} media is the XtreemOS release media. We need to use the previously defined Contrib media
+to be able to solve dependencies for packages in this media. We don't want ot use \textbf{suggests} for packages,
+and this media is not available in the Mandriva 2009.0 repository, but in an external directory.
+We set the updates flag to yes to use all packages available in updates.
+\begin{verbatim}
+ <list name="r_xos" desc="r_xos_media">
+ <media_supp>Contrib</media_supp>
+ <input>
+ </input>
+ <!-- to create an array you must keep this even if it is empty -->
+ <input></input>
+ <!-- MANDATORY list of unwanted packages on the iso -->
+ <exclude name="exclude">
+ <file>lists/exclude_main</file>
+ </exclude>
+ <exclude name="exclude">
+ <file>lists/exclude_contrib</file>
+ </exclude>
+ <!-- to create an array you must keep this even if it is empty -->
+ <exclude>
+ </exclude>
+ <!-- nosuggests options should be yes or no -->
+ <nosuggests>yes</nosuggests>
+ <!-- will be taken in {repo}{version}{arch}/media -->
+ <mediadir>xtreemos</mediadir>
+ <destmedia>main</destmedia>
+ <external name="r_xos">
+ <fullpath_mediadir>/home/xtreemos/Build/pieces/x86_64_xos_release</fullpath_mediadir>
+ </external>
+ <!--
+ <fullpath_mediadir>/home/plop/iso/final/t/x86_64/media/main</fullpath_mediadir>
+ -->
+ <pubkey>release/media_info/pubkey</pubkey>
+ <release>yes</release>
+ <updates>yes</updates>
+ <backport>no</backport>
+ <testing>no</testing>
+ </list>
+\end{verbatim}
+
+The product version is 2.1.1, and we use custom \textbf{compssUsers.pl} and \textbf{rpmsrate} file available in the
+\textbf{/home/xtreemos/Build/pieces} directory.
+\begin{verbatim}
+<mediainfo desc="All files relatives to media_info dir">
+ <version>2.1.1</version>
+ <!-- set fullpath if you want to use an files in a non MDV repositery -->
+ <fullpath>/home/xtreemos/Build/pieces</fullpath>
+ <mediainfo_dir>media/media_info</mediainfo_dir>
+ <rpmsrate>rpmsrate</rpmsrate>
+ <compssusers>compssUsers.pl</compssusers>
+ <filedeps>file-deps</filedeps>
+ <filter>lists/extra-filter</filter>
+ <urpmi_option> --wget </urpmi_option>
+ <askmedia desc="add for other media ?">
+ <todo>yes</todo>
+ </askmedia>
+ <suppl desc="add an external media ?">
+ <todo>yes</todo>
+ </suppl>
+ <xmlinfo>
+ <todo>no</todo>
+ </xmlinfo>
+</mediainfo>
+\end{verbatim}
+
+Tag will be beta1, and we have definied some custom ISO header. All other option are standard one.
+\begin{verbatim}
+<iso>
+ <tag>beta1</tag>
+ <minor>1</minor>
+ <subversion>1</subversion>
+ <product>Download</product>
+ <branch>Devel</branch>
+ <type>basic</type>
+ <!-- dual arch not yet supported -->
+ <dualarch>no</dualarch>
+ <!-- SIZE is not YET USED !!! -->
+ <size>700</size>
+ <!-- media.cfg will be stored on genisoimage->{builddir}/{nameid}/{arch} -->
+ <mediacfg>media/media_info/media.cfg</mediacfg>
+ <hdlist>yes</hdlist>
+ <synthesis>yes</synthesis>
+ <header desc="Iso header info">
+ <systemid>XtreemOS Linux</systemid>
+ <volumeid>XOS-2.1.1-x86_64</volumeid>
+ <volumesetid>XtreemOS Linux - 2.1.1 - x86_64 DVD</volumesetid>
+ <publisherid>XtreemOS</publisherid>
+ <datapreparer>Mandriva BCD</datapreparer>
+ <applicationid>XtreemOS Linux - 2.1.1 </applicationid>
+ <copyrightid>XtreemOS Linux</copyrightid>
+ </header>
+ <genisoimage desc="iso generation tool">
+ <options>-f -r -J -hide-rr-moved -nobak -cache-inodes -no-emul-boot -boot-load-size 4 </options>
+ <bootcat>isolinux/boot.cat</bootcat>
+ <!-- builddir and destdir will always use the workdir -->
+ <builddir>build</builddir>
+ <isodir>iso</isodir>
+ </genisoimage>
+</iso>
+</productname>
+\end{verbatim}
+
+Resume of the XtreemOS example:
+
+\begin{itemize}
+\item the build directory used to create the ISO will be:\textbf{/home/xtreemos/build\_bcd/build/XtreemOS-2.1.1-x86\_64}
+\item the iso directory will be: \textbf{/home/xtreemos/build\_bcd/iso/XtreemOS-2.1.1-x86\_64}
+\item ISO name will be: \textbf{XtreemOS-2.1.1-x86\_64.iso}
+\item The chroot and logs are in \textbf{/tmp/XtreemOS-2.1.1-x86\_64} directory
+\item all urpmq queris are stored in \textbf{/tmp/XtreemOS-2.1.1-x86\_64/urpmq} directory
+\item previous urpmq queries were in \textbf{/var/lib/bcd/XtreemOS-2.1.1-x86\_64} directory
+\end{itemize}
+
+
+\subsection{running output}
+
+
+\newpage
+\section{ISSUES}
+
+\begin{itemize}
+\item if you want to build ISO for x86\_64 you must use an x86\_64 system (due to \textbf{urpmi})
+\item if hdlist/synthesis are corrupted in your repositery, you can't build ISO
+\item don't check for bad rpm
+\item BCD do an ``urpmq --updates'' wich can be removed to speed up the process
+\end{itemize}
+
+\end{document}
diff --git a/doc/mandriva-logo.jpg b/doc/mandriva-logo.jpg
new file mode 100644
index 0000000..ffc5829
--- /dev/null
+++ b/doc/mandriva-logo.jpg
Binary files differ
diff --git a/dual.xml b/dual.xml
new file mode 100644
index 0000000..7a44a7a
--- /dev/null
+++ b/dual.xml
@@ -0,0 +1,181 @@
+<?xml version='1.0'?>
+
+<productname desc="The Linux product">
+ <nameid>mandriva-linux-free-dual</nameid>
+ <nb_fork>10</nb_fork>
+ <!-- you must specify on wich distrib this iso will be built -->
+ <based_on>2010.1</based_on>
+ <!-- -->
+ <arch>i586</arch>
+ <repo desc="Where is the repositery of the distribution">
+ <path>/home/plop/pieces</path>
+ </repo>
+ <workdir desc="Where is my working dir">
+ <path>/home/plop/build_bcd</path>
+ </workdir>
+ <tocopy_file>tocopy_plop</tocopy_file>
+ <isolinux desc="isolinux info">
+ <defaultpath>isolinux</defaultpath>
+ <!-- <fullpath></fullpath> -->
+ <!-- add hdt entry in syslinux.cfg -->
+ <entry name="hdt" desc="Main media">
+ <bin>/usr/lib/syslinux/hdt.c32</bin>
+ <label>hdt</label>
+ <kernel>hdt.c32</kernel>
+ <append>modules=modules.pci</append>
+ </entry>
+ <!-- keep this entry to create an array ref -->
+ <entry></entry>
+ <tocopy name="pcimap">
+ <file>/lib/modules/2.6.33.4-server-1mnb/modules.pcimap</file>
+ </tocopy>
+ <tocopy name="ids">
+ <file>/usr/share/pci.ids</file>
+ </tocopy>
+ <tocopy></tocopy>
+ </isolinux>
+ <installer desc="path to the Mandriva installer (stage1/stage2)">
+ <defaultpath>install</defaultpath>
+ <!--<fullpath></fullpath> -->
+ <advertising>
+ <defaultpath>advertising</defaultpath>
+ <!--<fullpath></fullpath> -->
+ </advertising>
+ </installer>
+
+ <!-- theme must be available to path altx/all.rdz files -->
+ <theme name="mandriva-release-Free">
+ <theme>Mandriva-Free</theme>
+ <bootsplash>Mandriva-Free</bootsplash>
+ <bootsplash_path>/usr/share/plymouth</bootsplash_path>
+ <gfxboot_path>/usr/share/gfxboot</gfxboot_path>
+ </theme>
+
+ <media desc="media to take into account to build the ISO">
+ <!-- WARNING this media must be named "Main" because main media is mandatory for all other media-->
+ <!-- Morever the "Main" media is always the Name use for an MDV reposiery -->
+ <!-- futur feature will provide a way to specify another name for the basic repo of an MDV distribution -->
+ <list name="Main" desc="Main media">
+ <!-- MANDATORY list of wanted packages on the iso -->
+ <input name="base">
+ <file>lists/basesystem_mini</file>
+ </input>
+ <input name="kernel">
+ <file>lists/kernel32</file>
+ </input>
+ <!-- to create an array you must keep this even if it is empty -->
+ <input name="lang">
+ <file>lists/languages</file>
+ </input>
+ <!-- MANDATORY list of unwanted packages on the iso -->
+ <!-- to create an array you must keep this even if it is empty -->
+ <exclude name="mini">
+ <file>lists/exclude_mini</file>
+ </exclude>
+ <exclude name="exclude">
+ <file>lists/exclude_mini32</file>
+ </exclude>
+ <!-- nosuggests options should be yes or no -->
+ <nosuggests>yes</nosuggests>
+ <!-- will be taken in {repo}{version}{arch}/media -->
+ <mediadir>main</mediadir>
+ <destmedia>main</destmedia>
+ <!--
+ <fullpath_mediadir>/home/plop/iso/final/t/i586/media/main</fullpath_mediadir>
+ -->
+ <pubkey>release/media_info/pubkey</pubkey>
+ <release>yes</release>
+ <updates>no</updates>
+ <backport>no</backport>
+ <testing>no</testing>
+ </list>
+ <list name="Contrib" desc="Contrib media">
+ <!-- MANDATORY list of wanted packages on the iso -->
+ <drop>yes</drop>
+ <input name="base">
+ <file>lists/dual_contrib</file>
+ </input>
+ <!-- to create an array you must keep this even if it is empty -->
+ <input name="base">
+ <file>lists/dual_contrib32</file>
+ </input>
+ <input>
+ <file>lists/kernel32_contrib</file>
+ </input>
+ <!-- MANDATORY list of unwanted packages on the iso -->
+ <!-- to create an array you must keep this even if it is empty -->
+ <exclude>
+ <file>lists/exclude_mini</file>
+ </exclude>
+ <exclude>
+ </exclude>
+ <!-- nosuggests options should be yes or no -->
+ <nosuggests>yes</nosuggests>
+ <!-- will be taken in {repo}{version}{arch}/media -->
+ <mediadir>contrib</mediadir>
+ <destmedia>contrib</destmedia>
+ <pubkey>release/media_info/pubkey</pubkey>
+ <release>yes</release>
+ <updates>no</updates>
+ <backport>no</backport>
+ <testing>no</testing>
+ </list>
+ <!-- keep this entry to create an array ref -->
+ <list></list>
+ </media>
+
+
+ <mediainfo desc="All files relatives to media_info dir">
+ <version>2010-spring</version>
+ <!-- set fullpath if youy want to use an files in a non MDV repositery -->
+ <fullpath>/home/plop/drakx/perl-install/install/share/meta-task</fullpath>
+ <mediainfo_dir>media/media_info</mediainfo_dir>
+ <rpmsrate>rpmsrate</rpmsrate>
+ <compssusers>compssUsers.pl-dual</compssusers>
+ <filedeps>file-deps32</filedeps>
+ <filter>lists/extra-filter</filter>
+ <urpmi_option> -p</urpmi_option>
+ <askmedia desc="add for other media ?">
+ <todo>yes</todo>
+ </askmedia>
+ <suppl desc="add an external media ?">
+ <todo>yes</todo>
+ </suppl>
+ <xmlinfo>
+ <todo>no</todo>
+ </xmlinfo>
+ </mediainfo>
+
+ <iso>
+ <tag>farman</tag>
+ <minor>1</minor>
+ <subversion>1</subversion>
+ <product>Free</product>
+ <branch>Official</branch>
+ <type>basic</type>
+ <!-- dual arch not yet supported -->
+ <dualarch>yes</dualarch>
+ <!-- SIZE is not YET USED !!! -->
+ <size>700</size>
+ <!-- media.cfg will be stored on genisoimage->{builddir}/{nameid}/{arch} -->
+ <mediacfg>media/media_info/media.cfg</mediacfg>
+ <hdlist>yes</hdlist>
+ <synthesis>yes</synthesis>
+ <header desc="Iso header info">
+ <systemid>Mandriva Linux</systemid>
+ <volumeid>FREE-2010Spring-DUAL</volumeid>
+ <volumesetid>Mandriva Linux - 2010 Spring (Free) - DUAL CD</volumesetid>
+ <publisherid>Mandriva</publisherid>
+ <datapreparer>Mandriva-Linux BCD</datapreparer>
+ <applicationid>Mandriva Linux - 2010 Spring (Free)</applicationid>
+ <copyrightid>Mandriva Linux</copyrightid>
+ </header>
+ <genisoimage desc="iso generation tool">
+ <options>-f -r -J -hide-rr-moved -nobak -cache-inodes -no-emul-boot -boot-load-size 4 </options>
+ <bootcat>isolinux/boot.cat</bootcat>
+ <!-- builddir and destdir will always use the workdir -->
+ <builddir>build</builddir>
+ <isodir>iso</isodir>
+ </genisoimage>
+ </iso>
+</productname>
diff --git a/dual64.xml b/dual64.xml
new file mode 100644
index 0000000..dd7f678
--- /dev/null
+++ b/dual64.xml
@@ -0,0 +1,176 @@
+<?xml version='1.0'?>
+
+<productname desc="The Linux product">
+ <nameid>mandriva-linux-free-dual</nameid>
+ <nb_fork>10</nb_fork>
+ <!-- you must specify on wich distrib this iso will be built -->
+ <based_on>2010.1</based_on>
+ <!-- -->
+ <arch>x86_64</arch>
+ <repo desc="Where is the repositery of the distribution">
+ <path>/home/plop/pieces</path>
+ </repo>
+ <workdir desc="Where is my working dir">
+ <path>/home/plop/build_bcd</path>
+ </workdir>
+ <tocopy_file>tocopy_plop</tocopy_file>
+ <isolinux desc="isolinux info">
+ <defaultpath>isolinux</defaultpath>
+ <!-- <fullpath></fullpath> -->
+ <!-- add hdt entry in syslinux.cfg -->
+ <entry name="hdt" desc="Main media">
+ <bin>/usr/lib/syslinux/hdt.c32</bin>
+ <label>hdt</label>
+ <kernel>hdt.c32</kernel>
+ <append>modules=modules.pci</append>
+ </entry>
+ <!-- keep this entry to create an array ref -->
+ <entry></entry>
+ <tocopy name="pcimap">
+ <file>/lib/modules/2.6.33.4-server-1mnb/modules.pcimap</file>
+ </tocopy>
+ <tocopy name="ids">
+ <file>/usr/share/pci.ids</file>
+ </tocopy>
+ <tocopy></tocopy>
+ </isolinux>
+ <installer desc="path to the Mandriva installer (stage1/stage2)">
+ <defaultpath>install</defaultpath>
+ <!--<fullpath></fullpath> -->
+ <advertising>
+ <defaultpath>advertising</defaultpath>
+ <!--<fullpath></fullpath> -->
+ </advertising>
+ </installer>
+
+ <!-- theme must be available to path altx/all.rdz files -->
+ <theme name="mandriva-release-Free">
+ <theme>Mandriva-Free</theme>
+ <bootsplash>Mandriva-Free</bootsplash>
+ <bootsplash_path>/usr/share/plymouth</bootsplash_path>
+ <gfxboot_path>/usr/share/gfxboot</gfxboot_path>
+ </theme>
+
+ <media desc="media to take into account to build the ISO">
+ <!-- WARNING this media must be named "Main" because main media is mandatory for all other media-->
+ <!-- Morever the "Main" media is always the Name use for an MDV reposiery -->
+ <!-- futur feature will provide a way to specify another name for the basic repo of an MDV distribution -->
+ <list name="Main" desc="Main media">
+ <!-- MANDATORY list of wanted packages on the iso -->
+ <input name="base">
+ <file>lists/basesystem_mini</file>
+ </input>
+ <input name="kernel">
+ <file>lists/kernel64</file>
+ </input>
+ <!-- to create an array you must keep this even if it is empty -->
+ <input name="lang">
+ <file>lists/languages</file>
+ </input>
+ <!-- MANDATORY list of unwanted packages on the iso -->
+ <exclude name="mini">
+ <file>lists/exclude_mini</file>
+ </exclude>
+ <!-- to create an array you must keep this even if it is empty -->
+ <exclude>
+ </exclude>
+ <!-- nosuggests options should be yes or no -->
+ <nosuggests>yes</nosuggests>
+ <!-- will be taken in {repo}{version}{arch}/media -->
+ <mediadir>main</mediadir>
+ <destmedia>main</destmedia>
+ <!--
+ <fullpath_mediadir>/home/plop/iso/final/t/i586/media/main</fullpath_mediadir>
+ -->
+ <pubkey>release/media_info/pubkey</pubkey>
+ <release>yes</release>
+ <updates>no</updates>
+ <backport>no</backport>
+ <testing>no</testing>
+ </list>
+ <list name="Contrib" desc="Contrib media">
+ <!-- MANDATORY list of wanted packages on the iso -->
+ <input name="base">
+ </input>
+ <!-- to create an array you must keep this even if it is empty -->
+ <input>
+ <file>lists/dual_contrib</file>
+ </input>
+ <!-- MANDATORY list of unwanted packages on the iso -->
+ <!-- to create an array you must keep this even if it is empty -->
+ <exclude>
+ <file>lists/exclude_mini</file>
+ </exclude>
+ <exclude>
+ </exclude>
+ <!-- nosuggests options should be yes or no -->
+ <nosuggests>yes</nosuggests>
+ <!-- will be taken in {repo}{version}{arch}/media -->
+ <mediadir>contrib</mediadir>
+ <destmedia>contrib</destmedia>
+ <pubkey>release/media_info/pubkey</pubkey>
+ <release>yes</release>
+ <updates>no</updates>
+ <backport>no</backport>
+ <testing>no</testing>
+ </list>
+ <!-- keep this entry to create an array ref -->
+ <list></list>
+ <!-- keep this entry to create an array ref -->
+ <list></list>
+ </media>
+
+ <mediainfo desc="All files relatives to media_info dir">
+ <version>2010-spring</version>
+ <!-- set fullpath if youy want to use an files in a non MDV repositery -->
+ <fullpath>/home/plop/drakx/perl-install/install/share/meta-task</fullpath>
+ <mediainfo_dir>media/media_info</mediainfo_dir>
+ <rpmsrate>rpmsrate</rpmsrate>
+ <compssusers>compssUsers.pl-dual</compssusers>
+ <filedeps>file-deps64</filedeps>
+ <filter>lists/extra-filter</filter>
+ <urpmi_option> -p</urpmi_option>
+ <askmedia desc="add for other media ?">
+ <todo>yes</todo>
+ </askmedia>
+ <suppl desc="add an external media ?">
+ <todo>yes</todo>
+ </suppl>
+ <xmlinfo>
+ <todo>no</todo>
+ </xmlinfo>
+ </mediainfo>
+
+ <iso>
+ <tag>farman</tag>
+ <minor>1</minor>
+ <subversion>1</subversion>
+ <product>Free</product>
+ <branch>Official</branch>
+ <type>basic</type>
+ <!-- dual arch not yet supported -->
+ <dualarch>no</dualarch>
+ <!-- SIZE is not YET USED !!! -->
+ <size>700</size>
+ <!-- media.cfg will be stored on genisoimage->{builddir}/{nameid}/{arch} -->
+ <mediacfg>media/media_info/media.cfg</mediacfg>
+ <hdlist>yes</hdlist>
+ <synthesis>yes</synthesis>
+ <header desc="Iso header info">
+ <systemid>Mandriva Linux</systemid>
+ <volumeid>FREE-2010Spring-DUAL</volumeid>
+ <volumesetid>Mandriva Linux - 2010 Springi (Free) - DUAL CD</volumesetid>
+ <publisherid>Mandriva</publisherid>
+ <datapreparer>Mandriva-Linux BCD</datapreparer>
+ <applicationid>Mandriva Linux - 2010 Spring (Free)</applicationid>
+ <copyrightid>Mandriva Linux</copyrightid>
+ </header>
+ <genisoimage desc="iso generation tool">
+ <options>-f -r -J -hide-rr-moved -nobak -cache-inodes -no-emul-boot -boot-load-size 4 </options>
+ <bootcat>isolinux/boot.cat</bootcat>
+ <!-- builddir and destdir will always use the workdir -->
+ <builddir>build</builddir>
+ <isodir>iso</isodir>
+ </genisoimage>
+ </iso>
+</productname>
diff --git a/dvd_free32.xml b/dvd_free32.xml
new file mode 100644
index 0000000..c142fb0
--- /dev/null
+++ b/dvd_free32.xml
@@ -0,0 +1,191 @@
+<?xml version='1.0'?>
+
+<productname desc="The Linux product">
+ <nameid>mandriva-linux-free</nameid>
+ <nb_fork>10</nb_fork>
+ <!-- you must specify on wich distrib this iso will be built -->
+ <based_on>2010.1</based_on>
+ <!-- -->
+ <arch>i586</arch>
+ <repo desc="Where is the repositery of the distribution">
+ <path>/home/plop/pieces</path>
+ </repo>
+ <workdir desc="Where is my working dir">
+ <path>/home/plop/build_bcd</path>
+ </workdir>
+ <tocopy_file>tocopy_plop</tocopy_file>
+ <isolinux desc="isolinux info">
+ <defaultpath>isolinux</defaultpath>
+ <!--<fullpath></fullpath>-->
+ <!-- add hdt entry in syslinux.cfg -->
+ <entry name="hdt" desc="Main media">
+ <bin>/usr/lib/syslinux/hdt.c32</bin>
+ <label>hdt</label>
+ <kernel>hdt.c32</kernel>
+ <append>modules=modules.pci</append>
+ </entry>
+ <!-- keep this entry to create an array ref -->
+ <entry></entry>
+ <tocopy name="pcimap">
+ <file>/lib/modules/2.6.33.4-server-1mnb/modules.pcimap</file>
+ </tocopy>
+ <tocopy name="ids">
+ <file>/usr/share/pci.ids</file>
+ </tocopy>
+ <tocopy></tocopy>
+ </isolinux>
+ <installer desc="path to the Mandriva installer (stage1/stage2)">
+ <defaultpath>install</defaultpath>
+ <!--<fullpath></fullpath>-->
+ <advertising>
+ <defaultpath>advertising</defaultpath>
+ <!--<fullpath></fullpath>-->
+ </advertising>
+ </installer>
+
+ <!-- theme must be available to path altx/all.rdz files -->
+ <theme name="mandriva-release-Free">
+ <theme>mandriva-theme-Free</theme>
+ <bootsplash>Mandriva-Free</bootsplash>
+ <bootsplash_path>/usr/share/plymouth</bootsplash_path>
+ <gfxboot_path>/usr/share/gfxboot</gfxboot_path>
+ </theme>
+
+ <media desc="media to take into account to build the ISO">
+ <!-- WARNING this media must be named "Main" because main media is mandatory for all other media-->
+ <!-- Morever the "Main" media is always the Name use for an MDV reposiery -->
+ <!-- futur feature will provide a way to specify another name for the basic repo of an MDV distribution -->
+ <list name="Main" desc="Main media">
+ <!-- MANDATORY list of wanted packages on the iso -->
+ <input name="theme">
+ <file>lists/theme-free</file>
+ </input>
+ <input name="base">
+ <file>lists/input_cat</file>
+ </input>
+ <input>
+ <file>lists/input_main_ooo3</file>
+ </input>
+ <!-- to create an array you must keep this even if it is empty -->
+ <!-- MANDATORY list of unwanted packages on the iso -->
+ <exclude name="exclude">
+ <file>lists/exclude</file>
+ </exclude>
+ <exclude name="exclude_free">
+ <file>lists/exclude_free</file>
+ </exclude>
+ <exclude name="exclude">
+ <file>lists/exclude_tofix</file>
+ </exclude>
+ <!-- to create an array you must keep this even if it is empty -->
+ <exclude>
+ </exclude>
+ <!-- nosuggests options should be yes or no -->
+ <nosuggests>yes</nosuggests>
+ <!-- will be taken in {repo}{version}{arch}/media -->
+ <mediadir>main</mediadir>
+ <destmedia>main</destmedia>
+ <!--
+ <fullpath_mediadir>/home/plop/iso/final/t/i586/media/main</fullpath_mediadir>
+ -->
+ <pubkey>release/media_info/pubkey</pubkey>
+ <release>yes</release>
+ <updates>no</updates>
+ <backport>no</backport>
+ <testing>no</testing>
+ </list>
+ <list name="Contrib" desc="Contrib media">
+ <input name="base">
+ <file>lists/input_cat</file>
+ </input>
+ <!-- to create an array you must keep this even if it is empty -->
+ <input name="contrib32">
+ <file>lists/input_contrib32</file>
+ </input>
+ <input>
+ <file>lists/input_contrib</file>
+ </input>
+ <!-- MANDATORY list of unwanted packages on the iso -->
+ <exclude name="exclude">
+ <file>lists/exclude</file>
+ </exclude>
+ <exclude name="exclude">
+ <file>lists/exclude_free</file>
+ </exclude>
+ <exclude name="exclude">
+ <file>lists/exclude_tofix</file>
+ </exclude>
+ <!-- to create an array you must keep this even if it is empty -->
+ <exclude>
+ </exclude>
+ <!-- nosuggests options should be yes or no -->
+ <nosuggests>no</nosuggests>
+ <!-- will be taken in {repo}{version}{arch}/media -->
+ <mediadir>contrib</mediadir>
+ <destmedia>contrib</destmedia>
+ <!--
+ <fullpath_mediadir>/home/plop/build/2009.1/100/i586/media/contrib</fullpath_mediadir>
+ -->
+ <pubkey>release/media_info/pubkey</pubkey>
+ <release>yes</release>
+ <updates>no</updates>
+ <backport>no</backport>
+ <testing>no</testing>
+ </list>
+ <!-- keep this entry to create an array ref -->
+ <list></list>
+ </media>
+
+ <mediainfo desc="All files relatives to media_info dir">
+ <version>2010-spring</version>
+ <!-- set fullpath if you want to use an files in a non MDV repositery -->
+ <fullpath>/home/plop/drakx/perl-install/install/share/meta-task</fullpath>
+ <mediainfo_dir>media/media_info</mediainfo_dir>
+ <rpmsrate>rpmsrate</rpmsrate>
+ <compssusers>compssUsers.pl</compssusers>
+ <filedeps>file-deps32</filedeps>
+ <filter>lists/extra-filter</filter>
+ <urpmi_option>-a</urpmi_option>
+ <askmedia desc="add for other media ?">
+ <todo>yes</todo>
+ </askmedia>
+ <suppl desc="add an external media ?">
+ <todo>yes</todo>
+ </suppl>
+ <xmlinfo>
+ <todo>no</todo>
+ </xmlinfo>
+ </mediainfo>
+ <iso>
+ <tag>farman</tag>
+ <minor>1</minor>
+ <subversion>1</subversion>
+ <product>Free</product>
+ <branch>Official</branch>
+ <type>basic</type>
+ <!-- dual arch not yet supported -->
+ <dualarch>no</dualarch>
+ <!-- SIZE is not YET USED !!! -->
+ <size>4000</size>
+ <!-- media.cfg will be stored on genisoimage->{builddir}/{nameid}/{arch} -->
+ <mediacfg>media/media_info/media.cfg</mediacfg>
+ <hdlist>yes</hdlist>
+ <synthesis>yes</synthesis>
+ <header desc="Iso header info">
+ <systemid>Mandriva Linux</systemid>
+ <volumeid>FREE-2010S-i586</volumeid>
+ <volumesetid>Mandriva Linux - 2010 Spring (Free) - i586 DVD</volumesetid>
+ <publisherid>Mandriva</publisherid>
+ <datapreparer>Mandriva-Linux BCD</datapreparer>
+ <applicationid>Mandriva Linux - 2010 Spring (Free)</applicationid>
+ <copyrightid>Mandriva Linux</copyrightid>
+ </header>
+ <genisoimage desc="iso generation tool">
+ <options>-f -r -J -hide-rr-moved -nobak -cache-inodes -no-emul-boot -boot-load-size 4 </options>
+ <bootcat>isolinux/boot.cat</bootcat>
+ <!-- builddir and destdir will always use the workdir -->
+ <builddir>build</builddir>
+ <isodir>iso</isodir>
+ </genisoimage>
+ </iso>
+</productname>
diff --git a/dvd_free64.xml b/dvd_free64.xml
new file mode 100644
index 0000000..5376883
--- /dev/null
+++ b/dvd_free64.xml
@@ -0,0 +1,192 @@
+<?xml version='1.0'?>
+
+<productname desc="The Linux product">
+ <nameid>mandriva-linux-free</nameid>
+ <nb_fork>10</nb_fork>
+ <!-- you must specify on wich distrib this iso will be built -->
+ <based_on>2010.1</based_on>
+ <!-- -->
+ <arch>x86_64</arch>
+ <repo desc="Where is the repositery of the distribution">
+ <path>/home/plop/pieces</path>
+ </repo>
+ <workdir desc="Where is my working dir">
+ <path>/home/plop/build_bcd</path>
+ </workdir>
+ <tocopy_file>tocopy_plop</tocopy_file>
+ <isolinux desc="isolinux info">
+ <defaultpath>isolinux</defaultpath>
+ <!-- <fullpath></fullpath> -->
+ <!-- add hdt entry in syslinux.cfg -->
+ <entry name="hdt" desc="Main media">
+ <bin>/usr/lib/syslinux/hdt.c32</bin>
+ <label>hdt</label>
+ <kernel>hdt.c32</kernel>
+ <append>modules=modules.pci</append>
+ </entry>
+ <!-- keep this entry to create an array ref -->
+ <entry></entry>
+ <tocopy name="pcimap">
+ <file>/lib/modules/2.6.33.4-server-1mnb/modules.pcimap</file>
+ </tocopy>
+ <tocopy name="ids">
+ <file>/usr/share/pci.ids</file>
+ </tocopy>
+ <tocopy></tocopy>
+ </isolinux>
+ <installer desc="path to the Mandriva installer (stage1/stage2)">
+ <defaultpath>install</defaultpath>
+ <!--<fullpath></fullpath> -->
+ <advertising>
+ <defaultpath>advertising</defaultpath>
+ <!--<fullpath></fullpath> -->
+ </advertising>
+ </installer>
+
+ <!-- theme must be available to path altx/all.rdz files -->
+ <theme name="mandriva-release-Free">
+ <theme>mandriva-theme-Free</theme>
+ <bootsplash>Mandriva-Free</bootsplash>
+ <bootsplash_path>/usr/share/plymouth</bootsplash_path>
+ <gfxboot_path>/usr/share/gfxboot</gfxboot_path>
+ </theme>
+
+ <media desc="media to take into account to build the ISO">
+ <!-- WARNING this media must be named "Main" because main media is mandatory for all other media-->
+ <!-- Morever the "Main" media is always the Name use for an MDV reposiery -->
+ <!-- futur feature will provide a way to specify another name for the basic repo of an MDV distribution -->
+ <list name="Main" desc="Main media">
+ <!-- MANDATORY list of wanted packages on the iso -->
+ <input name="base">
+ <file>lists/input_cat</file>
+ </input>
+ <input name="theme">
+ <file>lists/theme-free</file>
+ </input>
+ <input>
+ <file>lists/input_main_ooo3</file>
+ </input>
+ <!-- to create an array you must keep this even if it is empty -->
+ <!-- MANDATORY list of unwanted packages on the iso -->
+ <exclude name="exclude">
+ <file>lists/exclude</file>
+ </exclude>
+ <exclude name="exclude_free">
+ <file>lists/exclude_free</file>
+ </exclude>
+ <exclude name="exclude">
+ <file>lists/exclude_tofix</file>
+ </exclude>
+ <!-- to create an array you must keep this even if it is empty -->
+ <exclude>
+ </exclude>
+ <!-- nosuggests options should be yes or no -->
+ <nosuggests>no</nosuggests>
+ <!-- will be taken in {repo}{version}{arch}/media -->
+ <mediadir>main</mediadir>
+ <destmedia>main</destmedia>
+ <!--
+ <fullpath_mediadir>/home/plop/iso/final/t/i586/media/main</fullpath_mediadir>
+ -->
+ <pubkey>release/media_info/pubkey</pubkey>
+ <release>yes</release>
+ <updates>no</updates>
+ <backport>no</backport>
+ <testing>no</testing>
+ </list>
+ <list name="Contrib" desc="Contrib media">
+ <input name="cat">
+ <file>lists/input_cat</file>
+ </input>
+ <input>
+ <file>lists/input_contrib</file>
+ </input>
+ <!-- to create an array you must keep this even if it is empty -->
+ <!-- MANDATORY list of unwanted packages on the iso -->
+ <exclude name="exclude">
+ <file>lists/exclude</file>
+ </exclude>
+ <exclude name="exclude">
+ <file>lists/exclude_free</file>
+ </exclude>
+ <exclude name="exclude">
+ <file>lists/exclude_contrib64</file>
+ </exclude>
+ <exclude name="exclude">
+ <file>lists/exclude_tofix</file>
+ </exclude>
+ <!-- to create an array you must keep this even if it is empty -->
+ <exclude>
+ </exclude>
+ <!-- nosuggests options should be yes or no -->
+ <nosuggests>no</nosuggests>
+ <!-- will be taken in {repo}{version}{arch}/media -->
+ <mediadir>contrib</mediadir>
+ <destmedia>contrib</destmedia>
+ <!--
+ <fullpath_mediadir>/home/plop/build/2009.1/100/i586/media/contrib</fullpath_mediadir>
+ -->
+ <pubkey>release/media_info/pubkey</pubkey>
+ <release>yes</release>
+ <updates>no</updates>
+ <backport>no</backport>
+ <testing>no</testing>
+ </list>
+ <!-- keep this entry to create an array ref -->
+ <list></list>
+ </media>
+
+ <mediainfo desc="All files relatives to media_info dir">
+ <version>2010-spring</version>
+ <!-- set fullpath if youy want to use an files in a non MDV repositery -->
+ <fullpath>/home/plop/drakx/perl-install/install/share/meta-task</fullpath>
+ <mediainfo_dir>media/media_info</mediainfo_dir>
+ <rpmsrate>rpmsrate</rpmsrate>
+ <compssusers>compssUsers.pl</compssusers>
+ <filedeps>file-deps64</filedeps>
+ <filter>lists/extra-filter</filter>
+ <urpmi_option>-a</urpmi_option>
+ <askmedia desc="add for other media ?">
+ <todo>yes</todo>
+ </askmedia>
+ <suppl desc="add an external media ?">
+ <todo>yes</todo>
+ </suppl>
+ <xmlinfo>
+ <todo>no</todo>
+ </xmlinfo>
+ </mediainfo>
+
+ <iso>
+ <tag>farman</tag>
+ <minor>1</minor>
+ <subversion>1</subversion>
+ <product>Free</product>
+ <branch>Official</branch>
+ <type>basic</type>
+ <!-- dual arch not yet supported -->
+ <dualarch>no</dualarch>
+ <!-- SIZE is not YET USED !!! -->
+ <size>700</size>
+ <!-- media.cfg will be stored on genisoimage->{builddir}/{nameid}/{arch} -->
+ <mediacfg>media/media_info/media.cfg</mediacfg>
+ <hdlist>yes</hdlist>
+ <synthesis>yes</synthesis>
+ <header desc="Iso header info">
+ <systemid>Mandriva Linux</systemid>
+ <volumeid>FREE-2010S-x86_64</volumeid>
+ <volumesetid>Mandriva Linux - 2010 Spring (Free) - x86_64 DVD</volumesetid>
+ <publisherid>Mandriva</publisherid>
+ <datapreparer>Mandriva-Linux BCD</datapreparer>
+ <applicationid>Mandriva Linux - 2010 Spring (Free)</applicationid>
+ <copyrightid>Mandriva Linux</copyrightid>
+ </header>
+ <genisoimage desc="iso generation tool">
+ <options>-f -r -J -hide-rr-moved -nobak -cache-inodes -no-emul-boot -boot-load-size 4 </options>
+ <bootcat>isolinux/boot.cat</bootcat>
+ <!-- builddir and destdir will always use the workdir -->
+ <builddir>build</builddir>
+ <isodir>iso</isodir>
+ </genisoimage>
+ </iso>
+</productname>
diff --git a/dvd_pwp32.xml b/dvd_pwp32.xml
new file mode 100644
index 0000000..9ff676e
--- /dev/null
+++ b/dvd_pwp32.xml
@@ -0,0 +1,238 @@
+<?xml version='1.0'?>
+
+<productname desc="The Linux product">
+ <nameid>mandriva-linux-pwp</nameid>
+ <nb_fork>15</nb_fork>
+ <!-- you must specify on wich distrib this iso will be built -->
+ <based_on>2010.1</based_on>
+ <!-- -->
+ <arch>i586</arch>
+ <repo desc="Where is the repositery of the distribution">
+ <path>/home/plop/pieces</path>
+ </repo>
+ <workdir desc="Where is my working dir">
+ <path>/home/plop/build_bcd</path>
+ </workdir>
+ <tocopy_file>tocopy_plop</tocopy_file>
+ <isolinux desc="isolinux info">
+ <defaultpath>isolinux</defaultpath>
+ <firmware>yes</firmware>
+ <!-- <fullpath></fullpath> -->
+ <!-- add hdt entry in syslinux.cfg -->
+ <entry name="hdt" desc="Main media">
+ <bin>/usr/lib/syslinux/hdt.c32</bin>
+ <label>hdt</label>
+ <kernel>hdt.c32</kernel>
+ <append>modules=modules.pci</append>
+ </entry>
+ <!-- keep this entry to create an array ref -->
+ <entry></entry>
+ <tocopy name="pcimap">
+ <file>/lib/modules/2.6.33.4-server-1mnb/modules.pcimap</file>
+ </tocopy>
+ <tocopy name="ids">
+ <file>/usr/share/pci.ids</file>
+ </tocopy>
+ <tocopy></tocopy>
+ </isolinux>
+ <installer desc="path to the Mandriva installer (stage1/stage2)">
+ <defaultpath>install</defaultpath>
+ <!--<fullpath></fullpath> -->
+ <advertising>
+ <defaultpath>advertising</defaultpath>
+ <!--<fullpath></fullpath> -->
+ </advertising>
+ </installer>
+
+ <!-- theme must be available to path altx/all.rdz files -->
+ <theme name="mandriva-release-Powerpack">
+ <theme>mandriva-theme-Powerpack</theme>
+ <bootsplash>Mandriva-Powerpack</bootsplash>
+ <bootsplash_path>/usr/share/plymouth</bootsplash_path>
+ <gfxboot_path>/usr/share/gfxboot</gfxboot_path>
+ </theme>
+
+ <media desc="media to take into account to build the ISO">
+ <!-- WARNING this media must be named "Main" because main media is mandatory for all other media-->
+ <!-- Morever the "Main" media is always the Name use for an MDV reposiery -->
+ <!-- futur feature will provide a way to specify another name for the basic repo of an MDV distribution -->
+ <list name="Main" desc="Main media">
+ <!-- MANDATORY list of wanted packages on the iso -->
+ <input name="base">
+ <file>lists/input_cat_pwp</file>
+ </input>
+ <input name="base">
+ <file>lists/theme-pwp</file>
+ </input>
+ <!-- to create an array you must keep this even if it is empty -->
+ <!-- MANDATORY list of unwanted packages on the iso -->
+ <exclude name="exclude">
+ <file>lists/exclude_main_pwp</file>
+ </exclude>
+ <exclude name="exclude">
+ <file>exclude_main_pwp32</file>
+ </exclude>
+ <!-- to create an array you must keep this even if it is empty -->
+ <exclude>
+ <file>lists/exclude_tofix</file>
+ </exclude>
+ <!-- nosuggests options should be yes or no -->
+ <nosuggests>no</nosuggests>
+ <!-- will be taken in {repo}{version}{arch}/media -->
+ <mediadir>main</mediadir>
+ <destmedia>main</destmedia>
+ <pubkey>release/media_info/pubkey</pubkey>
+ <release>yes</release>
+ <updates>no</updates>
+ <backport>no</backport>
+ <testing>no</testing>
+ </list>
+ <list name="Contrib" desc="Contrib media">
+ <input name="base">
+ <file>lists/input_cat_pwp</file>
+ </input>
+ <input>
+ <file>lists/input_contrib_pwp</file>
+ </input>
+ <!-- to create an array you must keep this even if it is empty -->
+ <input>
+ </input>
+ <!-- MANDATORY list of unwanted packages on the iso -->
+ <exclude name="exclude">
+ <file>lists/exclude</file>
+ </exclude>
+ <exclude name="exclude">
+ <file>lists/exclude_contrib_pwp</file>
+ </exclude>
+ <!-- to create an array you must keep this even if it is empty -->
+ <exclude>
+ <file>lists/exclude_tofix</file>
+ </exclude>
+ <!-- nosuggests options should be yes or no -->
+ <nosuggests>no</nosuggests>
+ <!-- will be taken in {repo}{version}{arch}/media -->
+ <mediadir>contrib</mediadir>
+ <destmedia>contrib</destmedia>
+ <!--
+ <fullpath_mediadir>/home/plop/build/2009.1/100/i586/media/contrib</fullpath_mediadir>
+ -->
+ <pubkey>release/media_info/pubkey</pubkey>
+ <release>yes</release>
+ <updates>no</updates>
+ <backport>no</backport>
+ <testing>no</testing>
+ </list>
+ <list name="Restricted" desc="Restricted media">
+ <!--<input name="base">
+ <file>lists/input_cat</file>
+ </input>
+ -->
+ <!-- to create an array you must keep this even if it is empty -->
+ <input name="extra">
+ <file>lists/input_restricted</file>
+ </input>
+ <input>
+ <file>lists/input_restricted32</file>
+ </input>
+ <!-- MANDATORY list of unwanted packages on the iso -->
+ <exclude name="exclude">
+ <!--<file>lists/exclude_restricted</file>-->
+ </exclude>
+ <!-- to create an array you must keep this even if it is empty -->
+ <exclude>
+ </exclude>
+ <!-- nosuggests options should be yes or no -->
+ <nosuggests>no</nosuggests>
+ <!-- will be taken in {repo}{version}{arch}/media -->
+ <mediadir>restricted</mediadir>
+ <destmedia>restricted</destmedia>
+ <pubkey>release/media_info/pubkey</pubkey>
+ <release>yes</release>
+ <updates>no</updates>
+ <backport>no</backport>
+ <testing>no</testing>
+ </list>
+ <list name="Non-free" desc="Non-free media">
+ <drop>yes</drop>
+ <input name="base">
+ </input>
+ <!-- to create an array you must keep this even if it is empty -->
+ <input name="extra">
+ <file>lists/input_nonfree</file>
+ </input>
+ <!-- MANDATORY list of unwanted packages on the iso -->
+ <exclude>
+ </exclude>
+ <!-- to create an array you must keep this even if it is empty -->
+ <exclude>
+ </exclude>
+ <!-- nosuggests options should be yes or no -->
+ <nosuggests>no</nosuggests>
+ <!-- will be taken in {repo}{version}{arch}/media -->
+ <mediadir>non-free</mediadir>
+ <destmedia>non-free</destmedia>
+ <!--<fullpath_mediadir>/home/plop/pieces/cooker/x86_64/media/non-free/release</fullpath_mediadir>-->
+ <pubkey>release/media_info/pubkey</pubkey>
+ <release>yes</release>
+ <updates>no</updates>
+ <backport>no</backport>
+ <testing>no</testing>
+ </list>
+ <!-- keep this entry to create an array ref -->
+ <list></list>
+ </media>
+
+ <mediainfo desc="All files relatives to media_info dir">
+ <version>2010-spring</version>
+ <!-- set fullpath if youy want to use an files in a non MDV repositery -->
+ <!--<fullpath></fullpath> -->
+ <mediainfo_dir>media/media_info</mediainfo_dir>
+ <rpmsrate>rpmsrate</rpmsrate>
+ <compssusers>compssUsers.pl</compssusers>
+ <filedeps>file-deps</filedeps>
+ <filter>lists/extra-filter</filter>
+ <urpmi_option>-a </urpmi_option>
+ <askmedia desc="add for other media ?">
+ <todo>yes</todo>
+ </askmedia>
+ <suppl desc="add an external media ?">
+ <todo>yes</todo>
+ </suppl>
+ <xmlinfo>
+ <todo>no</todo>
+ </xmlinfo>
+ </mediainfo>
+
+ <iso>
+ <tag>farman</tag>
+ <minor>1</minor>
+ <subversion>1</subversion>
+ <product>Powerpack</product>
+ <branch>Official</branch>
+ <type>basic</type>
+ <!-- dual arch not yet supported -->
+ <dualarch>no</dualarch>
+ <!-- SIZE is not YET USED !!! -->
+ <size>700</size>
+ <!-- media.cfg will be stored on genisoimage->{builddir}/{nameid}/{arch} -->
+ <mediacfg>media/media_info/media.cfg</mediacfg>
+ <hdlist>yes</hdlist>
+ <synthesis>yes</synthesis>
+ <header desc="Iso header info">
+ <systemid>Mandriva Linux</systemid>
+ <volumeid>PWP-2010S-i586</volumeid>
+ <volumesetid>Mandriva Linux - 2010 Spring (Powerpack) - i586 DVD</volumesetid>
+ <publisherid>Mandriva</publisherid>
+ <datapreparer>Mandriva-Linux BCD</datapreparer>
+ <applicationid>Mandriva Linux - 2010 Spring (Powerpack)</applicationid>
+ <copyrightid>Mandriva Linux</copyrightid>
+ </header>
+ <genisoimage desc="iso generation tool">
+ <options>-f -r -J -hide-rr-moved -nobak -cache-inodes -no-emul-boot -boot-load-size 4 </options>
+ <bootcat>isolinux/boot.cat</bootcat>
+ <!-- builddir and destdir will always use the workdir -->
+ <builddir>build</builddir>
+ <isodir>iso</isodir>
+ </genisoimage>
+ </iso>
+</productname>
diff --git a/dvd_pwp64.xml b/dvd_pwp64.xml
new file mode 100644
index 0000000..3dc2fb9
--- /dev/null
+++ b/dvd_pwp64.xml
@@ -0,0 +1,334 @@
+<?xml version='1.0'?>
+
+<productname desc="The Linux product">
+ <nameid>mandriva-linux-pwp</nameid>
+ <nb_fork>15</nb_fork>
+ <!-- you must specify on wich distrib this iso will be built -->
+ <based_on>2010.1</based_on>
+ <!-- -->
+ <arch>x86_64</arch>
+ <repo desc="Where is the repositery of the distribution">
+ <path>/home/plop/pieces</path>
+ </repo>
+ <workdir desc="Where is my working dir">
+ <path>/home/plop/build_bcd</path>
+ </workdir>
+ <tocopy_file>tocopy_plop</tocopy_file>
+ <isolinux desc="isolinux info">
+ <defaultpath>isolinux</defaultpath>
+ <firmware>yes</firmware>
+ <!-- <fullpath></fullpath> -->
+ <!-- add hdt entry in syslinux.cfg -->
+ <entry name="hdt" desc="Main media">
+ <bin>/usr/lib/syslinux/hdt.c32</bin>
+ <label>hdt</label>
+ <kernel>hdt.c32</kernel>
+ <append>modules=modules.pci</append>
+ </entry>
+ <!-- keep this entry to create an array ref -->
+ <entry></entry>
+ <tocopy name="pcimap">
+ <file>/lib/modules/2.6.33.4-server-1mnb/modules.pcimap</file>
+ </tocopy>
+ <tocopy name="ids">
+ <file>/usr/share/pci.ids</file>
+ </tocopy>
+ <tocopy></tocopy>
+ </isolinux>
+ <installer desc="path to the Mandriva installer (stage1/stage2)">
+ <defaultpath>install</defaultpath>
+ <!--<fullpath></fullpath> -->
+ <advertising>
+ <defaultpath>advertising</defaultpath>
+ <!--<fullpath></fullpath> -->
+ </advertising>
+ </installer>
+
+ <!-- theme must be available to path altx/all.rdz files -->
+ <theme name="mandriva-release-Powerpack">
+ <theme>mandriva-theme-Powerpack</theme>
+ <bootsplash>Mandriva-Powerpack</bootsplash>
+ <bootsplash_path>/usr/share/plymouth</bootsplash_path>
+ <gfxboot_path>/usr/share/gfxboot</gfxboot_path>
+ </theme>
+
+ <media desc="media to take into account to build the ISO">
+ <!-- WARNING this media must be named "Main" because main media is mandatory for all other media-->
+ <!-- Morever the "Main" media is always the Name use for an MDV reposiery -->
+ <!-- futur feature will provide a way to specify another name for the basic repo of an MDV distribution -->
+ <list name="Main" desc="Main media">
+ <!-- MANDATORY list of wanted packages on the iso -->
+ <input name="base">
+ <file>lists/input_cat_pwp</file>
+ </input>
+ <input name="base">
+ <file>lists/theme-pwp</file>
+ </input>
+ <!-- to create an array you must keep this even if it is empty -->
+ <!-- MANDATORY list of unwanted packages on the iso -->
+ <exclude name="exclude">
+ <file>lists/exclude_main_pwp</file>
+ </exclude>
+ <!-- to create an array you must keep this even if it is empty -->
+ <exclude>
+ <file>lists/exclude_tofix</file>
+ </exclude>
+ <!-- nosuggests options should be yes or no -->
+ <nosuggests>no</nosuggests>
+ <!-- will be taken in {repo}{version}{arch}/media -->
+ <mediadir>main</mediadir>
+ <destmedia>main</destmedia>
+ <pubkey>release/media_info/pubkey</pubkey>
+ <release>yes</release>
+ <updates>no</updates>
+ <backport>no</backport>
+ <testing>no</testing>
+ </list>
+ <list name="Contrib" desc="Contrib media">
+ <input name="base">
+ <file>lists/input_cat_pwp</file>
+ </input>
+ <input>
+ <file>lists/input_contrib_pwp</file>
+ </input>
+ <!-- to create an array you must keep this even if it is empty -->
+ <input>
+ </input>
+ <!-- MANDATORY list of unwanted packages on the iso -->
+ <exclude name="exclude">
+ <file>lists/exclude</file>
+ </exclude>
+ <exclude name="exclude">
+ <file>lists/exclude_contrib_pwp</file>
+ </exclude>
+ <!-- to create an array you must keep this even if it is empty -->
+ <exclude>
+ <file>lists/exclude_tofix</file>
+ </exclude>
+ <exclude>
+ <file>lists/exclude_contrib64</file>
+ </exclude>
+ <!-- nosuggests options should be yes or no -->
+ <nosuggests>no</nosuggests>
+ <!-- will be taken in {repo}{version}{arch}/media -->
+ <mediadir>contrib</mediadir>
+ <destmedia>contrib</destmedia>
+ <!--
+ <fullpath_mediadir>/home/plop/build/2009.1/100/i586/media/contrib</fullpath_mediadir>
+ -->
+ <pubkey>release/media_info/pubkey</pubkey>
+ <release>yes</release>
+ <updates>no</updates>
+ <backport>no</backport>
+ <testing>no</testing>
+ </list>
+ <list name="Restricted" desc="Restricted media">
+ <!--<input name="base">
+ <file>lists/input_cat</file>
+ </input>
+ -->
+ <!-- to create an array you must keep this even if it is empty -->
+ <input name="extra">
+ <file>lists/input_restricted64</file>
+ </input>
+ <input>
+ </input>
+ <!-- MANDATORY list of unwanted packages on the iso -->
+ <exclude name="exclude">
+ <!--<file>lists/exclude_restricted</file>-->
+ </exclude>
+ <!-- to create an array you must keep this even if it is empty -->
+ <exclude>
+ </exclude>
+ <!-- nosuggests options should be yes or no -->
+ <nosuggests>no</nosuggests>
+ <!-- will be taken in {repo}{version}{arch}/media -->
+ <mediadir>restricted</mediadir>
+ <destmedia>restricted</destmedia>
+ <pubkey>release/media_info/pubkey</pubkey>
+ <release>yes</release>
+ <updates>no</updates>
+ <backport>no</backport>
+ <testing>no</testing>
+ </list>
+ <list name="Non-free" desc="Non-free media">
+ <drop>yes</drop>
+ <input name="base">
+ </input>
+ <!-- to create an array you must keep this even if it is empty -->
+ <input name="extra">
+ <file>lists/input_nonfree</file>
+ </input>
+ <!-- MANDATORY list of unwanted packages on the iso -->
+ <exclude>
+ <file>lists/exclude_nonfree64</file>
+ </exclude>
+ <!-- to create an array you must keep this even if it is empty -->
+ <exclude>
+ </exclude>
+ <!-- nosuggests options should be yes or no -->
+ <nosuggests>no</nosuggests>
+ <!-- will be taken in {repo}{version}{arch}/media -->
+ <mediadir>non-free</mediadir>
+ <destmedia>non-free</destmedia>
+ <!--<fullpath_mediadir>/home/plop/pieces/cooker/x86_64/media/non-free/release</fullpath_mediadir>-->
+ <pubkey>release/media_info/pubkey</pubkey>
+ <release>yes</release>
+ <updates>no</updates>
+ <backport>no</backport>
+ <testing>no</testing>
+ </list>
+ <list name="main32" desc="main32 media">
+ <!-- set drop tag to "yes" to remove this media while doing an urpmq requires-recursive query with the rpmcheck list
+ This is mandatory if you add a 32bits media to build a 64bi ISO, and you dont want
+ to get 32bits package to solve missing deps for package listed in rpmcheck list. -->
+ <drop>yes</drop>
+ <remove_noarch>yes</remove_noarch>
+ <input name="base32">
+ <!-- <file>lists/main32</file>-->
+ </input>
+ <!-- to create an array you must keep this even if it is empty -->
+ <input>
+ </input>
+ <!-- MANDATORY list of unwanted packages on the iso -->
+ <exclude name="exclude">
+ <file>lists/exclude_main_pwp</file>
+ </exclude>
+ <!-- to create an array you must keep this even if it is empty -->
+ <exclude>
+ <file>lists/exclude_main32_64biso</file>
+ </exclude>
+ <!-- nosuggests options should be yes or no -->
+ <nosuggests>no</nosuggests>
+ <!-- will be taken in {repo}{version}{arch}/media -->
+ <mediadir>main32</mediadir>
+ <destmedia>main32</destmedia>
+ <!-- external media repositery with hdlists -->
+ <external name="main32">
+ <fullpath_mediadir>/home/plop/pieces/2010.1/i586/media/main/</fullpath_mediadir>
+ </external>
+ <pubkey>media_info/pubkey</pubkey>
+ <release>yes</release>
+ <updates>no</updates>
+ <backport>no</backport>
+ <testing>no</testing>
+ </list>
+ <list name="nspluginwrapper" desc="nspluginwrapper media">
+ <media_supp>main32</media_supp>
+ <!-- to create an array you must keep this even if it is empty -->
+ <input>
+ </input>
+ <input name="extra">
+ <file>lists/nspluginwrapper</file>
+ </input>
+ <!-- MANDATORY list of unwanted packages on the iso -->
+ <exclude name="exclude">
+ <!--<file>lists/exclude_restricted</file> -->
+ </exclude>
+ <!-- to create an array you must keep this even if it is empty -->
+ <exclude>
+ </exclude>
+ <!-- nosuggests options should be yes or no -->
+ <nosuggests>no</nosuggests>
+ <!-- will be taken in {repo}{version}{arch}/media -->
+ <mediadir>main</mediadir>
+ <destmedia>main</destmedia>
+ <!-- <external name="restricted32">
+ <fullpath_mediadir>/home/plop/pieces/2010.1/i586/media/restricted</fullpath_mediadir>
+ </external>
+ -->
+ <pubkey>media_info/pubkey</pubkey>
+ <release>yes</release>
+ <updates>no</updates>
+ <backport>no</backport>
+ <testing>no</testing>
+ </list>
+
+ <list name="restricted32" desc="restricted32 media">
+ <media_supp>main32</media_supp>
+ <!-- to create an array you must keep this even if it is empty -->
+ <input>
+ </input>
+ <input name="extra">
+ <file>lists/input_restricted</file>
+ </input>
+ <!-- MANDATORY list of unwanted packages on the iso -->
+ <exclude name="exclude">
+ <!--<file>lists/exclude_restricted</file> -->
+ </exclude>
+ <!-- to create an array you must keep this even if it is empty -->
+ <exclude>
+ </exclude>
+ <!-- nosuggests options should be yes or no -->
+ <nosuggests>no</nosuggests>
+ <!-- will be taken in {repo}{version}{arch}/media -->
+ <mediadir>restricted</mediadir>
+ <destmedia>restricted32</destmedia>
+ <external name="restricted32">
+ <fullpath_mediadir>/home/plop/pieces/2010.1/i586/media/restricted</fullpath_mediadir>
+ </external>
+ <pubkey>media_info/pubkey</pubkey>
+ <release>yes</release>
+ <updates>no</updates>
+ <backport>no</backport>
+ <testing>no</testing>
+ </list>
+
+ <!-- keep this entry to create an array ref -->
+ <list></list>
+ </media>
+
+ <mediainfo desc="All files relatives to media_info dir">
+ <version>2010-spring</version>
+ <!-- set fullpath if youy want to use an files in a non MDV repositery -->
+ <!--<fullpath></fullpath> -->
+ <mediainfo_dir>media/media_info</mediainfo_dir>
+ <rpmsrate>rpmsrate</rpmsrate>
+ <compssusers>compssUsers.pl</compssusers>
+ <filedeps>file-deps</filedeps>
+ <filter>lists/extra-filter</filter>
+ <urpmi_option>-a </urpmi_option>
+ <askmedia desc="add for other media ?">
+ <todo>yes</todo>
+ </askmedia>
+ <suppl desc="add an external media ?">
+ <todo>yes</todo>
+ </suppl>
+ <xmlinfo>
+ <todo>no</todo>
+ </xmlinfo>
+ </mediainfo>
+
+ <iso>
+ <tag>farman</tag>
+ <minor>1</minor>
+ <subversion>1</subversion>
+ <product>Powerpack</product>
+ <branch>Official</branch>
+ <type>basic</type>
+ <!-- dual arch not yet supported -->
+ <dualarch>no</dualarch>
+ <!-- SIZE is not YET USED !!! -->
+ <size>700</size>
+ <!-- media.cfg will be stored on genisoimage->{builddir}/{nameid}/{arch} -->
+ <mediacfg>media/media_info/media.cfg</mediacfg>
+ <hdlist>yes</hdlist>
+ <synthesis>yes</synthesis>
+ <header desc="Iso header info">
+ <systemid>Mandriva Linux</systemid>
+ <volumeid>PWP-2010S-x86_64</volumeid>
+ <volumesetid>Mandriva Linux - 2010 Spring (Powerpack) - x86_64 DVD</volumesetid>
+ <publisherid>Mandriva</publisherid>
+ <datapreparer>Mandriva-Linux BCD</datapreparer>
+ <applicationid>Mandriva Linux - 2010 Spring (Powerpack)</applicationid>
+ <copyrightid>Mandriva Linux</copyrightid>
+ </header>
+ <genisoimage desc="iso generation tool">
+ <options>-f -r -J -hide-rr-moved -nobak -cache-inodes -no-emul-boot -boot-load-size 4 </options>
+ <bootcat>isolinux/boot.cat</bootcat>
+ <!-- builddir and destdir will always use the workdir -->
+ <builddir>build</builddir>
+ <isodir>iso</isodir>
+ </genisoimage>
+ </iso>
+</productname>
diff --git a/lists/basesystem_mini b/lists/basesystem_mini
new file mode 100644
index 0000000..4ba6d91
--- /dev/null
+++ b/lists/basesystem_mini
@@ -0,0 +1,147 @@
+# MANDATORY PACKAGES !!
+kbd
+grub
+acpi
+acpid
+hwreport
+basesystem
+mandi
+mandi-ifw
+dhcp-client
+syslog-daemon
+initscripts
+util-linux-ng
+mount
+losetup
+udev
+iputils
+gnupg
+wireless-tools
+#ndiswrapper
+msec
+wpa_supplicant
+
+mandriva-theme-Free
+mandriva-gfxboot-theme
+mandriva-release-common
+mandriva-lxde-config-Free
+mandriva-release-Free
+polkit-gnome
+INSTALL 1
+
+
+##################
+#
+
+dvd+rw-tools
+cdrkit
+rsync
+grub
+acpi
+acpid
+hwreport
+aumix
+mandi-ifw
+dhcp-client
+openssh-server
+openssh-clients
+traceroute
+wget
+lynx
+lsof
+tcpdump
+gnupg
+file
+xterm
+monitor-edid
+vim-enhanced
+vim-common
+urpmi
+aria2
+#locales-(en|fr|es|pt_BR|pl|de|ru|bg|ja|hu|mk)
+#samba-client
+iputils
+lftp
+cpio
+ngrep
+cpufreqd
+cpufreq
+apmd
+pcmciautils
+dmraid
+laptop-mode-tools
+numlock
+vlan-utils
+reiserfsprogs
+xfsprogs
+alsa-utils
+task-x11
+task-lxde
+lxtask
+lxpanel
+xarchiver
+#icewm
+pptp-linux
+ppp
+nfs-utils-clients
+nfs-utils
+ppp-pppoe
+rp-pppoe
+ppp-pppoatm
+ntp
+shorewall
+bind-utils
+mkinitrd
+iptables
+perl-Net-DNS
+zcip
+synaptics
+linuxwacom
+setserial
+x11-driver-input
+x11-driver-video
+x11-server-xvfb
+drakxtools
+drakx-kbd-mouse-x11
+drakx-net
+drakx-net-text
+drakconf
+drakxtools-curses
+brltty
+jfsutils
+dosfstools
+e2fsprogs
+dmidecode
+at
+eject
+ldetect
+udev
+sharutils
+sudo
+gdm
+x11-driver-input-vboxmouse
+x11-driver-video-vboxvideo
+x11-driver-video-sisimedia
+virtualbox-guest-additions
+#glibc-devel
+#ncurses-devel
+fonts-ttf-dejavu
+ia_ora-gnome
+metacity
+gnome-settings-daemon
+rpmdrake
+lvm2
+drakfirsttime
+firefox
+ntfs-3g
+dkms-minimal
+#dkms
+xchat
+#gedit
+mdadm
+man
+xguest
+glxinfo
+msec-gui
+mdkonline
+task-pulseaudio
diff --git a/lists/dual_contrib b/lists/dual_contrib
new file mode 100644
index 0000000..f2b4558
--- /dev/null
+++ b/lists/dual_contrib
@@ -0,0 +1,2 @@
+halevt
+halevt-user
diff --git a/lists/dual_contrib32 b/lists/dual_contrib32
new file mode 100644
index 0000000..f2e3486
--- /dev/null
+++ b/lists/dual_contrib32
@@ -0,0 +1 @@
+x11-driver-video-psb
diff --git a/lists/exclude b/lists/exclude
new file mode 100644
index 0000000..9c438e5
--- /dev/null
+++ b/lists/exclude
@@ -0,0 +1,134 @@
+nspluginwrapper
+nspluginwrapper-i386
+
+# kernel
+kernel-tmb
+kernel-kerrighed
+kernel-rt
+kernel-linus
+kernel-vserver
+kernel-netbook
+kernel-rsbac
+kernel-openvz
+kernel-netbook-source
+kernel-openvz-source
+kernel-rsbac-source
+dkms-ivtv
+
+# egroupware
+egroupware
+egroupware-addressbook
+egroupware-bookmarks
+egroupware-calendar
+egroupware-contrib-backup
+egroupware-contrib-browser
+egroupware-contrib-chatty
+egroupware-contrib-comic
+egroupware-contrib-egwical
+egroupware-contrib-filescenter
+egroupware-contrib-forum
+egroupware-contrib-ftp
+egroupware-contrib-fudforum
+egroupware-contrib-headlines
+egroupware-contrib-icalsrv
+egroupware-contrib-jinn
+egroupware-contrib-messenger
+egroupware-contrib-phpldapadmin
+egroupware-contrib-skel
+egroupware-contrib-soap
+egroupware-contrib-stocks
+egroupware-contrib-switchuser
+egroupware-contrib-tts
+egroupware-contrib-xmlrpc
+egroupware-developer_tools
+egroupware-emailadmin
+egroupware-filemanager
+egroupware-infolog
+egroupware-manual
+egroupware-mydms
+egroupware-news_admin
+egroupware-phpsysinfo
+egroupware-polls
+egroupware-projectmanager
+egroupware-registration
+egroupware-sambaadmin
+egroupware-sitemgr
+egroupware-syncml
+egroupware-timesheet
+
+# cross compiler
+cross-sparc-binutils
+cross-sparc64-binutils
+cross-mipsel-binutils
+crossfire-crossedit
+cross-avr-gcc-cpp
+cross-mipsel-gcc-cpp
+cross-ppc-dietlibc-devel
+cross-ppc-binutils
+cross-ppc64-dietlibc-devel
+cross-ppc-gcc-cpp
+cross-ppc64-gcc-cpp
+crossfire-server
+cross-sun4-binutils
+cross-ppc-gcc
+cross-pic30-elf-gcc
+cross-pic30-elf-binutils
+cross-ppc64-libgcc1
+cross-mipsel-gcc
+crossfire-client-data
+cross-ia64-binutils
+cross-avr-binutils
+cross-ppc-libgcc1
+cross-ppc64-binutils
+crossfire-maps
+crossfire-client
+mingw32-crossreport
+crossvc
+cross-ppc64-gcc
+
+# others
+exaile
+openoffice.org-help-
+openoffice.org64-help-
+gimp-help-
+drakx-installer-stage2
+webmin
+tomboy
+supertux
+#gstreamer0.10-plugins-ugly
+hugs98
+malsync
+asterisk
+asterisk-core-sounds-en
+asterisk-moh-opsound
+jamvm
+exim
+firefox-devel
+slune
+php-manual-en
+maniadrive-data
+lmms
+mediawiki
+opencity
+enlightenment
+ethemes
+bootsplash-themes
+ardour
+mysql-workbench-oss
+entrance
+festvox-suopuhe-lj
+festvox-suopuhe-mv
+hugin
+cacao
+kaffe
+syslog-ng
+wine-doors
+texlive
+task-xfce-devel
+ec-fonts-mftraced
+xfsm
+xdvi
+uClibc-zlib1-devel
+
+# bugged !
+drakfon
diff --git a/lists/exclude_contrib64 b/lists/exclude_contrib64
new file mode 100644
index 0000000..5b3e8f7
--- /dev/null
+++ b/lists/exclude_contrib64
@@ -0,0 +1,2 @@
+wine-doors
+psb-
diff --git a/lists/exclude_contrib_pwp b/lists/exclude_contrib_pwp
new file mode 100644
index 0000000..bb91153
--- /dev/null
+++ b/lists/exclude_contrib_pwp
@@ -0,0 +1,5 @@
+mandriva-xfce-config-Free
+mandriva-xfce-config-One
+mandriva-xfce-config-Flash
+seamonkey
+galeon
diff --git a/lists/exclude_free b/lists/exclude_free
new file mode 100644
index 0000000..bb856b2
--- /dev/null
+++ b/lists/exclude_free
@@ -0,0 +1,24 @@
+# theme
+#mandriva-theme-Free
+mandriva-theme-Powerpack
+mandriva-theme-One
+mandriva-theme-Flash
+mandriva-theme-Mini
+#mandriva-release-Free
+mandriva-release-Powerpack
+mandriva-release-One
+mandriva-release-Flash
+mandriva-release-Mini
+powerpack-kde4-config
+one-kde4-config
+flash-kde4-config
+discovery-kde4-config
+mandriva-lxde-config-Powerpack
+mandriva-lxde-config-One
+mandriva-lxde-config-Flash
+mandriva-lxde-config-Mini
+mandriva-xfce-config-Powerpack
+mandriva-xfce-config-One
+mandriva-xfce-config-Flash
+mandriva-xfce-config-Mini
+mercurial
diff --git a/lists/exclude_main32_64biso b/lists/exclude_main32_64biso
new file mode 100644
index 0000000..421fd62
--- /dev/null
+++ b/lists/exclude_main32_64biso
@@ -0,0 +1,7 @@
+vboxadditions-kernel-desktop-latest
+urpmi
+mandriva-theme
+wine
+dkms
+docbook
+x11
diff --git a/lists/exclude_main_pwp b/lists/exclude_main_pwp
new file mode 100644
index 0000000..cf7de26
--- /dev/null
+++ b/lists/exclude_main_pwp
@@ -0,0 +1,45 @@
+# theme
+mandriva-theme-Flash
+mandriva-theme-Free
+mandriva-theme-One
+mandriva-theme-Mini
+mandriva-release-Flash
+mandriva-release-Free
+mandriva-release-One
+mandriva-release-Mini
+flash-kde4-config
+one-kde4-config
+free-kde4-config
+discovery-kde4-config
+mandriva-lxde-config-Free
+mandriva-lxde-config-Flash
+mandriva-lxde-config-One
+mandriva-lxde-config-Mini
+mandriva-xfce-config-Free
+mandriva-xfce-config-One
+mandriva-xfce-config-Flash
+mandriva-xfce-config-Mini
+
+firefox-devel
+openoffice.org-help-
+openoffice.org64-help-
+gimp-help-
+drakx-installer-stage2
+webmin
+tomboy
+festival
+festvox-kallpc16k
+festvox-kedlpc8k
+festvox-suopuhe-lj
+festvox-suopuhe-mv
+festvox-kallpc16k
+festvox-kallpc8k
+festvox-kedlpc16k
+festvox-kedlpc8k
+gnome-speech-driver-festival
+java-1.5.0-sun
+java-1.6.0-sun
+kpackagekit-common
+lib64packagekit-qt13
+netbook-kde4-config
+#gstreamer0.10-plugins-ugly
diff --git a/lists/exclude_mini b/lists/exclude_mini
new file mode 100644
index 0000000..28d06d0
--- /dev/null
+++ b/lists/exclude_mini
@@ -0,0 +1,30 @@
+kernel-xen
+kdm
+vim-X11
+mandriva-theme-Flash
+mandriva-theme-One
+mandriva-theme-Free
+mandriva-theme-Mini
+mandriva-release-Flash
+mandriva-release-One
+mandriva-release-Free
+mandriva-release-Mini
+mandriva-lxde-config-Flash
+mandriva-lxde-config-One
+mandriva-lxde-config-Free
+mandriva-lxde-config-Mini
+policykit-kde
+polkit-kde-1
+kernel-source
+dkms-vboxadditions
+kernel-kerrighed
+kernel-linus
+kernel-netbook
+kernel-openvz
+kernel-rsbac
+kernel-rt
+kernel-tmb
+kernel-vserver
+rsbac-admin
+apache-mod_rsbac
+apache-mpm-rsbac
diff --git a/lists/exclude_mini32 b/lists/exclude_mini32
new file mode 100644
index 0000000..f94ccc8
--- /dev/null
+++ b/lists/exclude_mini32
@@ -0,0 +1 @@
+kesalo
diff --git a/lists/exclude_nonfree b/lists/exclude_nonfree
new file mode 100644
index 0000000..6c8e978
--- /dev/null
+++ b/lists/exclude_nonfree
@@ -0,0 +1,2 @@
+cg
+cg-examples
diff --git a/lists/exclude_tofix b/lists/exclude_tofix
new file mode 100644
index 0000000..cb0eb56
--- /dev/null
+++ b/lists/exclude_tofix
@@ -0,0 +1,31 @@
+ivtv
+kernel-rsbac-desktop586
+gsynaptics-mcs-plugin
+opencbm-kernel-desktop586-latest
+scim-tegaki
+python-enthought-traitsbackendqt
+tegaki
+opencbm-kernel-desktop-latest
+opencbm-kernel-server-latest
+syslog-ng
+cross-avr-gcc-c++
+cross-avr-gcc
+cacao
+gcc3.3
+apache-mpm-rsbac
+python-enthought-scimath
+python-enthought-traitsbackendwx
+python-enthought-traitsgui
+libskim-devel
+kpackagekit-common
+java-1.5.0-gcj
+gnome-speech-driver-festival
+lib64skim-devel
+lib64jpeg62-devel
+esmtp
+openoffice.org-languagetool
+uClibc-libopenssl0.9.7-devel
+#nspluginwrapper
+#nspluginwrapper-i386
+hugs98
+mercurial
diff --git a/lists/extra-filter b/lists/extra-filter
new file mode 100644
index 0000000..4dd86cc
--- /dev/null
+++ b/lists/extra-filter
@@ -0,0 +1,8 @@
+#kernel-source
+#kernel-server
+#kernel-desktop
+#kernel-desktop586
+#mandriva-release-common
+#vboxadd-kernel
+libgnomecups
+lib64gnomecups
diff --git a/lists/input_cat b/lists/input_cat
new file mode 100644
index 0000000..4a99ce8
--- /dev/null
+++ b/lists/input_cat
@@ -0,0 +1,125 @@
+CAT_NETWORKING_NEWS_SERVER 3
+CAT_NETWORKING_OTHER 3
+CAT_NETWORKING_OTHER_SERVER 3
+CAT_NIS 3
+CAT_NIS_SERVER 3
+CAT_NETWORKING_REMOTE_ACCESS 3
+CAT_NETWORKING_REMOTE_ACCESS_SERVER 3
+CAT_NETWORKING_DNS 3
+CAT_NETWORKING_DNS_SERVER 3
+CAT_NETWORKING_FILE 3
+CAT_NETWORKING_FILE_SERVER 3
+CAT_NETWORKING_WWW 4
+CAT_NETWORKING_WWW_SERVER 5
+CAT_GRAPHICS 1
+CAT_ARCHIVING 1
+CAT_DATABASES 4
+CAT_GAMES 2
+CAT_DEVELOPMENT 2
+CAT_MONITORING 3
+CAT_FILE_TOOLS 1
+CAT_WEBMIN 3
+CAT_WIZARDS 3
+CAT_CONFIG 1
+CAT_BOOKS 3
+CAT_X 1
+CAT_MINIMAL_DOCS 3
+CAT_SYSTEM 1
+CAT_EMULATORS 2
+CAT_PRINTER 1
+SCANNER 4
+CAT_VIDEO_EDITING 3
+PHOTO 3
+INSTALL 1
+CAT_LSB 3
+CAT_LXDE 1
+CAT_GRAPHICAL_DESKTOP 4
+CAT_GNOME 1
+CAT_KDE 1
+CAT_XFCE 1
+CAT_VIDEO 3
+CAT_TV 3
+CAT_OFFICE 4
+CAT_SPELLCHECK 5
+CAT_AUDIO 1
+CAT_ACCESSIBILITY 3
+CAT_PUBLISHING 4
+CAT_SHELLS 3
+CAT_SCIENCES 3
+CAT_EDUCATION 3
+CAT_EDITORS 4
+CAT_TEXT_TOOLS 3
+CAT_COMMUNICATIONS 3
+CAT_TERMINALS 2
+CAT_NETWORKING_CHAT 3
+CAT_NETWORKING_CHAT_SERVER 5
+CAT_NETWORKING_FILE_TRANSFER 3
+CAT_NETWORKING_FILE_TRANSFER_SERVER 3
+CAT_NETWORKING_LDAP_SERVER 3
+CAT_NETWORKING_INSTANT_MESSAGING 3
+CAT_NETWORKING_IRC 3
+CAT_NETWORKING_FIREWALLING_SERVER 3
+CAT_NETWORKING_GROUPWARE_SERVER 3
+CAT_NETWORKING_MAIL 4
+CAT_NETWORKING_MAIL_SERVER 5
+CAT_NETWORKING_NEWS 3
+
+# all task- packages
+task-3ddesktop-gtk
+task-3ddesktop-kde
+#task-c-devel
+#task-c++-devel
+task-gnome-2010.1
+task-gnome-minimal-2010.1
+task-kde4
+#task-kde4-devel
+task-kde4-minimal
+task-lxde
+lxde-common
+lxde-settings-daemon
+task-mds
+task-printing
+task-printing-canon
+task-printing-epson
+task-printing-hp
+task-printing-lexmark
+task-printing-misc
+task-printing-okidata
+task-printing-scanning
+task-printing-server
+task-pulseaudio
+task-scanning
+task-x11
+
+# usefull tools
+xen-hypervisor
+dkms
+xemacs
+fluid-soundfont-common
+xorg-x11-75dpi-fonts
+x11-font-wqy-bitmapfont
+xterm
+cpufreqd
+apmd
+bcm43xx-fwcutter
+lilo
+vboxadditions-kernel-desktop-latest
+vboxadditions-kernel-server-latest
+vboxadditions-kernel-desktop586-latest
+virtualbox-kernel-desktop586-latest
+virtualbox-kernel-desktop-latest
+virtualbox-kernel-server-latest
+virtualbox
+java-1.6.0-openjdk-plugin
+ka-deploy-source-node
+ka-deploy-server
+dansguardian
+hylafax-server
+mercurial-server
+mercurial
+kdevplatform4
+kdevelop4
+vpnclient
+vpnc
+openvpn
+openvpn-admin
diff --git a/lists/input_cat_pwp b/lists/input_cat_pwp
new file mode 100644
index 0000000..d498895
--- /dev/null
+++ b/lists/input_cat_pwp
@@ -0,0 +1,128 @@
+CAT_NETWORKING_NEWS_SERVER 3
+CAT_NETWORKING_OTHER 3
+CAT_NETWORKING_OTHER_SERVER 3
+CAT_NIS 3
+CAT_NIS_SERVER 3
+CAT_NETWORKING_REMOTE_ACCESS 3
+CAT_NETWORKING_REMOTE_ACCESS_SERVER 3
+CAT_NETWORKING_DNS 3
+CAT_NETWORKING_DNS_SERVER 3
+CAT_NETWORKING_FILE 3
+CAT_NETWORKING_FILE_SERVER 3
+CAT_NETWORKING_WWW 4
+CAT_NETWORKING_WWW_SERVER 5
+CAT_GRAPHICS 1
+CAT_ARCHIVING 1
+CAT_DATABASES 4
+CAT_GAMES 2
+CAT_DEVELOPMENT 2
+CAT_MONITORING 3
+CAT_FILE_TOOLS 1
+CAT_WEBMIN 3
+CAT_WIZARDS 3
+CAT_CONFIG 1
+CAT_BOOKS 3
+CAT_X 1
+CAT_MINIMAL_DOCS 3
+CAT_SYSTEM 1
+CAT_EMULATORS 2
+CAT_PRINTER 1
+CAT_VIDEO_EDITING 3
+SCANNER 4
+PHOTO 3
+INSTALL 1
+CAT_LSB 3
+CAT_LXDE 1
+CAT_GRAPHICAL_DESKTOP 4
+CAT_GNOME 1
+CAT_KDE 1
+CAT_XFCE 4
+CAT_VIDEO 3
+CAT_TV 3
+CAT_OFFICE 4
+CAT_SPELLCHECK 4
+CAT_AUDIO 1
+CAT_ACCESSIBILITY 3
+CAT_PUBLISHING 3
+CAT_SHELLS 3
+CAT_SCIENCES 3
+CAT_EDUCATION 3
+CAT_EDITORS 4
+CAT_TEXT_TOOLS 3
+CAT_COMMUNICATIONS 3
+CAT_TERMINALS 2
+CAT_NETWORKING_CHAT 3
+CAT_NETWORKING_CHAT_SERVER 5
+CAT_NETWORKING_FILE_TRANSFER 3
+CAT_NETWORKING_FILE_TRANSFER_SERVER 3
+CAT_NETWORKING_LDAP_SERVER 3
+CAT_NETWORKING_INSTANT_MESSAGING 3
+CAT_NETWORKING_IRC 3
+CAT_NETWORKING_FIREWALLING_SERVER 3
+CAT_NETWORKING_GROUPWARE_SERVER 3
+CAT_NETWORKING_MAIL 4
+CAT_NETWORKING_MAIL_SERVER 5
+CAT_NETWORKING_NEWS 3
+
+# all task- packages
+task-3ddesktop-gtk
+task-3ddesktop-kde
+#task-c-devel
+#task-c++-devel
+task-gnome-2010.1
+task-gnome-minimal-2010.1
+task-kde4
+#task-kde4-devel
+task-kde4-minimal
+task-lxde
+lxde-common
+lxde-settings-daemon
+task-mds
+task-printing
+task-printing-canon
+task-printing-epson
+task-printing-hp
+task-printing-lexmark
+task-printing-misc
+task-printing-okidata
+task-printing-scanning
+task-printing-server
+task-pulseaudio
+task-scanning
+task-x11
+
+# usefull tools
+xen-hypervisor
+dkms
+xemacs
+fluid-soundfont-common
+xorg-x11-75dpi-fonts
+x11-font-wqy-bitmapfont
+xterm
+cpufreqd
+#apmd
+bcm43xx-fwcutter
+#lilo
+vboxadditions-kernel-desktop-latest
+vboxadditions-kernel-desktop586-latest
+vboxadditions-kernel-server-latest
+virtualbox
+virtualbox-kernel-desktop586-latest
+virtualbox-kernel-desktop-latest
+virtualbox-kernel-server-latest
+
+#mandatory for ooo
+classpath
+
+# fix for non-free cg
+#lib64mesaglu1-devel
+ka-deploy-source-node
+ka-deploy-server
+dansguardian
+hylafax-server
+mercurial-server
+mercurial
+vpnclient
+vpnc
+openvpn
+openvpn-admin
diff --git a/lists/input_contrib b/lists/input_contrib
new file mode 100644
index 0000000..2a208ca
--- /dev/null
+++ b/lists/input_contrib
@@ -0,0 +1,422 @@
+afio
+abiword
+abiword-docs-en
+abiword-docs-fr
+abiword-docs-pl
+gnumeric
+aircrack-ng
+airsnort
+alsa_raoppcm-kernel-desktop-latest
+alsa_raoppcm-kernel-server-latest
+anjuta2
+apache-mod_python
+arj
+atunes
+aubio
+audacious
+audacious-plugins
+audacious-pulse
+avidemux
+avidemux-cli
+avidemux-gtk
+avidemux-qt
+barry-charge
+barry-gui
+barry-opensync
+barry-tools
+bluedj-blackjack
+bluedj-chaodip
+bluedj-chinesechess
+bluedj-chudd
+bluedj-gdmahjong
+bluedj-gongzhu
+bluedj-hall
+bluedj-interlink
+bluedj-landbattle
+bluedj-landlord
+bluedj-mahjong
+bluedj-niuniu
+bluedj-renju
+bluedj-shisensho
+bluedj-suoha
+bluedj-upgrade
+buffer
+canna
+capture
+chromium-browser
+clamav
+clamav-db
+clanbomber2
+cooledit
+cwiid
+dahdi-tools
+dkms-actuator
+dkms-dahdi
+dkms-fusion
+dkms-hso
+dkms-ipw3945
+dkms-iscsitarget
+dkms-ivtv
+dkms-kqemu
+dkms-lazyfs
+dkms-m560x
+dkms-mcs7830
+dkms-netfilter-rtsp
+dkms-nouveau
+dkms-opencbm
+dkms-pwc
+dkms-qc-usb-messenger
+dkms-r5u870
+dkms-rt2870
+dkms-squashfs
+dkms-squashfs-lzma
+dkms-syntek
+dkms-thinkpad
+dkms-tp_smapi
+dkms-usbvision
+dkms-v4l-dvb-testing
+dkms-vhba
+dkms-visdn
+dkms-vloopback
+dkms-zd1211
+dolly
+dolly_plus
+dvdauthor
+dvd-slideshow
+dvdstyler
+ec-fonts-mftraced
+eclipse-egit
+editobj
+#egoboo
+#egoboo-data
+enblend
+engine_pkcs11
+exo
+gajim
+galaxy-gtk12
+gdk-pixbuf-loaders
+gnonlin
+gnucap
+gnu-git
+gossip
+gournal
+gq
+grsync
+gscan2pdf
+gscanbus
+gstreamer0.10-gsm
+gstreamer0.10-mms
+gstreamer0.10-mpeg2enc
+gstreamer0.10-musepack
+gstreamer0.10-neon
+gstreamer0.10-plugins-bad
+gstreamer0.10-mpeg
+gstreamer0.10-a52dec
+gstreamer0.10-resindvd
+gsynaptics
+hibernate
+hotkeys
+htmlparser
+hugin
+iftop
+input-utils
+ivtv
+jcommon
+jettison
+jfreechart
+jhlabs-filters
+joda-time
+kconfigldap
+kftpgrabber
+kiba-dock
+kiba-plugins
+klamav
+kmediafactory
+kqemu-kernel-desktop-latest
+kqemu-kernel-server-latest
+anjuta0
+clamav5
+clamav6
+djconsole
+exo
+fluidsynth1
+gdk-pixbuf2
+gstphotography0.10_0
+gtk+1.2
+gtkhex0
+gtksourceviewmm
+kdepim2-common
+kdepim2-ktnef
+kftpinterfaces4
+kmediafactory
+openlibraries
+opensync-plugin-evolution2
+opensync-plugin-file
+opensync-plugin-gnokii
+opensync-plugin-kdepim
+opensync-plugin-python
+opensync-plugin-syncml
+orange0
+pano13-tools
+rapi-python
+rtfcomp0
+scim-honoka0
+scim-honoka-counterattack0
+scim-honoka-devel
+upnp3
+xfsm
+xosd2
+lincity-ng
+logitech_applet
+logitech-mouse-common
+luma
+maildrop
+mcs
+memtester
+mindi
+mindi-busybox
+mondo
+mousepad
+mrxvt
+msynctool
+multisync-gui
+nano
+nautilus-open-terminal
+nautilus-sendto
+nautilus-sendto-bluetooth
+nautilus-sendto-gajim
+nemiver
+netstat-nat
+nget
+ngrep
+opencbm-kernel-desktop-latest
+opencbm-kernel-server-latest
+openldap2.3
+openldap-extra-schemas
+openldap-mandriva-dit
+openlibraries-media
+p7zip
+penguin-command
+perl-Config-General
+perl-Dahdi
+perl-Flickr-API
+perl-Flickr-Upload
+perl-Test-Mock-LWP
+perl-Gtk2-Ex-PodViewer
+perl-Gtk2-Ex-Simple-List
+perl-Gtk2-GladeXML
+perl-Gtk2-ImageView
+perl-HTTP-Cache-Transparent
+perl-HTTP-Response-Encoding
+perl-Image-ExifTool
+perl-PDF-API2
+perl-Sane
+perl-Unicode-UTF8simple
+perl-Video-Frequencies
+perl-Video-ivtv
+perl-WWW-Mechanize
+perl-XML-Mini
+perl-XML-Parser-Lite-Tree
+perl-XMLTV
+phpmyadmin
+php-pear-OLE
+php-pear-Spreadsheet_Excel_Writer
+pigment
+pigment-python
+pitivi
+poedit
+powertop
+prozilla
+py2play
+pygame
+pyogg
+pyopenal
+py-smbpasswd
+python-cssutils
+python-cwiid
+python-daap
+python-enchant
+python-enthought-enthoughtbase
+python-enthought-scimath
+python-enthought-traits
+python-librra
+python-lirc
+python-mysql
+python-numpy
+python-osd
+python-pybluez
+python-pygoocanvas
+python-pymetar
+python-scipy
+python-simplejson
+python-sqlite
+python-twisted-web2
+python-wmd
+python-xlib
+pyvorbis
+pywbxml
+qemu
+qemu-img
+qtemu
+rgrep
+ri-li
+scim-array
+scim-canna
+scim-ccinput
+scim-fcitx
+scim-honoka
+scim-honoka-counterattack
+scim-honoka-plugin-anthy
+scim-honoka-plugin-ascii
+scim-honoka-plugin-kanainput
+scim-honoka-plugin-romkan
+scim-honoka-plugin-simpleprediction
+scim-honoka-plugin-skkdic
+scim-input-pad
+scim-novel-pinyin
+scim-panel-gnome
+scim-python
+scim-python-en
+scim-python-zh_CN
+scim-qtimm
+scim-ruby
+scim-sinhala
+scim-sunpinyin
+scim-tegaki
+scim-uim
+sethdlc
+shfs-utils
+skim
+skim-scim-anthy
+skim-scim-canna
+skim-scim-honoka
+skim-scim-skk
+soya
+#squashfs-kernel-desktop-latest
+#squashfs-kernel-server-latest
+#squashfs-lzma-kernel-desktop-latest
+#squashfs-lzma-kernel-server-latest
+sshfs-fuse
+stgit
+substance
+swh-plugins
+swingx
+synce-gvfs
+synce-hal
+synce-kio-rapip
+sync-engine
+synce-opensync-plugin
+synce-trayicon
+tango-icon-theme
+task-blackberry-common
+task-blackberry-gnome
+task-lamp
+task-lamp-extras
+task-lamp-perl
+task-lamp-php
+task-lamp-python
+task-nokiasync-common
+task-nokiasync-gnome
+task-wm5sync-common
+task-wm5sync-gnome
+task-wm5sync-kde
+terminal
+thunar
+thunar-volman
+tkdvd
+tp_smapi-kernel
+tp_smapi-kernel-desktop-latest
+tp_smapi-kernel-server-latest
+transkode
+tuxpaint
+twill
+unpaper
+visdn-tools
+vlc
+vlc-plugin-a52
+vlc-plugin-aa
+vlc-plugin-bonjour
+vlc-plugin-dv
+vlc-plugin-dvdnav
+vlc-plugin-flac
+vlc-plugin-fluidsynth
+vlc-plugin-ggi
+vlc-plugin-gnutls
+vlc-plugin-jack
+vlc-plugin-lirc
+vlc-plugin-lua
+vlc-plugin-mod
+vlc-plugin-mpc
+vlc-plugin-ncurses
+vlc-plugin-ogg
+vlc-plugin-opengl
+vlc-plugin-pulse
+vlc-plugin-schroedinger
+vlc-plugin-sdl
+vlc-plugin-speex
+vlc-plugin-svgalib
+vlc-plugin-theora
+vlc-plugin-twolame
+vlc-plugin-upnp
+vlc-plugin-xosd
+vlc-plugin-zvbi
+w3m
+wstx
+xarchiver
+xdvi
+xfconf
+xfdesktop
+xfwm4
+xmoto
+xmlpull-api
+xmltv-grabbers-ar
+xmltv-grabbers-ch
+xmltv-grabbers-combiner
+xmltv-grabbers-dk
+xmltv-grabbers-dtv_la
+xmltv-grabbers-ee
+xmltv-grabbers-es
+xmltv-grabbers-eu
+xmltv-grabbers-fi
+xmltv-grabbers-fr
+xmltv-grabbers-hr
+xmltv-grabbers-huro
+xmltv-grabbers-is
+xmltv-grabbers-it
+xmltv-grabbers-na
+xmltv-grabbers-no
+xmltv-grabbers-pt
+xmltv-grabbers-re
+xmltv-grabbers-se
+xmltv-grabbers-uk
+xournal
+xstream
+yauap
+zd1211
+mplayerthumb
+wormux
+wesnoth
+widelands-b15
+warzone2100
+#tremulous-maps
+#tremulous
+X11R6-contrib
+#task-xfce
+smplayer
+smplayer-themes
+halevt
+halevt-user
+dkms-psb
+psb-kernel-desktop-latest
+psb-kernel-desktop586-latest
+psb-kernel-server-latest
+x11-driver-video-psb
+x11-driver-input-wiimote
+x11-driver-video-vermilion
+x11-driver-video-nouveau
+x11-driver-video-xgi
+mandriva-xfce-config-Free
+tmux
+tuxracer
+scilab
+#uClibc-libopenssl0.9.7
diff --git a/lists/input_contrib32 b/lists/input_contrib32
new file mode 100644
index 0000000..ddb1ad1
--- /dev/null
+++ b/lists/input_contrib32
@@ -0,0 +1,11 @@
+alsa_raoppcm-kernel-desktop586-latest
+dkms-ov51x-jpeg
+kqemu-kernel-desktop586-latest
+opencbm-kernel-desktop586-latest
+scim-honoka-plugin-jsfilter
+squashfs-kernel-desktop586-latest
+squashfs-lzma-kernel-desktop586-latest
+syntek-kernel-desktop586-latest
+syntek-kernel-desktop-latest
+syntek-kernel-server-latest
+tp_smapi-kernel-desktop586-latest
diff --git a/lists/input_contrib32_extra b/lists/input_contrib32_extra
new file mode 100644
index 0000000..6fcecfc
--- /dev/null
+++ b/lists/input_contrib32_extra
@@ -0,0 +1,12 @@
+alsa_raoppcm-kernel-desktop586-latest
+dkms-ov51x-jpeg
+kqemu-kernel-desktop586-latest
+opencbm-kernel-desktop586-latest
+scim-honoka-plugin-jsfilter
+squashfs-kernel-desktop586-latest
+squashfs-lzma-kernel-desktop586-latest
+syntek-kernel-desktop586-latest
+syntek-kernel-desktop-latest
+syntek-kernel-server-latest
+tp_smapi-kernel-desktop586-latest
+nano
diff --git a/lists/input_contrib_pwp b/lists/input_contrib_pwp
new file mode 100644
index 0000000..5cc216d
--- /dev/null
+++ b/lists/input_contrib_pwp
@@ -0,0 +1,374 @@
+afio
+abiword
+abiword-docs-en
+aircrack-ng
+airsnort
+alsa_raoppcm-kernel-desktop-latest
+alsa_raoppcm-kernel-server-latest
+anjuta2
+arj
+aubio
+audacious
+audacious-plugins
+audacious-pulse
+avidemux
+avidemux-cli
+avidemux-gtk
+barry-charge
+barry-gui
+barry-opensync
+barry-tools
+buffer
+canna
+capture
+clamav
+clamav-db
+clanbomber2
+cwiid
+dahdi-tools
+dkms-actuator
+dkms-dahdi
+dkms-fusion
+dkms-hso
+dkms-ipw3945
+dkms-iscsitarget
+dkms-ivtv
+dkms-kqemu
+dkms-lazyfs
+dkms-m560x
+dkms-mcs7830
+dkms-netfilter-rtsp
+dkms-nouveau
+dkms-opencbm
+dkms-pwc
+dkms-qc-usb-messenger
+dkms-r5u870
+dkms-rt2870
+dkms-squashfs
+dkms-squashfs-lzma
+dkms-syntek
+dkms-thinkpad
+dkms-tp_smapi
+dkms-usbvision
+dkms-v4l-dvb-testing
+dkms-vhba
+dkms-visdn
+dkms-vloopback
+dkms-zd1211
+dvdauthor
+dvd-slideshow
+dvdstyler
+ec-fonts-mftraced
+eclipse-egit
+editobj
+#egoboo
+#egoboo-data
+enblend
+engine_pkcs11
+exo
+gajim
+galaxy-gtk12
+gdk-pixbuf-loaders
+gnonlin
+gnucap
+gnu-git
+gossip
+gournal
+gq
+grsync
+gscan2pdf
+gscanbus
+gstreamer0.10-gsm
+gstreamer0.10-mms
+gstreamer0.10-mpeg2enc
+gstreamer0.10-musepack
+gstreamer0.10-neon
+gstreamer0.10-plugins-bad
+gstreamer0.10-mpeg
+gstreamer0.10-a52dec
+gstreamer0.10-resindvd
+gsynaptics
+hibernate
+hotkeys
+htmlparser
+hugin
+iftop
+input-utils
+ivtv
+jcommon
+jettison
+jfreechart
+jhlabs-filters
+joda-time
+kconfigldap
+kftpgrabber
+kiba-dock
+kiba-plugins
+klamav
+kmediafactory
+kqemu-kernel-desktop-latest
+kqemu-kernel-server-latest
+anjuta0
+clamav5
+clamav6
+djconsole
+exo
+fluidsynth1
+gdk-pixbuf2
+gstphotography0.10_0
+gtk+1.2
+gtkhex0
+gtksourceviewmm
+kdepim2-common
+kdepim2-ktnef
+kftpinterfaces4
+kmediafactory
+openlibraries
+opensync-plugin-evolution2
+opensync-plugin-file
+opensync-plugin-gnokii
+opensync-plugin-kdepim
+opensync-plugin-python
+opensync-plugin-syncml
+orange0
+pano13-tools
+rapi-python
+rtfcomp0
+scim-honoka0
+scim-honoka-counterattack0
+scim-honoka-devel
+upnp3
+xfsm
+logitech_applet
+logitech-mouse-common
+luma
+maildrop
+mcs
+memtester
+mindi
+mindi-busybox
+mondo
+mousepad
+mrxvt
+msynctool
+multisync-gui
+nano
+nautilus-open-terminal
+nautilus-sendto
+nautilus-sendto-bluetooth
+nautilus-sendto-gajim
+nemiver
+netstat-nat
+nget
+ngrep
+opencbm-kernel-desktop-latest
+opencbm-kernel-server-latest
+openldap2.3
+openldap-extra-schemas
+openldap-mandriva-dit
+openlibraries-media
+p7zip
+perl-Config-General
+perl-Dahdi
+perl-Flickr-API
+perl-Flickr-Upload
+perl-Gtk2-Ex-PodViewer
+perl-Gtk2-Ex-Simple-List
+perl-Gtk2-GladeXML
+perl-Gtk2-ImageView
+perl-HTTP-Cache-Transparent
+perl-HTTP-Response-Encoding
+perl-Image-ExifTool
+perl-PDF-API2
+perl-Sane
+perl-Unicode-UTF8simple
+perl-Video-Frequencies
+perl-Video-ivtv
+perl-WWW-Mechanize
+perl-XML-Mini
+perl-XML-Parser-Lite-Tree
+perl-XMLTV
+phpmyadmin
+php-pear-OLE
+php-pear-Spreadsheet_Excel_Writer
+pigment
+pigment-python
+pitivi
+poedit
+powertop
+prozilla
+py2play
+pyogg
+pyopenal
+py-smbpasswd
+python-cssutils
+python-cwiid
+python-daap
+python-enchant
+python-enthought-enthoughtbase
+python-enthought-scimath
+python-enthought-traits
+python-librra
+python-lirc
+python-mysql
+python-numpy
+python-osd
+python-pybluez
+python-pygoocanvas
+python-pymetar
+python-scipy
+python-simplejson
+python-sqlite
+python-twisted-web2
+python-wmd
+python-xlib
+pyvorbis
+pywbxml
+qemu
+qemu-img
+rgrep
+scim-array
+scim-canna
+scim-ccinput
+scim-fcitx
+scim-honoka
+scim-honoka-counterattack
+scim-honoka-plugin-anthy
+scim-honoka-plugin-ascii
+scim-honoka-plugin-kanainput
+scim-honoka-plugin-romkan
+scim-honoka-plugin-simpleprediction
+scim-honoka-plugin-skkdic
+scim-input-pad
+scim-novel-pinyin
+scim-panel-gnome
+scim-python
+scim-python-en
+scim-python-zh_CN
+scim-qtimm
+scim-ruby
+scim-sinhala
+scim-sunpinyin
+scim-tegaki
+scim-uim
+sethdlc
+shfs-utils
+skim
+skim-scim-anthy
+skim-scim-canna
+skim-scim-honoka
+skim-scim-skk
+soya
+sshfs-fuse
+stgit
+substance
+swh-plugins
+swingx
+synce-gvfs
+synce-hal
+synce-kio-rapip
+sync-engine
+synce-opensync-plugin
+synce-trayicon
+tango-icon-theme
+task-blackberry-common
+task-blackberry-gnome
+task-lamp
+task-lamp-extras
+task-lamp-perl
+task-lamp-php
+task-lamp-python
+task-nokiasync-common
+task-nokiasync-gnome
+task-wm5sync-common
+task-wm5sync-gnome
+task-wm5sync-kde
+terminal
+thunar
+thunar-volman
+tmux
+tp_smapi-kernel
+tp_smapi-kernel-desktop-latest
+tp_smapi-kernel-server-latest
+transkode
+tuxpaint
+twill
+unpaper
+visdn-tools
+vlc
+vlc-plugin-a52
+vlc-plugin-aa
+vlc-plugin-bonjour
+vlc-plugin-dv
+vlc-plugin-dvdnav
+vlc-plugin-flac
+vlc-plugin-fluidsynth
+vlc-plugin-ggi
+vlc-plugin-gnutls
+vlc-plugin-jack
+vlc-plugin-lirc
+vlc-plugin-lua
+vlc-plugin-mod
+vlc-plugin-mpc
+vlc-plugin-ncurses
+vlc-plugin-ogg
+vlc-plugin-opengl
+vlc-plugin-pulse
+vlc-plugin-schroedinger
+vlc-plugin-sdl
+vlc-plugin-speex
+vlc-plugin-svgalib
+vlc-plugin-theora
+vlc-plugin-twolame
+vlc-plugin-upnp
+vlc-plugin-xosd
+vlc-plugin-zvbi
+w3m
+wstx
+xarchiver
+xdvi
+xmlpull-api
+xmltv-grabbers-ar
+xmltv-grabbers-ch
+xmltv-grabbers-combiner
+xmltv-grabbers-dk
+xmltv-grabbers-dtv_la
+xmltv-grabbers-ee
+xmltv-grabbers-es
+xmltv-grabbers-eu
+xmltv-grabbers-fi
+xmltv-grabbers-fr
+xmltv-grabbers-hr
+xmltv-grabbers-huro
+xmltv-grabbers-is
+xmltv-grabbers-it
+xmltv-grabbers-na
+xmltv-grabbers-no
+xmltv-grabbers-pt
+xmltv-grabbers-re
+xmltv-grabbers-se
+xmltv-grabbers-uk
+xournal
+xstream
+yauap
+zd1211
+mplayerthumb
+X11R6-contrib
+halevt
+halevt-user
+mandriva-xfce-config-Powerpack
+moovida-plugins-good
+moovida-plugins-bad
+moovida-core
+moovida
+dkms-psb
+psb-kernel-desktop-latest
+psb-kernel-desktop586-latest
+psb-kernel-server-latest
+xmoto
+x11-driver-video-psb
+x11-driver-input-wiimote
+x11-driver-video-vermilion
+x11-driver-video-nouveau
+x11-driver-video-xgi
+#wesnoth
diff --git a/lists/input_main b/lists/input_main
new file mode 100644
index 0000000..d25ad64
--- /dev/null
+++ b/lists/input_main
@@ -0,0 +1,230 @@
+kernel-desktop-latest
+kernel-server-latest
+# MANDATORY PACKAGES !!
+kbd
+grub
+acpi
+acpid
+hwreport
+basesystem
+mandi
+mandi-ifw
+dhcp-client
+syslog-daemon
+initscripts
+util-linux-ng
+mount
+losetup
+udev
+iputils
+gnupg
+# higly recommended
+urpmi
+drakxtools-
+curl
+dkms-
+# other stuff
+task-3ddesktop-gtk
+task-3ddesktop-kde
+task-c-devel
+task-c++-devel
+task-gnome-2010.1
+task-gnome-minimal-2010.1
+task-kde4
+task-kde4-devel
+task-kde4-minimal
+task-lxde
+lxde-common
+lxde-settings-daemon
+task-mds
+task-printing
+task-printing-canon
+task-printing-epson
+task-printing-hp
+task-printing-lexmark
+task-printing-misc
+task-printing-okidata
+task-printing-scanning
+task-printing-server
+task-pulseaudio
+task-scanning
+task-x11
+drakxtools
+alsa-plugins
+monitor-edid
+screen
+openssh-server
+openssh-clients
+traceroute
+wget
+lynx
+cdrkit
+lsof
+tcpdump
+smartmontools
+cdp
+splashy
+#dkms-
+sox
+#mandriva-theme-Free
+#mandriva-release-Free
+skrooge
+xorg-x11-75dpi-fonts
+x11-font-wqy-bitmapfont
+xterm
+vim-enhanced
+vim-X11
+aria2
+msec
+at
+eject
+ldetect
+s2u
+sharutils
+cpio
+tmpwatch
+wireless-tools
+cpufreqd
+cpufreq
+apmd
+hotkeys
+laptop-mode-tools
+numlock
+netprofile
+nscd
+fbset
+vlan-utils
+mdadm
+lvm2
+reiserfsprogs
+jfsutils
+xfsprogs
+quota
+alsa-utils
+oss
+pptp-linux
+ppp
+nfs-utils-clients
+ppp-pppoe
+ppp-pppoatm
+autologin
+ntp
+shorewall
+iptables
+perl-Net-DNS
+nc
+curl
+usbutils
+zcip
+ibod
+isdn4net
+isdn-light
+isdn4k-utils
+speedtouch
+bpalogin
+ndiswrapper
+gcom
+bcm43xx-fwcutter
+synaptics
+dkms-minimal
+imwheel
+prism2-utils
+wpa_supplicant
+x11-driver-input
+x11-driver-video
+brltty
+lilo
+reiserfsprogs
+jfsprogs
+hfsutils
+dosfstools
+e2fsprogs
+xfsprogs
+lvm2
+mdadm
+ntp
+dhcp-client
+zcip
+ethtool
+rp-pppoe
+ppp-pppoatm
+bpalogin
+bcm43xx-fwcutter
+wpa_supplicant
+ndiswrapper
+poppler-data
+sdparm
+meta-task
+mandriva-galaxy
+mandriva-galaxy-data
+kwallet
+
+# firefox
+firefox-fr
+firefox-en_GB
+#firefox-af
+#firefox-ar
+firefox-be
+#firefox-bg
+#firefox-bn
+firefox-ca
+#firefox-cs
+#firefox-cy
+#firefox-da
+firefox-de
+#firefox-el
+#firefox-eo
+#firefox-es_AR
+firefox-es_ES
+#firefox-et
+firefox-eu
+#firefox-fi
+#firefox-fy
+#firefox-ga_IE
+#firefox-gl
+#firefox-gu_IN
+firefox-he
+#firefox-hi
+firefox-hu
+#firefox-id
+#firefox-is
+firefox-it
+firefox-ja
+#firefox-ka
+#firefox-kn
+firefox-ko
+#firefox-ku
+#firefox-lt
+#firefox-lv
+#firefox-mk
+#firefox-mn
+#firefox-mr
+#firefox-nb_NO
+#firefox-nl
+#firefox-nn_NO
+#firefox-oc
+#firefox-pa_IN
+firefox-pl
+firefox-pt_BR
+firefox-pt_PT
+#firefox-ro
+firefox-ru
+#firefox-si
+#firefox-sk
+#firefox-sl
+#firefox-sq
+#firefox-sr
+#firefox-sv_SE
+#firefox-te
+#firefox-th
+#firefox-tr
+firefox-uk
+firefox-zh_CN
+firefox-zh_TW
+
+vboxadditions-kernel-desktop-latest
+vboxadditions-kernel-server-latest
+virtualbox
+
+mailcap
+libcg-devel
diff --git a/lists/input_main32 b/lists/input_main32
new file mode 100644
index 0000000..627d570
--- /dev/null
+++ b/lists/input_main32
@@ -0,0 +1,5 @@
+kernel-desktop586-latest
+virtualbox-kernel-desktop586-latest
+em8300-kernel-desktop586-latest
+afs-kernel-desktop586-latest
+lzma-kernel-desktop586-latest
diff --git a/lists/input_main64_ooo3 b/lists/input_main64_ooo3
new file mode 100644
index 0000000..b26de20
--- /dev/null
+++ b/lists/input_main64_ooo3
@@ -0,0 +1,59 @@
+openoffice.org64-base
+openoffice.org64-calc
+openoffice.org64-common
+openoffice.org64-core
+openoffice.org64-draw
+openoffice.org64-filter-binfilter
+openoffice.org64-gnome
+openoffice.org64-impress
+openoffice.org64-java-common
+openoffice.org64-l10n-af
+openoffice.org64-l10n-ar
+openoffice.org64-l10n-bg
+openoffice.org64-l10n-br
+openoffice.org64-l10n-bs
+openoffice.org64-l10n-ca
+openoffice.org64-l10n-cs
+openoffice.org64-l10n-cy
+openoffice.org64-l10n-da
+openoffice.org64-l10n-de
+openoffice.org64-l10n-el
+openoffice.org64-l10n-en_GB
+openoffice.org64-l10n-es
+openoffice.org64-l10n-et
+openoffice.org64-l10n-eu
+openoffice.org64-l10n-fi
+openoffice.org64-l10n-fr
+openoffice.org64-l10n-he
+openoffice.org64-l10n-hi
+openoffice.org64-l10n-hu
+openoffice.org64-l10n-it
+openoffice.org64-l10n-ja
+openoffice.org64-l10n-ko
+openoffice.org64-l10n-mk
+openoffice.org64-l10n-nb
+openoffice.org64-l10n-nl
+openoffice.org64-l10n-nn
+openoffice.org64-l10n-pl
+openoffice.org64-l10n-pt
+openoffice.org64-l10n-pt_BR
+openoffice.org64-l10n-ru
+openoffice.org64-l10n-sk
+openoffice.org64-l10n-sl
+openoffice.org64-l10n-sv
+openoffice.org64-l10n-ta
+openoffice.org64-l10n-tr
+openoffice.org64-l10n-zh_CN
+openoffice.org64-l10n-zh_TW
+openoffice.org64-l10n-zu
+openoffice.org64-math
+openoffice.org64-pdfimport
+openoffice.org64-presentation-minimizer
+openoffice.org64-pyuno
+openoffice.org64-style-crystal
+openoffice.org64-style-galaxy
+openoffice.org64-style-industrial
+openoffice.org64-style-tango
+openoffice.org64-testtool
+openoffice.org64-voikko
+openoffice.org64-writer
diff --git a/lists/input_main_ooo3 b/lists/input_main_ooo3
new file mode 100644
index 0000000..4473a13
--- /dev/null
+++ b/lists/input_main_ooo3
@@ -0,0 +1,59 @@
+openoffice.org-base
+openoffice.org-calc
+openoffice.org-common
+openoffice.org-core
+openoffice.org-draw
+openoffice.org-filter-binfilter
+openoffice.org-gnome
+openoffice.org-impress
+openoffice.org-java-common
+openoffice.org-l10n-af
+openoffice.org-l10n-ar
+openoffice.org-l10n-bg
+openoffice.org-l10n-br
+openoffice.org-l10n-bs
+openoffice.org-l10n-ca
+openoffice.org-l10n-cs
+openoffice.org-l10n-cy
+openoffice.org-l10n-da
+openoffice.org-l10n-de
+openoffice.org-l10n-el
+openoffice.org-l10n-en_GB
+openoffice.org-l10n-es
+openoffice.org-l10n-et
+openoffice.org-l10n-eu
+openoffice.org-l10n-fi
+openoffice.org-l10n-fr
+openoffice.org-l10n-he
+openoffice.org-l10n-hi
+openoffice.org-l10n-hu
+openoffice.org-l10n-it
+openoffice.org-l10n-ja
+openoffice.org-l10n-ko
+openoffice.org-l10n-mk
+openoffice.org-l10n-nb
+openoffice.org-l10n-nl
+openoffice.org-l10n-nn
+openoffice.org-l10n-pl
+openoffice.org-l10n-pt
+openoffice.org-l10n-pt_BR
+openoffice.org-l10n-ru
+openoffice.org-l10n-sk
+openoffice.org-l10n-sl
+openoffice.org-l10n-sv
+openoffice.org-l10n-ta
+openoffice.org-l10n-tr
+openoffice.org-l10n-zh_CN
+openoffice.org-l10n-zh_TW
+openoffice.org-l10n-zu
+openoffice.org-math
+openoffice.org-pdfimport
+openoffice.org-presentation-minimizer
+openoffice.org-pyuno
+openoffice.org-style-crystal
+openoffice.org-style-galaxy
+openoffice.org-style-industrial
+openoffice.org-style-tango
+openoffice.org-testtool
+openoffice.org-voikko
+openoffice.org-writer
diff --git a/lists/input_nonfree b/lists/input_nonfree
new file mode 100644
index 0000000..8a271ea
--- /dev/null
+++ b/lists/input_nonfree
@@ -0,0 +1,131 @@
+a320raid
+adp94xx
+adpahci
+atmel-firmware
+bluez-firmware
+broadcom-wl-kernel-desktop-latest
+broadcom-wl-kernel-server-latest
+#cg
+#cg-examples
+clustalw
+clustalx
+dark-oberon
+dkms-broadcom-wl
+dkms-fcdsl
+dkms-fcdsl2
+dkms-fcdslsl
+dkms-fcdslslusb
+dkms-fcdslusb
+dkms-fcdslusb2
+dkms-fcdslusba
+dkms-fcpci
+dkms-fcusb
+dkms-fcusb2
+dkms-fglrx
+dkms-fxusb
+dkms-fxusb_CZ
+dkms-hsfmodem
+dkms-madwifi
+dkms-nvidia173
+dkms-nvidia96xx
+dkms-nvidia-current
+dkms-unicorn
+dkms-vpnclient
+drcss
+emacs-mpg123
+fglrx-control-center
+fglrx-devel
+fglrx-kernel-desktop-latest
+fglrx-kernel-server-latest
+flvstreamer
+freecol
+get_iplayer
+google-apps-installer
+hsfmodem
+hsfmodem-doc
+hsfmodem-kernel-desktop-latest
+hsfmodem-kernel-server-latest
+ipw2100-firmware
+ipw2200-firmware
+ipw3945d
+ipw3945-ucode
+iwlwifi-1000-ucode
+iwlwifi-3945-ucode
+iwlwifi-4965-ucode
+iwlwifi-5000-ucode
+iwlwifi-5150-ucode
+iwlwifi-6000-ucode
+iwlwifi-agn-ucode
+java-1.5.0-sun
+java-1.5.0-sun-alsa
+java-1.5.0-sun-demo
+java-1.5.0-sun-devel
+java-1.5.0-sun-fonts
+java-1.5.0-sun-jdbc
+java-1.5.0-sun-src
+java-1.6.0-sun
+java-1.6.0-sun-alsa
+java-1.6.0-sun-demo
+java-1.6.0-sun-devel
+java-1.6.0-sun-fonts
+java-1.6.0-sun-jdbc
+java-1.6.0-sun-plugin
+java-1.6.0-sun-src
+kernel-firmware-extra
+lib64openmotif4
+lib64openmotif-devel
+lie
+madwifi
+madwifi-kernel-desktop-latest
+madwifi-kernel-server-latest
+megacli
+microcode
+nvidia173-devel
+nvidia173-doc-html
+nvidia173-kernel-desktop-latest
+nvidia173-kernel-server-latest
+nvidia96xx-devel
+nvidia96xx-doc-html
+nvidia96xx-kernel-desktop-latest
+nvidia96xx-kernel-server-latest
+nvidia-cuda-profiler
+nvidia-cuda-toolkit
+nvidia-cuda-toolkit-devel
+nvidia-current-devel
+nvidia-current-doc-html
+nvidia-current-kernel-desktop-latest
+nvidia-current-kernel-server-latest
+openmotif
+prism54-firmware
+python-pycuda
+radeon-rlc-firmware
+rt2860-firmware
+rt2870-firmware
+rt3090-firmware
+rt61-firmware
+rt73-firmware
+shareware_doom_iwad
+speedtouch-firmware
+#taktuk2
+#taktuk2-devel
+#taktuk2-viewnet
+ueagle-firmware
+unicorn
+unrar
+vpnclient
+vpnclient-kernel-desktop-latest
+vpnclient-kernel-server-latest
+x11-driver-video-fglrx
+x11-driver-video-nvidia173
+x11-driver-video-nvidia96xx
+x11-driver-video-nvidia-current
+x11-driver-video-psb-binary-blobs
+x11-driver-video-sisdrv
+x11-font-adobe-utopia-100dpi
+x11-font-adobe-utopia-75dpi
+x11-font-adobe-utopia-type1
+x11-font-bh-ttf
+x11-font-bh-type1
+x11-font-ibm-type1
+x11-font-misc-meltho
+zd1201-firmware
diff --git a/lists/input_restricted b/lists/input_restricted
new file mode 100644
index 0000000..9d6ebc5
--- /dev/null
+++ b/lists/input_restricted
@@ -0,0 +1,41 @@
+acroread
+acroread-l10n-da
+acroread-l10n-de
+acroread-l10n-es
+acroread-l10n-fi
+acroread-l10n-fr
+acroread-l10n-it
+acroread-l10n-ja
+acroread-l10n-ko
+acroread-l10n-nb
+acroread-l10n-nl
+acroread-l10n-pt
+acroread-l10n-sv
+acroread-l10n-zh_CN
+acroread-l10n-zh_TW
+acroread-nppdf
+acroread-plugins-accessibility
+acroread-plugins-checkers
+acroread-plugins-comments
+acroread-plugins-dva
+acroread-plugins-ecmascript
+acroread-plugins-extwin
+acroread-plugins-forms
+acroread-plugins-hls
+acroread-plugins-internetaccess
+acroread-plugins-legalpdf
+acroread-plugins-makeaccessible
+acroread-plugins-multimedia
+acroread-plugins-pddom
+acroread-plugins-ppklite
+acroread-plugins-readoutloud
+acroread-plugins-saveasrtf
+acroread-plugins-searchfind
+acroread-plugins-sendmail
+acroread-plugins-soap
+acroread-plugins-spelling
+acroread-plugins-weblink
+opera
+skype
+flashplayer-plugin
+flashplayer
diff --git a/lists/input_restricted32 b/lists/input_restricted32
new file mode 100644
index 0000000..b32c277
--- /dev/null
+++ b/lists/input_restricted32
@@ -0,0 +1,5 @@
+fluendo-dvd
+gstreamer-0.10-fluendo
+VariCAD_2009-en
+VariCAD_View_2009-en
+VMware-Player
diff --git a/lists/input_restricted64 b/lists/input_restricted64
new file mode 100644
index 0000000..b32c277
--- /dev/null
+++ b/lists/input_restricted64
@@ -0,0 +1,5 @@
+fluendo-dvd
+gstreamer-0.10-fluendo
+VariCAD_2009-en
+VariCAD_View_2009-en
+VMware-Player
diff --git a/lists/kernel32 b/lists/kernel32
new file mode 100644
index 0000000..0fea7ea
--- /dev/null
+++ b/lists/kernel32
@@ -0,0 +1,3 @@
+kernel-desktop586-latest
+kernel-desktop586-devel
+vboxadditions-kernel-desktop586-latest
diff --git a/lists/kernel32_contrib b/lists/kernel32_contrib
new file mode 100644
index 0000000..fa2655e
--- /dev/null
+++ b/lists/kernel32_contrib
@@ -0,0 +1 @@
+psb-kernel-desktop586-latest
diff --git a/lists/kernel64 b/lists/kernel64
new file mode 100644
index 0000000..1b44c0e
--- /dev/null
+++ b/lists/kernel64
@@ -0,0 +1,3 @@
+kernel-desktop-latest
+kernel-desktop-devel
+vboxadditions-kernel-desktop-latest
diff --git a/lists/kernel64_contrib b/lists/kernel64_contrib
new file mode 100644
index 0000000..a3ce633
--- /dev/null
+++ b/lists/kernel64_contrib
@@ -0,0 +1 @@
+psb-kernel-desktop-latest
diff --git a/lists/languages b/lists/languages
new file mode 100644
index 0000000..77b9530
--- /dev/null
+++ b/lists/languages
@@ -0,0 +1,33 @@
+locales-bg
+locales-de
+locales-en
+locales-es
+locales-fr
+locales-hu
+locales-ja
+locales-mk
+locales-pl
+locales-ru
+#locales-zh
+locales-pt
+#locales-ro
+locales-ru
+locales-sv
+locales-ko
+locales-be
+locales-uk
+locales-ca
+locales-it
+firefox-be
+firefox-it
+firefox-de
+firefox-en_GB
+firefox-es_ES
+firefox-ru
+firefox-fr
+firefox-he
+firefox-hu
+firefox-pl
+firefox-pt_BR
+#firefox-ca
+#firefox-eu
diff --git a/lists/main32 b/lists/main32
new file mode 100644
index 0000000..43d03c5
--- /dev/null
+++ b/lists/main32
@@ -0,0 +1,5 @@
+libmesagl1
+libflashsupport
+libfreetype6
+libalsa-plugins-pulseaudio
+libxdamage1
diff --git a/lists/theme-free b/lists/theme-free
new file mode 100644
index 0000000..93f8dff
--- /dev/null
+++ b/lists/theme-free
@@ -0,0 +1,7 @@
+mandriva-theme-Free-screensaver
+mandriva-lxde-config-Free
+mandriva-theme-Free
+mandriva-release-Free
+mandriva-kde4-config-common
+free-kde4-config
+mandriva-xfce-config-Free
diff --git a/lists/theme-pwp b/lists/theme-pwp
new file mode 100644
index 0000000..532e723
--- /dev/null
+++ b/lists/theme-pwp
@@ -0,0 +1,8 @@
+mandriva-theme-Powerpack-screensaver
+mandriva-lxde-config-Powerpack
+mandriva-theme-Powerpack
+mandriva-release-Powerpack
+powerpack-kde4-config
+mandriva-kde4-config-common
+mandriva-xfce-config-Powerpack
+
diff --git a/resign_rpm_by_path.pl b/resign_rpm_by_path.pl
new file mode 100755
index 0000000..3807a3e
--- /dev/null
+++ b/resign_rpm_by_path.pl
@@ -0,0 +1,41 @@
+#!/usr/bin/perl -w
+
+use strict;
+use Parallel::ForkManager;
+use File::Glob ':glob';
+use File::Basename;
+use Expect;
+
+
+my $NB_FORK=15;
+# password file
+my $pwd_file = "/home/plop/.signature.gpg";
+my $rpmrc = "/home/plop/.rpmrc";
+my $path = $ARGV[0];
+
+$ARGV[0] or die "First arg must be a path to rpm\n";
+
+my $password = `cat $pwd_file`;
+my $verbose = "0" ;
+
+my $pm = new Parallel::ForkManager($NB_FORK);
+my @list_pkg = glob("$path/*.rpm");
+my $count = @list_pkg;
+print "$count transactions to do ... be patient !!!!";
+my $status = "0";
+foreach my $pkg (@list_pkg) {
+ $pkg or next;
+ my $basename_pkg = basename($pkg);
+ $status++;
+ my $pid = $pm->start and next;
+ print("$basename_pkg ($status/$count)\n");
+ my $command = Expect->spawn("LC_ALL=C rpm --rcfile=$rpmrc --resign $pkg") or die "Couldn't start rpm: $!\n";
+ $command->log_stdout($verbose);
+ $command->expect(20, -re, 'Enter pass phrase:' => sub { print $command $password; });
+ $command->expect(undef);
+ $command->soft_close();
+ $pm->finish;
+}
+print "Waiting for the end of some signature...\n";
+$pm->wait_all_children;
+print "all signature are done...\n";