aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain d'Alverny <rda@mageia.org>2011-12-05 23:59:47 +0000
committerRomain d'Alverny <rda@mageia.org>2011-12-05 23:59:47 +0000
commit3d84db11d5fe3c80db7a3b01f1d80dc4476c4abf (patch)
tree939c7a1e68d56c654075ee70695eaf37df53d855
parentba4b09cd99276aa8cc27316a38f85eb2c6754f1b (diff)
downloadbcd-3d84db11d5fe3c80db7a3b01f1d80dc4476c4abf.tar
bcd-3d84db11d5fe3c80db7a3b01f1d80dc4476c4abf.tar.gz
bcd-3d84db11d5fe3c80db7a3b01f1d80dc4476c4abf.tar.bz2
bcd-3d84db11d5fe3c80db7a3b01f1d80dc4476c4abf.tar.xz
bcd-3d84db11d5fe3c80db7a3b01f1d80dc4476c4abf.zip
can use YAML for config too
-rw-r--r--BCD/Common.pm13
-rw-r--r--dvd_free32.yaml308
2 files changed, 320 insertions, 1 deletions
diff --git a/BCD/Common.pm b/BCD/Common.pm
index 5b6e538..ac91081 100644
--- a/BCD/Common.pm
+++ b/BCD/Common.pm
@@ -2,10 +2,12 @@ package BCD::Common;
use strict;
use XML::Simple;
+use YAML;
use MDK::Common;
use Term::ANSIColor;
use File::Copy::Recursive qw(dircopy pathrm);
use File::Glob ':glob';
+use File::basename
use BCD::Bcd qw(:DEFAULT);
@@ -34,8 +36,17 @@ if (!$ARGV[0]) {
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 $isoconf = undef;
+
+if ($conf_file =~ /\.xml$/i) {
+ $isoconf = XMLin($conf_file, keyattr => ['']);
+} elsif ($file =~ /\.yaml$/i) {
+ $isoconf = YAML::LoadFile($conf_file);
+} else {
+ print_color("You must provide an XML or YAML config file", $color) and exit 1;
+}
our $DISTRIB = $isoconf->{theme}{name};
our $THEME = $isoconf->{theme}{theme};
diff --git a/dvd_free32.yaml b/dvd_free32.yaml
new file mode 100644
index 0000000..aff82ad
--- /dev/null
+++ b/dvd_free32.yaml
@@ -0,0 +1,308 @@
+---
+# Where is my working dir
+workdir:
+ path: /home/bcd/build_bcd
+
+# Where is the repositery of the distribution
+repo:
+ path: /home/bcd/build_bcd/pieces
+
+# desc Mageia DVD 32
+nameid: mageia
+
+# You must specify on wich distrib this iso will be built
+based_on: cauldron
+chroot_media: Core
+tocopy_file: tocopy_plop
+arch: i586
+
+# You should really care about this parameter: how many urpmq could you
+# launch at the same time?
+nb_fork: "10"
+
+chroot_media_exclude: Updates Testing
+
+# path to the Mandriva installer (stage1/stage2)
+installer:
+ defaultpath: install
+ advertising:
+ defaultpath: advertising
+ fullpath:
+ patch:
+
+# theme must be available to path altx/all.rdz files
+theme:
+ name: mandriva-release-Free
+ bootsplash_path: /home/bcd/build_bcd/pieces/iso/plymouth
+ theme: mageia-theme-Default
+ gfxboot_path: /home/bcd/build_bcd/pieces/iso/gfxboot
+ bootsplash: Default
+
+# All files relatives to media_info dir
+mediainfo:
+ # set fullpath if youy want to use an files in a non MDV repositery -->
+ fullpath: /home/bcd/build_bcd/pieces/cauldron/i586/media/media_info
+ # desc: add for other media ?
+ askmedia:
+ todo: "yes"
+ filedeps: file-deps
+ mediainfo_dir: media/media_info
+ # desc: add an external media ?
+ suppl:
+ todo: "yes"
+ compssusers: compssUsers.pl
+ filter: lists/no-filter
+ rpmsrate: rpmsrate
+ urpmi_option: -a
+ version: 2-alpha1
+ xmlinfo:
+ todo: "no"
+
+# media to take into account to build the ISO
+# WARNING the 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
+# future feature will provide a way to specify another name for the basic repo of an MDV distribution
+media:
+ first_media: core
+ update_prefix: Updates
+ list:
+ -
+ #desc: core media
+ mediadir: core
+ name: core
+ updates: "no"
+ destmedia: core
+ # MANDATORY list of unwanted packages on the iso
+ exclude:
+ -
+ name: exclude
+ file: lists/exclude
+ -
+ name: exclude_free
+ file: lists/exclude_free
+ -
+ name: exclude
+ file: lists/exclude_tofix
+
+ pubkey: release/media_info/pubkey
+ testing: "no"
+ nosuggests: "yes"
+ backport: "no"
+ release: "yes"
+ input:
+ -
+ name: theme
+ file: lists/theme-free
+ -
+ name: base
+ file: lists/input_cat
+
+# isolinux info
+isolinux:
+ #defaultpath: ?
+ #firmware: ?
+ fullpath: /home/bcd/build_bcd/pieces/cauldron/i586/isolinux
+ tocopy:
+ -
+ name: pcimap
+ file: /home/bcd/build_bcd/pieces/cauldron/i586/isolinux//modules.pcimap
+ -
+ name: ids
+ file: /usr/share/pci.ids
+ #
+ entry:
+ -
+ # Main media
+ kernel: hdt.c32
+ label: hdt
+ name: hdt
+ append: modules=modules.pci
+ bin: /home/bcd/build_bcd/pieces/cauldron/i586/isolinux/hdt.c32
+
+#
+iso:
+ # SIZE is not YET USED !!!
+ size: "4000"
+ mediacfg: media/media_info/media.cfg
+ # Iso header info
+ header:
+ applicationid: Mageia 2 - Alpha 1
+ datapreparer: Mageia BCD
+ volumeid: FREE-2-i586-alpha1
+ publisherid: Mageia.Org
+ systemid: Mageia
+ copyrightid: Mageia.Org
+ volumesetid: Mageia 2 - Alpha 1 - i586 DVD
+ branch: Devel
+ subversion: "1"
+ tag: autumnm
+ isohybrid:
+ options: --fatfirst
+ # dual arch not yet supported
+ dualarch: "no"
+ hdlist: "yes"
+ type: basic
+ product: Free
+
+ # iso generation tool
+ genisoimage:
+ builddir: build
+ isodir: iso
+ bootcat: isolinux/boot.cat
+ options: "-f -r -J -hide-rr-moved -nobak -cache-inodes -no-emul-boot -boot-load-size 4 "
+ synthesis: "yes"
+ minor: "1"
+---
+# Where is my working dir
+workdir:
+ path: /home/bcd/build_bcd
+
+# Where is the repositery of the distribution
+repo:
+ path: /home/bcd/build_bcd/pieces
+
+# desc Mageia DVD 32
+nameid: mageia
+
+# You must specify on wich distrib this iso will be built
+based_on: cauldron
+chroot_media: Core
+tocopy_file: tocopy_plop
+arch: i586
+
+# You should really care about this parameter: how many urpmq could you
+# launch at the same time?
+nb_fork: "10"
+
+chroot_media_exclude: Updates Testing
+
+# path to the Mandriva installer (stage1/stage2)
+installer:
+ defaultpath: install
+ advertising:
+ defaultpath: advertising
+ fullpath:
+ patch:
+
+# theme must be available to path altx/all.rdz files
+theme:
+ name: mandriva-release-Free
+ bootsplash_path: /home/bcd/build_bcd/pieces/iso/plymouth
+ theme: mageia-theme-Default
+ gfxboot_path: /home/bcd/build_bcd/pieces/iso/gfxboot
+ bootsplash: Default
+
+# All files relatives to media_info dir
+mediainfo:
+ # set fullpath if youy want to use an files in a non MDV repositery -->
+ fullpath: /home/bcd/build_bcd/pieces/cauldron/i586/media/media_info
+ # desc: add for other media ?
+ askmedia:
+ todo: "yes"
+ filedeps: file-deps
+ mediainfo_dir: media/media_info
+ # desc: add an external media ?
+ suppl:
+ todo: "yes"
+ compssusers: compssUsers.pl
+ filter: lists/no-filter
+ rpmsrate: rpmsrate
+ urpmi_option: -a
+ version: 2-alpha1
+ xmlinfo:
+ todo: "no"
+
+# media to take into account to build the ISO
+# WARNING the 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
+# future feature will provide a way to specify another name for the basic repo of an MDV distribution
+media:
+ first_media: core
+ update_prefix: Updates
+ list:
+ -
+ #desc: core media
+ mediadir: core
+ name: core
+ updates: "no"
+ destmedia: core
+ # MANDATORY list of unwanted packages on the iso
+ exclude:
+ -
+ name: exclude
+ file: lists/exclude
+ -
+ name: exclude_free
+ file: lists/exclude_free
+ -
+ name: exclude
+ file: lists/exclude_tofix
+
+ pubkey: release/media_info/pubkey
+ testing: "no"
+ nosuggests: "yes"
+ backport: "no"
+ release: "yes"
+ input:
+ -
+ name: theme
+ file: lists/theme-free
+ -
+ name: base
+ file: lists/input_cat
+
+# isolinux info
+isolinux:
+ #defaultpath: ?
+ #firmware: ?
+ fullpath: /home/bcd/build_bcd/pieces/cauldron/i586/isolinux
+ tocopy:
+ -
+ name: pcimap
+ file: /home/bcd/build_bcd/pieces/cauldron/i586/isolinux//modules.pcimap
+ -
+ name: ids
+ file: /usr/share/pci.ids
+ #
+ entry:
+ -
+ # Main media
+ kernel: hdt.c32
+ label: hdt
+ name: hdt
+ append: modules=modules.pci
+ bin: /home/bcd/build_bcd/pieces/cauldron/i586/isolinux/hdt.c32
+
+#
+iso:
+ # SIZE is not YET USED !!!
+ size: "4000"
+ mediacfg: media/media_info/media.cfg
+ # Iso header info
+ header:
+ applicationid: Mageia 2 - Alpha 1
+ datapreparer: Mageia BCD
+ volumeid: FREE-2-i586-alpha1
+ publisherid: Mageia.Org
+ systemid: Mageia
+ copyrightid: Mageia.Org
+ volumesetid: Mageia 2 - Alpha 1 - i586 DVD
+ branch: Devel
+ subversion: "1"
+ tag: autumnm
+ isohybrid:
+ options: --fatfirst
+ # dual arch not yet supported
+ dualarch: "no"
+ hdlist: "yes"
+ type: basic
+ product: Free
+
+ # iso generation tool
+ genisoimage:
+ builddir: build
+ isodir: iso
+ bootcat: isolinux/boot.cat
+ options: "-f -r -J -hide-rr-moved -nobak -cache-inodes -no-emul-boot -boot-load-size 4 "
+ synthesis: "yes"
+ minor: "1"