#!/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_plasma5 = member('PLASMA5', @desktops); my $has_gnome = member('GNOME', @desktops); my $has_xfce = member('xfce4', @desktops); my $has_lxde = member('LXDE', @desktops); my $has_enlightenment = member('Enlightenment', @desktops); $o = { 'media' => [ { type => 'media_cfg', url => 'drakx://media', selected_names => join(',', 'Core Release', 'Core Updates', 'Nonfree Release', 'Nonfree 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_plasma5, qw(PLASMA5)), if_($has_gnome, qw(GNOME)), if_($has_xfce, qw(XFCE)), if_($has_lxde, qw(LXDE)), if_($has_enlightenment, qw(E17)), 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', 'denemo', # pulls in lilypond and texlive # no devel packages on live media 'glibc-devel', # pulls in devel deps 'empathy', # not needed on live medias 'virtuoso-opensource', if_($ENV{DRAKLIVE_PRODUCT} !~ /guadec/i, 'gcc'), if_($ENV{DRAKLIVE_ARCH} eq 'x86_64', #- !TYPE"64bit" packages are selected by default for live #- skip i586 ones if not relevant 'libqca1-tls', '/^lib64atlas3-/', ), if_($ENV{DRAKLIVE_ARCH} eq 'i586', '/^libatlas3-/', if_($ENV{DRAKLIVE_PRODUCT} =~ /LiveCD/i, # plasma livecd is too fat if_($has_plasma5, 'imagemagick', '/^kipi-plugins/', 'gimp', 'amarok', 'amarok-utils', 'nimbus-icon-theme', '/^libkf5/', 'mageia-doc-mcc-en', 'bind-utils', 'mc', 'openssh-server', 'jfsutils', 'hfsutils', 'pidgin-plugins', 'rsync', 'aria2', 'patch', 'fonts-ttf-dejavu', ), ), ), 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 'kde-wallpapers', '/-handbooks?-/', 'konsole-doc', #- KDE doc 'kdeaddons', 'kdenlive', 'kdepim-kpilot', if_($ENV{DRAKLIVE_PRODUCT} =~ /LiveCD/i, 'konversation'), # need space on kde disks 'kdepim-core', 'kaddressbook', 'knode', 'knotes', 'kontact', 'korganizer', 'kipi-plugins-piwigoexport', 'kipi-plugins-kopete', 'kipi-plugins-panorama', 'kipi-plugins-vkontakte', 'kipi-plugins-yandexfotki', 'kipi-plugins-smug', 'kipi-plugins-shwup', 'kipi-plugins-flashexport', 'kopete', 'kipi-plugins-expoblending', # pulls in hugin 'enblend', 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_plasma5, 'liblm_sensors3', 'xpdf-common', 'htdig', 'mirrordir', 'acr38u', 'ekiga', 'kdeaccessibility4', if_(!$has_gnome, 'gnome-media', 'yelp', 'pinentry-gtk2', 'polkit-gnome', 'seahorse', 'totem-mozilla', 'gnome-packagekit-common', 'gnome-keyring', ), ), #($ENV{DRAKLIVE_PRODUCT} =~ /liveusb-rw/i #? ('/openjdk/', 'java-1.5.0-gcj') #: '/java(?!scriptcoregtk\d+)/'), '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_plasma5, 'bluedevil'),# 'plasma-applet-kimpanel-backend-ibus'), if_(!$has_plasma5, 'pinentry-qt4'), #- qt4 app '/noatun/', #- prefer amarok 'rxvt', if_($ENV{DRAKLIVE_PRODUCT} =~ /guadec/i, 'rfbdrake'), if_($has_plasma5, 'gdb'), #- suggested by one of the plasma base package #exclude some packages that are too big from the PLASMA5 Live CD if_($ENV{DRAKLIVE_PRODUCT} !~ /liveusb-rw/i, if_($has_plasma5, 'digikam'), if_($has_plasma5, 'ufraw-gimp'), if_($has_plasma5, 'marble-common'), if_($has_plasma5, 'p7zip'), #if_($has_plasma5, 'thunderbird'), #- we have kmail if_($has_gnome, 'thunderbird', 'pan'), #- we have evolution 'cpqarrayd', ), if_($has_gnome, 'beagle', 'inkscape'), 'mono', # block the kernels we dont want if_($ENV{DRAKLIVE_ARCH} eq 'i586', '/^kernel-desktop-/', '/^fglrx-kernel-4\.3\.0-desktop-/', '/^nvidia-current-kernel-4\.3\.0-desktop-/', '/^nvidia340-kernel-4\.3\.0-desktop-', '/^nvidia304-kernel-4\.3\.0-desktop-', '/^vboxadditions-kernel-4\.3\.0-desktop-/'), '/^kernel-server-/', '/^fglrx-kernel-4\.3\.0-server-/', '/^nvidia-current-kernel-4\.3\.0-server-/', '/^nvidia340-kernel-4\.3\.0-server-/', '/^nvidia304-kernel-4\.3\.0-server-/', '/^vboxadditions-kernel-4\.3\.0-server-/', #if_($has_gnome, '/^fglrx-kernel-4\.3\.0-desktop/', 'x11-driver-video-fglrx', #), '/^broadcom-wl-/', if_($ENV{DRAKLIVE_PRODUCT} =~ /LiveCD/i, 'libreoffice-core', '/^java-1.8.0-/'), # not needed anymore (mga #2001) 'nspluginwrapper', 'nspluginwrapper-i386', #- no distribution license 'flash-player-plugin', # xguest sucks 'xguest', 'apper', # not wanted (mga #9752) 'al-anvar', # broken 'audacity', # not wanted 'mate-polkit', # theese are in live media 'broadcom-bcma-config', 'broadcom-ssb-config', if_($ENV{DRAKLIVE_REGION} eq 'int', 'ardour', 'ardour3', 'lftp', 'lm_sensors', 'kscd', 'tvtime', 'kamera', '/^plasma-applet-system-monitor-/', 'dragon', 'k3b'), ], 'default_packages' => [ if_($has_plasma5, "$distro_config-plasma5-config"), if_($has_lxde, "mageia-lxde-config-$distro_release"), if_($has_xfce, "mageia-xfce-config-$distro_release"), if_($ENV{DRAKLIVE_ARCH} eq 'i586', 'vboxadditions-kernel-desktop586-latest', 'nvidia-current-kernel-desktop586-latest', 'nvidia304-kernel-desktop586-latest'), if_($ENV{DRAKLIVE_ARCH} eq 'x86_64', 'vboxadditions-kernel-desktop-latest', 'nvidia-current-kernel-desktop-latest', 'nvidia304-kernel-desktop-latest', 'gummiboot'), #if_(!$has_gnome, #if_($ENV{DRAKLIVE_ARCH} eq 'i586', 'fglrx-kernel-desktop586-latest'), #if_($ENV{DRAKLIVE_ARCH} eq 'x86_64', 'fglrx-kernel-desktop-latest'), #'x11-driver-video-fglrx', #), 'x11-server-common', 'x11-driver-video-vboxvideo', 'x11-driver-video-nvidia-current', 'x11-driver-video-nvidia340', 'x11-driver-video-nvidia304', 'basesystem', 'x11-driver-video', 'x11-driver-input', 'bluez-firmware', 'mageiawelcome', 'usbutils', # we want lsusb 'shared-mime-info', # needed for .desktop files to work atleast in gnome 'mc', 'btrfs-progs', 'shorewall-ipv6', 'parted', 'glxinfo', 'patch', 'mageia-doc-mcc-en', 'bind-utils', 'mdadm', 'dmraid', if_($ENV{DRAKLIVE_REGION} eq 'all', 'vim-enhanced', '/^locales-/'), if_($has_gnome, 'gnome-shell', 'caribou', 'caribou-gtk3', 'brasero', 'gparted', 'gnome-classic-session', 'hexchat'), ], 'preferred_packages' => join(',', $has_plasma5 ? 'sddm' : '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, 'blowfish' => 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(";", # systemd boots by default to multiuser.target (old init 3), so change to graphical (old init 5) "ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target", # have inittab match systemd defaulting to init 5 "perl -pi -e 's/^id:3:initdefault:/id:5:initdefault:/' '/etc/inittab'", #- FIXME: in any::set_autologin, unlink if gdm/sddm 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; };