#!/usr/bin/perl -cw # # You should check the syntax of this file before using it in an auto-install. # You can do this with 'perl -cw auto_inst.cfg.pl' or by executing this file # (note the '#!/usr/bin/perl -cw' on the first line). my $distro_theme = 'Default'; my $distro_release = 'Default'; my $distro_config = lc($distro_release); my @desktops = split(/\|/, $ENV{DRAKLIVE_DESKTOP}); my $has_kde = any { /^KDE/ } @desktops; my $has_kde4 = member('KDE4', @desktops); my $has_gnome = member('GNOME', @desktops); my $has_xfce = member('xfce4', @desktops); my $has_lxde = member('LXDE', @desktops); my $has_moblin = member('Moblin', @desktops); $o = { 'media' => [ { type => 'media_cfg', url => 'drakx://media', selected_names => join(',', 'Core Release', 'Core Updates', 'Nonfree Release', 'Non-free Updates', ), }, if_($ENV{DRAKLIVE_ADDITIONAL_REPOSITORY}, { type => 'media', url => $ENV{DRAKLIVE_ADDITIONAL_REPOSITORY} }, ), ], 'rpmsrate_flags_chosen' => { LIVE => 1, (map { ("CAT_$_" => 1) } ( # office qw(OFFICE SPELLCHECK PIM ARCHIVING PRINTER), # multimedia qw(AUDIO VIDEO GRAPHICS), # internet qw(NETWORKING_WWW NETWORKING_MAIL NETWORKING_NEWS COMMUNICATIONS NETWORKING_CHAT), qw(NETWORKING_FILE_TRANSFER NETWORKING_IRC NETWORKING_INSTANT_MESSAGING NETWORKING_DNS), # network qw(NETWORKING_REMOTE_ACCESS NETWORKING_FILE), qw(NETWORKING_REMOTE_ACCESS_SERVER), # config qw(CONFIG), # console qw(EDITORS TERMINALS TEXT_TOOLS SHELLS FILE_TOOLS), # system qw(SYSTEM MINIMAL_DOCS X ACCESSIBILITY THEMES), if_($has_kde4, qw(KDE)), if_($has_gnome, qw(GNOME)), if_($has_xfce, qw(XFCE)), if_($has_lxde, qw(LXDE)), if_($ENV{DRAKLIVE_PRODUCT} =~ /gaming/i, qw(GAMES)), )), }, # so that rpmsrate flags are really used 'compssListLevel' => 5, # default from install_steps_interactive 'skipped_packages' => [ #- do not allow source dkms to be installed 'dkms', 'aspell', 'aspell-en', 'gstreamer0.10-plugins-ffmpeg', 'gstreamer0.10-plugins-ugly', if_($ENV{DRAKLIVE_PRODUCT} !~ /guadec/i, 'gcc'), "/^mageia-theme(?!-common|-$distro_theme(?:|-screensaver)-)/", "/^mageia-release(?!-common|-$distro_release)-/", if_($ENV{DRAKLIVE_ARCH} eq 'x86_64', #- !TYPE"64bit" packages are selected by default for live #- skip i586 ones if not relevant 'libqca1-tls', ), if_($ENV{DRAKLIVE_PRODUCT} !~ /gaming/i, #- non-DVD products #- from task-kde Suggests #- skipping them prevents task-kde from being installed, #- but its dependencies seems to be pulled correctly 'kdeaddons', 'kdenlive', 'kdepim-kpilot', 'konversation', 'kerry', 'kdebase4-workspace-googlegadgets', 'nepomuk-scribo', 'soprano-plugin-virtuoso', if_($ENV{DRAKLIVE_LANGS} !~ /\bpt\b/ && $ENV{DRAKLIVE_REGION} ne 'all', #- do not install pt translations if only pt_BR is explicitely selected 'kde-l10n-pt', 'firefox-pt_PT', 'libreoffice-langpack-pt_PT', 'myspell-pt_PT', ), if_($ENV{DRAKLIVE_LANGS} !~ /\bbr\b/ && $ENV{DRAKLIVE_REGION} ne 'all', #- do not install libreoffice br translations if only fr is explicitely selected #- (the br package require locales-fr so it is auto-selected if fr is available) 'libreoffice-langpack-br', ), if_($ENV{DRAKLIVE_REGION} !~ /\b(all|int|europe1)\b/, 'kde-l10n-en_GB', 'firefox-en_GB', 'myspell-en_GB', ), if_($ENV{DRAKLIVE_REGION} !~ /\b(all|int|americas)\b/, 'kde-l10n-en_US', 'myspell-en_US', ), if_($ENV{DRAKLIVE_REGION} !~ /\b(all|int|americas|europe1)\b/, 'libreoffice-langpack-en', 'autocorr-en', 'hunspell-en', 'hyphen-en', 'mythes-en', '/^firefox-en_/', '/^myspell-en_/', ), if_($ENV{DRAKLIVE_PRODUCT} !~ /liveusb-rw/i, 'task-printing-scanning'), 'qtradio', 'kradio', 'system-config-printer', 'poppler-data', 'tetex', 'fglrx-control-center', '/^gimp-help/', '/^libreoffice-help/', 'libreoffice-base', '/^nvidia.*-doc-html/', if_($has_kde4, 'k3b', 'liblm_sensors3', 'xpdf-common', 'htdig', 'mirrordir', 'acr38u', 'ekiga', 'kdeaccessibility4', if_(!$has_gnome, 'gnome-media', 'yelp', 'pinentry-gtk2', 'polkit-gnome', 'seahorse', 'totem-mozilla'), ), ($ENV{DRAKLIVE_PRODUCT} =~ /liveusb-rw/i ? ('/openjdk/', 'java-1.5.0-gcj') : '/java/'), 'asihpi-firmware', 'hdsploader', 'mixartloader', 'pcxhrloader', 'usx2yloader', 'vxloader', 'drakfax', 'efax', ), if_($ENV{DRAKLIVE_PRODUCT} !~ /gaming/i, #- from task-kde Suggests 'kdegames', 'kdegames4', 'kdetoys', ), if_(!$ENV{DRAKLIVE_COMMERCIAL}, 'skype', ), #- bluez-pin provide if_(!$has_kde4, 'kbluetooth'), if_(!$has_kde4, 'compiz-decorator-kde4'), #- provides compiz-decorator if_(!$has_kde4, 'pinentry-qt4'), #- qt4 app 'kdebase-kate', 'kdeaddons-kate', #- development tool '/noatun/', #- prefer amarok #- FIXME: this broken package should be removed from non-free 'a320raid', 'rxvt', if_($ENV{DRAKLIVE_PRODUCT} =~ /guadec/i, 'rfbdrake'), if_($has_kde4, 'gdb'), #- suggested by one of the kde4 base package #exclude some packages that are too big from the KDE4 Live CD if_($ENV{DRAKLIVE_PRODUCT} !~ /liveusb-rw/i, if_($has_kde4, 'digikam'), if_($has_kde4, 'ufraw-gimp'), if_($has_kde4, 'marble-common'), if_($has_kde4, 'p7zip'), if_($has_kde4, 'mozilla-thunderbird'), #- we have kmail if_($has_gnome, 'mozilla-thunderbird', 'pan'), #- we have evolution #'aspell-ro', # lack of space :( arbitrary choice # since it's the biggest dict we have 'cpqarrayd', ), if_($has_gnome, 'beagle'), if_($has_moblin, 'task-3ddesktop-gtk'), '/^kernel-server-/', if_($ENV{DRAKLIVE_ARCH} ne 'x86_64', '/^kernel-deskop-/'), ], 'default_packages' => [ if_($has_kde4, "$distro_config-kde4-config"), if_($has_lxde, "mageia-lxde-config-$distro_release"), if_($has_xfce, "mageia-xfce-config-$distro_release"), if_($has_moblin, 'task-moblin'), #- broken updates if_($has_kde4, 'kde4-splash-mdv'), #- live resize/install/copy tools if_($ENV{DRAKLIVE_MEDIA} eq 'usb', 'draklive-resize'), if_($ENV{DRAKLIVE_PRODUCT} =~ /gaming/i, 'task-games'), #- should be in x11-driver-video (#42909) 'x11-driver-video-via', 'x11-driver-video-psb', if_($has_gnome, 'gnome-shell'), if_($ENV{DRAKLIVE_PRODUCT} =~ /liveusb-rw/i, 'samba-client', 'RealPlayer', 'RealPlayer-rpnp', 'java-1.6.0-sun', 'mozilla-firefox-ext-google-toolbar', 'filezilla', #- FIXME: bump to level 5 in rpmsrate? 'nut-server', 'mozilla-thunderbird', if_($ENV{DRAKLIVE_REGION} eq 'all', map { "mozilla-thunderbird-$_" } qw(ca cs de el es es_AR eu fi fr gu_IN he hu it ja ko nb nl pa_IN pl pt_BR ru sk sl sv tr zh_CN)), if_($ENV{DRAKLIVE_PRODUCT} =~ /guadec/i, 'fonts-ttf-gurmukhi', 'cheese', 'anjuta', ), ), ], 'preferred_packages' => join(',', $has_kde4 ? 'kdm' : 'gdm'), 'meta_class' => 'desktop', 'desktop' => first(@desktops), if_($ENV{DRAKLIVE_DEFAULT_USER}, 'autologin' => $ENV{DRAKLIVE_DEFAULT_USER}), # explicitely specify the security level, so that environment of the build machine doesn't take precedence 'security' => 1, 'useSupermount' => 'magicdev', 'users' => [ if_($ENV{DRAKLIVE_DEFAULT_USER}, { 'icon' => 'default', 'realname' => '', 'uid' => '', 'groups' => [], 'name' => $ENV{DRAKLIVE_DEFAULT_USER}, 'shell' => '/bin/bash', 'gid' => '' }), ], 'locale' => { 'country' => 'US', 'IM' => undef, 'lang' => 'en_US', 'langs' => +{ $ENV{DRAKLIVE_REGION} eq 'all' ? (all => 1) : (map { $_ => 1 } split(':', $ENV{DRAKLIVE_LANGS})) }, 'utf8' => 1 }, 'authentication' => { 'shadow' => 1, 'local' => 1, 'md5' => 1 }, 'superuser' => { 'pw' => '', 'realname' => 'root', 'uid' => '0', 'shell' => '/bin/bash', 'home' => '/root', 'gid' => '0' }, 'keyboard' => { 'GRP_TOGGLE' => '', 'KBCHARSET' => 'C', 'KEYBOARD' => 'us', 'KEYTABLE' => 'us' }, 'timezone' => { 'ntp' => undef, 'timezone' => 'America/New_York', 'UTC' => 1 }, 'X' => { disabled => 1 }, #- disable auto-configuration that may install unwanted packages 'match_all_hardware' => 1, 'excludedocs' => 0, 'postInstall' => join(";", "perl -pi -e 's/^id:3:initdefault:/id:5:initdefault:/' '/etc/inittab'", #- FIXME: in any::set_autologin, unlink if gdm/kdm conf file and binary exist if_($has_xfce || $has_lxde, "rm -f /etc/sysconfig/autologin"), if_($distro_theme eq 'Liveusb-Rw', #- set blue gtk theme for Liveusb-Rw in Gnome "/usr/bin/gconftool-2 --config-source=xml::/etc/gconf/gconf.xml.local-defaults/ --direct --type=string --set /apps/metacity/general/theme 'Ia Ora Blue'", "/usr/bin/gconftool-2 --config-source=xml::/etc/gconf/gconf.xml.local-defaults/ --direct --type=string --set /desktop/gnome/interface/gtk_theme 'Ia Ora Blue'", #- set blue gtk theme for Liveusb-Rw in GTK "perl -pi -e 's/META_CLASS=.*/META_CLASS=powerpack/' /etc/sysconfig/system", "echo MDV_MENU_STYLE=discovery > /etc/sysconfig/menustyle", ), ), 'autoExitInstall' => 1, 'keep_unrequested_dependencies' => 0, }; my $old = \&install::pkgs::empty_packages; undef *install::pkgs::empty_packages; *install::pkgs::empty_packages = sub { my $packages = &$old; $packages->{debug_URPM} = sub { log::l("XXX: $_[0]") }; $packages; };