summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/auto_inst.cfg.pl266
-rw-r--r--config/build.cfg332
-rw-r--r--config/live.cfg332
-rw-r--r--config/settings-livecd.cfg14
-rw-r--r--config/settings-liveusb-rw-GUADEC.cfg12
-rw-r--r--config/settings-liveusb-rw.cfg13
-rw-r--r--[l---------]config/settings.cfg11
7 files changed, 342 insertions, 638 deletions
diff --git a/config/auto_inst.cfg.pl b/config/auto_inst.cfg.pl
deleted file mode 100644
index 6abdab6..0000000
--- a/config/auto_inst.cfg.pl
+++ /dev/null
@@ -1,266 +0,0 @@
-#!/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_plasma = member('Plasma', @desktops);
-my $has_gnome = member('GNOME', @desktops);
-my $has_xfce = member('Xfce', @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} },
- ),
- ],
- # temporary (?) fix for mga#12299
- 'enabled_media' => [
- 'Core Release',
- 'Core Updates',
- 'Nonfree Release',
- 'Nonfree Updates',
- ],
- '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_plasma, qw(PLASMA5)),
- if_($has_gnome, qw(GNOME)),
- if_($has_xfce, qw(XFCE)),
- if_($has_lxde, qw(LXDE)),
- if_($has_enlightenment, qw(E17)),
- )),
- },
- # so that rpmsrate flags are really used
- 'compssListLevel' => 5, # default from install_steps_interactive
- 'skipped_packages' => [
-
- # i586 arch specific
- if_($ENV{DRAKLIVE_ARCH} eq 'i586',
- '/^kernel-desktop-/', '/^vboxadditions-kernel-.*-desktop-/',
- '/^libatlas3-/',
- ),
-
- # x86_64 arch specific
- if_($ENV{DRAKLIVE_ARCH} eq 'x86_64',
- '/^lib64atlas3-/',
- ),
-
- # no server kernels
- '/^kernel-server-/', '/^vboxadditions-kernel-.*-server-/',
- # no legacy bootloaders, we default to grub2
- 'grub', 'lilo',
- # no efi stuff - only needed for install, and shipped in live core repo
- 'grub2-efi', 'efibootmgr', 'efivar',
-
- # no devel packages on live media
- 'glibc-devel', 'gdb', 'gcc', 'gcc3.3', 'dkms',
- 'empathy', 'gnome-builder', # pulls devel stuff
-
- # shipped in live nonfree repo
- 'dkms-broadcom-wl', 'broadcom-wl-common',
- 'broadcom-bcma-config', 'broadcom-ssb-config',
- '/^x11-driver-video-fglrx/',
- '/^x11-driver-video-nvidia/',
-
- # huge deps
- 'denemo', # pulls in lilypond and texlive
- 'virtuoso-opensource', # not needed on live media
- 'mono', # bloat
-
- # old stuff
- 'aspell', 'aspell-en',
- 'asihpi-firmware', 'hdsploader', 'mixartloader', 'pcxhrloader', 'usx2yloader', 'vxloader',
- 'drakfax', 'efax', 'rxvt',
- 'nspluginwrapper','nspluginwrapper-i386', # not needed anymore (mga #2001)
-
- # broken stuff
- 'audacity', 'xguest', 'apper',
-
- # not wanted
- 'al-anvar', # (mga #9752)
- #'mate-polkit',
- 'openssh-server',
- 'manatools-gui',
-
- #- no distribution license
- 'flash-player-plugin',
-
- # Gnome specific stuff
- if_($has_gnome,
- 'beagle', 'inkscape',
- 'bluedevil', #- bluez-pin provide
- 'pinentry-qt4', #- qt4 app
- '/noatun/', #- prefer amarok
- 'polkit-kde-agent-1',
- ),
-
- # Plasma specific stuff
- if_($has_plasma,
- ),
- ],
-
- 'default_packages' => [
- if_($has_lxde, "mageia-lxde-config-$distro_release"),
-
- # i586 arch specific
- if_($ENV{DRAKLIVE_ARCH} eq 'i586',
- 'vboxadditions-kernel-desktop586-latest',
- ),
-
- # x86_64 arch specific
- if_($ENV{DRAKLIVE_ARCH} eq 'x86_64',
- 'vboxadditions-kernel-desktop-latest',
- ),
-
- # try to protect base packages from rpmlib/urpmi cascade bug
- 'basesystem', 'x11-server-common','x11-driver-video', 'x11-driver-input',
- 'x11-driver-video-vboxvideo',
-
- # utils wanted
- 'mc', 'btrfs-progs', 'shorewall-ipv6', 'hdparm', 'parted', 'glxinfo', 'patch',
- 'bind-utils', 'mdadm', 'dmraid', 'usbutils', # we want lsusb
- 'shared-mime-info', # needed for .desktop files to work atleast in gnome
- 'vim-enhanced', # full ediitor
- 'dnf', 'dnf-plugins-core', # some users want dnf
- 'manatools', # just the ncurses version
- 'simple-scan', # s-c-p wants this if it detects a combined printer/scanner
- 'Xdialog', # provides nicer UI for lxcontrol
-
- 'bluez-firmware', # missed firmware
-
- # mageia specific
- 'mageiawelcome', # nice helper app
- 'mageia-doc-mcc-en', # some nice docs
-
- # Gnome specific stuff
- if_($has_gnome,
- 'task-gnome', 'gdm', # sometimes gets nuked during build
- 'gnome-shell', 'caribou', 'caribou-gtk3', 'brasero', 'gparted', 'gnome-classic-session', 'hexchat',
- 'adwaita-gtk2-theme',
- ),
-
- # Plasma specific stuff
- if_($has_plasma,
- 'task-plasma5', 'sddm', # sometimes gets nuked during build
- ),
- # Xfce specific stuff
- if_($has_xfce,
- 'task-xfce4',
- 'gparted', # provides some options not currently supported in diskdrake
- ),
- ],
-
- 'preferred_packages' => join(',', $has_plasma ? '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,
- 'postInstallNonRooted' => join(";",
- # drakx-in-chroot roots the mount point one level higher when
- # the build system arch matches DRAKLIVE_ARCH.
- "if [ -d /tmp/media/$ENV{DRAKLIVE_ARCH} ]",
- "then cp /tmp/media/$ENV{DRAKLIVE_ARCH}/release-notes.* /mnt",
- "else cp /tmp/media/release-notes.* /mnt",
- "fi",
- "chmod 0644 /mnt/release-notes.*",
- ),
- '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"),
- ),
- '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;
-};
diff --git a/config/build.cfg b/config/build.cfg
new file mode 100644
index 0000000..71ffa02
--- /dev/null
+++ b/config/build.cfg
@@ -0,0 +1,332 @@
+my $distro = $build->{settings}{distro};
+my $version = $build->{settings}{version};
+my $product = $build->{settings}{product};
+my $arch = $build->{settings}{arch};
+my $default_user = $build->{settings}{default_user};
+
+my @desktops = split(/\|/, $build->{settings}{desktop});
+my $has_gnome = member('GNOME', @desktops);
+my $has_lxde = member('LXDE', @desktops);
+my $has_plasma = member('Plasma', @desktops);
+my $has_xfce = member('Xfce', @desktops);
+
+my @user_config_dirs = ('/etc/skel', '/home/' . $default_user);
+
+sub build_label {
+ my ($build) = @_;
+
+ join('-', $distro, $version, $product, $desktops[0], $arch);
+}
+
+sub build_title {
+ my ($build) = @_;
+
+ join(' ', $distro, $version, $product, $desktops[0]);
+}
+
+my $default_append = 'root=mgalive:LABEL=' . build_label($build) . ' splash quiet noiswmd audit=0 rd.luks=0 rd.lvm=0 rd.md=0 rd.dm=0';
+
+my $config = {
+ system => {
+ enabled_media => [
+ 'Core Release',
+ 'Core Updates',
+ 'Nonfree Release',
+ 'Nonfree Updates',
+ ],
+
+ rpmsrate_flags => [
+ 'LIVE',
+ (map { "CAT_$_" } (
+ # 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),
+ # config
+ qw(CONFIG),
+ # console
+ qw(EDITORS TERMINALS TEXT_TOOLS SHELLS FILE_TOOLS),
+ # system
+ qw(SYSTEM MINIMAL_DOCS X ACCESSIBILITY THEMES),
+ # desktop
+ if_($has_gnome, qw(GNOME)),
+ if_($has_lxde, qw(LXDE)),
+ if_($has_plasma, qw(PLASMA5)),
+ if_($has_xfce, qw(XFCE)),
+ ))
+ ],
+ rpmsrate_level => 5,
+
+ include_packages => [
+ # Satisfy the basesystem bootloader requirement.
+ 'drakiso-null-bootloader',
+
+ # Some extra admin tools.
+ 'bind-utils', 'btrfs-progs', 'dmraid', 'gparted', 'hdparm',
+ 'manatools', 'mc', 'mdadm', 'vim-enhanced',
+
+ # Mageia docs.
+ 'mageia-doc-mcc-en', 'mageia-doc-draklive-en',
+
+ # Allow patching during customisation.
+ 'patch',
+
+ # s-c-p wants this if it detects a combined printer/scanner.
+ 'simple-scan',
+
+ # Provide a nicer UI for lxcontrol.
+ 'Xdialog',
+
+ if_($has_gnome,
+ 'task-gnome',
+ 'adwaita-gtk2-theme', # Temporary fix for mga#20868.
+ 'hexchat', # Alternative IRC client.
+ ),
+
+ if_($has_lxde,
+ 'mageia-lxde-config-Default'
+ ),
+
+ if_($has_plasma,
+ 'task-plasma5',
+ ),
+
+ if_($has_xfce,
+ 'task-xfce',
+ ),
+ ],
+ exclude_packages => [
+ if_($arch eq 'i586',
+ # We want the desktop586 kernel for maximum hardware compatibility.
+ '/^kernel-desktop-/', '/^vboxadditions-kernel-.*-desktop-/',
+ ),
+
+ # No server kernels.
+ '/^kernel-server-/', '/^vboxadditions-kernel-.*-server-/',
+
+ # No bootloaders. The GRUB2 bootloaders are needed for install, so we add
+ # them to the local repo, which means they are automatically excluded.
+ 'grub', 'lilo',
+
+ # No distribution license.
+ 'flash-player-plugin',
+
+ # Unwanted stuff.
+ 'efax',
+
+ # Not yet ready.
+ 'manatools-gui',
+
+ if_($has_gnome,
+ 'gnome-builder',
+ 'inkscape',
+ 'polkit-kde-agent-1',
+ ),
+ ],
+ preferred_packages => [
+ if_($has_gnome, 'gdm'),
+ if_($has_plasma, 'sddm'),
+ ],
+ local_repo_packages => [
+ # core
+ 'broadcom-bcma-config',
+ 'broadcom-ssb-config',
+ 'dkms',
+ 'efibootmgr', 'efivar', 'refind',
+ 'grub2', 'grub2-efi', 'grub2-mageia-theme', 'os-prober',
+ if_($arch eq 'i586', 'kernel-desktop586-devel-latest'),
+ if_($arch eq 'x86_64', 'kernel-desktop-devel-latest'),
+
+ # nonfree
+ 'dkms-broadcom-wl',
+ 'dkms-nvidia340', 'x11-driver-video-nvidia340',
+ 'dkms-nvidia390', 'x11-driver-video-nvidia390',
+ 'dkms-nvidia-current', 'x11-driver-video-nvidia-current',
+ ],
+
+ langs_always => [ 'en_US' ],
+
+ post_install => 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",
+ ),
+
+ disable_services => [
+ # Uncommon hardware.
+ qw(bpalogin capi4linux cpqarrayd mdadm oki4daemon pcscd),
+ # Unneeded software.
+ qw(chronyd snmpd),
+ if_($has_gnome, qw(ntpd)),
+ # Slows down basic usage and install, reenabled after install.
+ qw(crond msec),
+ ],
+ disable_timers => [
+ ],
+ files => [
+ # Clean configuration files.
+ [ 'files/empty.conf', '/etc/dracut.conf.d/51-mageia-resume.conf', { mode => 0644 } ],
+ [ 'files/empty.conf', '/etc/modprobe.conf', { mode => 0644 } ],
+
+ # Provide a noxorgconf boot command option to try to fix issues with nouveau driver on some hardware.
+ [ 'files/10no-xorg-conf.xsetup', '/etc/X11/xsetup.d/10no-xorg-conf.xsetup', { mode => 0755 } ],
+
+ # Blacklist pata_acpi (mga#3395).
+ [ 'files/blacklist-ide.conf', '/etc/modprobe.d/blacklist-ide.conf', { mode => 0644 } ],
+
+ # Live media specific initrd.
+ [ 'files/dracut-live.conf', '/etc/dracut.conf.d/60-live.conf', { mode => 0644, no_install => 1 } ],
+
+ # Enable drakx-finish-install at live boot.
+ [ "files/finish-install", '/etc/sysconfig/finish-install', { mode => 0644 } ],
+
+ # Disable mgaonline in live mode.
+ (map { [ 'files/mgaonlinerc', $_ . '/.MgaOnline/mgaonline', { mode => 0644, no_install => 1 } ] } @user_config_dirs),
+
+ # Disable suspend and hibernate in live mode.
+ [ 'files/50-disable-suspend.pkla', '/etc/polkit-1/localauthority/50-local.d/50-disable-suspend.pkla', { mode => 0644, no_install => 1 } ],
+
+ # sysconfig files for first boot after install.
+ [ 'files/draklive-install.d/finish-install', '/etc/draklive-install.d/sysconfig/finish-install', { mode => 0644 } ],
+
+ # Reenable services in installed system.
+ [ 'files/draklive-install.d/services', '/etc/draklive-install.d/services', { mode => 0644 } ],
+
+ # Fix for sometimes wrong permissions after install.
+ [ 'files/draklive-install.d/run.d/home-live-permissions.sh', '/etc/draklive-install.d/run.d/home-live-permissions.sh', { mode => 755 } ],
+
+ if_($has_gnome,
+ # Add draklive-install icon to favourites in live mode and disable screen locking
+ # (override files are processed in alphabetical order - make sure this one comes last).
+ [ 'files/live.gschema.override', '/usr/share/glib-2.0/schemas/live.gschema.override', { mode => 0644, no_install => 1 } ],
+
+ # Disable Wayland when we know it won't work (workaround for mga#20079).
+ [ 'files/50gdm-disable-wayland.xsetup', '/etc/X11/xsetup.d/50gdm-disable-wayland.xsetup', { mode => 0755 } ],
+ ),
+
+ if_($has_plasma,
+ [ 'files/draklive-install.d/run.d/generate-gtk-icon-cache.sh', '/etc/draklive-install.d/run.d/generate-gtk-icon-cache.sh', { mode => 755 } ],
+
+ # Remove live user from SDDM greeter.
+ [ 'files/draklive-install.d/remove.d/clear-sddm-state', '/etc/draklive-install.d/remove.d/clear-sddm-state', { mode => 0644 } ],
+
+ # Disable Korganiser autostart.
+ [ 'files/korgacrc', '/etc/kde/korgacrc', { mode => 0644 } ],
+ ),
+
+ ],
+ remove_files => [
+ (map { "/etc/modprobe.preload.d/$_" } qw(cpufreq pcmcia rfswitch)),
+ "/etc/udev/rules.d/70-persistent-*.rules",
+ "/var/lib/dbus/machine-id",
+ "/etc/ssh/ssh_host_*",
+ ],
+ patches => [
+ ],
+ final_fixes => join(';',
+ if_($has_gnome,
+ # Modify and compile schema to get draklive-install and Firefox in menu.
+ "sed -i 's/epiphany.desktop/firefox.desktop/' /usr/share/glib-2.0/schemas/glib2-branding.gschema.override",
+ "glib-compile-schemas /usr/share/glib-2.0/schemas/",
+
+ # Fix permissions to enable GDM to rerun if the user logs out.
+ "chown -R gdm:gdm /var/lib/gdm",
+
+ # Switch to NetworkManager.
+ "systemctl -q disable network",
+ "systemctl -q disable network-up",
+ "systemctl -q enable NetworkManager.service",
+ "systemctl -q enable NetworkManager-wait-online.service",
+ "sed -i 's/NETWORK=yes/NETWORK=no/' /etc/draklive-install.d/sysconfig/finish-install",
+ "echo 'AUTOSTART=FALSE' > /home/live/.net_applet",
+ ),
+
+ if_($has_plasma,
+ "rm -f /usr/share/icons/*/icon-theme.cache",
+ "cp -a /etc/akonadi/mysql-global.conf /etc/akonadi/mysql-global-standard.conf",
+ "cp /etc/akonadi/mysql-global-mobile.conf /etc/akonadi/mysql-global.conf",
+ "ak=/etc/draklive-install.d/run.d/restore-akonadi-config.sh; echo -e '#!/bin/sh\ncp /etc/akonadi/mysql-global-standard.conf /etc/akonadi/mysql-global.conf' > \$ak; chmod +x \$ak",
+ ),
+
+ if_($has_xfce,
+ # Add a desktop icon to run draklive-install.
+ "mkdir -p /home/$default_user/Desktop",
+ "cp /usr/share/applications/mageia-draklive-install.desktop /home/$default_user/Desktop/draklive-install.desktop",
+ "chmod 750 /home/$default_user/Desktop/draklive-install.desktop",
+ ),
+
+ # Fix permissions for copied files.
+ "chown -R $default_user.$default_user /home/$default_user",
+
+ # Set default user name for draklive-install.
+ "echo $default_user > /etc/draklive-install.d/user",
+ "sed -i s/DEFAULT_USER/$default_user/ /etc/draklive-install.d/sysconfig/finish-install",
+
+ # Allow draklive-install to spawn subtasks that access the display.
+ "echo 'session optional pam_xauth.so # for draklive-install' >> /etc/pam.d/polkit-1",
+
+ # Disable HPLIP systray startup.
+ "echo 'Hidden=true' >> /etc/xdg/autostart/hplip-systray.desktop",
+
+ # Set the timestamp on the font directories to be a whole second
+ # fc-cache looks at the nano second portion which may be non-zero
+ # as we are on ext4, but then it will compare against the stamps
+ # on the squashfs live image which have whole second resolution
+ # (adapted from fix descrived in OpenMandriva bug 1764).
+ "find /usr/share/fonts -type d -exec touch -t \$(date +%Y%m%d%H%M.%S) '{}' ';'",
+ # Now update the cache for the new timestamps.
+ "fc-cache -rf",
+
+ # Set the initial wireless regulatory domain to "world", enabling
+ # all possible wireless channels to be used.
+ "sed -i -r 's/CRDA_DOMAIN=.*/CRDA_DOMAIN=00/' /etc/sysconfig/network",
+ ),
+
+ vga_mode => 788,
+ },
+ loopbacks => {
+ exclude => [
+ { path => '/root/drakx' },
+ ],
+ },
+ regions => {
+ int => [qw(en)],
+ },
+ media => {
+ label => build_label($build),
+ overlay_label => 'mgalive-persist',
+ bootloader_title => build_title($build),
+ bootloader_theme => 'bootloader/maggy',
+ bootloader_font => 'bootloader/unicode.pf2',
+ bootloader_langs => 'bootloader/lang-names.txt',
+ bootloader_messages => 'bootloader/messages',
+ bootloader_default => 0,
+ bootloader_timeout => 10,
+ bootloader_entries => [
+ 'Boot Mageia Live' => { append => $default_append . ' xdriver=free' },
+ ' + use non-free video drivers (slower to boot)' => { append => $default_append . ' nokmsboot' },
+ 'Install Mageia Live' => { append => $default_append . ' xdriver=free install' },
+ ' + use non-free video drivers (slower to boot)' => { append => $default_append . ' nokmsboot install' },
+ 'Memory Test' => { command => 'linux16', image => '/boot/memtest', initrd => 'none' },
+ ],
+ mbr_boot_img => 'bootloader/images/boot_hybrid.img',
+ eltorito_img => 'bootloader/images/eltorito.img',
+ if_($arch eq 'i586',
+ efi_type => '32bit',
+ boot32_efi => 'bootloader/images/bootia32.efi'
+ ),
+ if_($arch eq 'x86_64',
+ efi_type => '64bit',
+ boot64_efi => 'bootloader/images/bootx64.efi'
+ ),
+ copy_from_repo => [
+ 'autorun.inf' => 'files/autorun.inf',
+ 'dosutils' => 'files/dosutils',
+ 'isolinux/memtest' => "boot/memtest",
+ ],
+ },
+};
diff --git a/config/live.cfg b/config/live.cfg
deleted file mode 100644
index 30cce52..0000000
--- a/config/live.cfg
+++ /dev/null
@@ -1,332 +0,0 @@
-#!/usr/bin/perl -cw
-
-use MDK::Common;
-
-my $ooo_version = '3.0';
-my $use_modules = to_bool($live->{settings}{pack});
-my @user_config_dirs = ('/etc/skel', if_($live->{settings}{default_user}, '/home/' . $live->{settings}{default_user}));
-
-sub build_one_label {
- my ($live) = @_;
-
- my ($version, $extra) = split(/-/, $live->{settings}{version});
- $version .= "S" if $extra eq 'spring';
- "LABEL=" . join("-", "Mageia", $version, $live->{settings}{desktop}, $live->{settings}{product});
-}
-
-my $_l = {
- workdir => $live->{settings}{workdir},
- system => {
- root => $live->{settings}{chroot},
- repository => $live->{settings}{repository},
- auto_install => 'config/auto_inst.cfg.pl',
- install_env => {
- DRAKLIVE_DESKTOP => $live->{settings}{desktop},
- DRAKLIVE_MEDIA => $live->{settings}{media},
- DRAKLIVE_PRODUCT => $live->{settings}{product},
- DRAKLIVE_ARCH => $live->{settings}{arch},
- DRAKLIVE_ADDITIONAL_REPOSITORY => $live->{settings}{additional_repository},
- DRAKLIVE_COMMERCIAL => $live->{settings}{commercial},
- DRAKLIVE_DEFAULT_USER => $live->{settings}{default_user},
- },
- hide_media_dirs => to_bool($live->{settings}{product} =~ /liveusb-rw/i),
- if_($live->{settings}{default_user}, preselect_kdm_user => $live->{settings}{default_user}),
- langs_always => [ 'en_US' ],
- files => [
- if_($live->{settings}{desktop} eq 'GNOME',
- # fix gnome-shell not showing draklive-install icon in menu in live mode
- [ 'files/01_gsettings-desktop-schemas.gschema.override', '/usr/share/glib-2.0/schemas/01_gsettings-desktop-schemas.gschema.override', { mode => 0644, no_install => 1 } ],
- [ 'files/glib2-branding.gschema.override', '/usr/share/glib-2.0/schemas/glib2-branding.gschema.override', { mode => 0644 } ],
- # disable Wayland when we know it won't work (workaround for mga#20079)
- [ 'files/50gdm-disable-wayland.xsetup', '/etc/X11/xsetup.d/50gdm-disable-wayland.xsetup', { mode => 0755 } ],
- ),
- # provide a noxorgconf boot command option to try to fix issues with nouveau driver on some hardware
- [ 'files/10no-xorg-conf.xsetup', '/etc/X11/xsetup.d/10no-xorg-conf.xsetup', { mode => 0755 } ],
-
- # blacklist pata_acpi
- [ 'files/blacklist_ide.conf', '/etc/modprobe.d/blacklist_ide.conf', { mode => 0644 } ],
-
- # clean live files
- [ 'files/live.51-mageia-resume.conf', '/etc/dracut.conf.d/51-mageia-resume.conf', { mode => 0644 } ],
- [ 'files/live.modprobe.conf', '/etc/modprobe.conf', { mode => 0644 } ],
-
- # add local repos
- if_($live->{settings}{arch} eq 'i586',
- [ 'files/mga_rpms/i586/mga_rpms', '/var/local' ],
- ),
- if_($live->{settings}{arch} eq 'x86_64',
- [ 'files/mga_rpms/x86_64/mga_rpms', '/var/local' ],
- ),
-
- # add initial dns resolver for online medias
- [ 'files/resolv.conf', '/etc/resolv.conf', { mode => 0644 } ],
-
- # disable suspend and hibernate in live mode
- [ 'files/50-disable-suspend.pkla', '/etc/polkit-1/localauthority/50-local.d/50-disable-suspend.pkla', { mode => 0644, no_install => 1 } ],
- #- make cups the default spooler
- [ 'files/defaultspooler', '/etc/foomatic/defaultspooler', { mode => 0644 } ],
- if_(member($live->{settings}{media}, 'CD', 'DVD'),
- #- eject eject cd medium before halt/reboot
- [ 'files/halt-local.service', '/etc/systemd/system/halt-local.service', { mode => 0644, no_install => 1 } ],
- [ 'files/halt.local.CD', '/sbin/halt.local', { mode => 0755, no_install => 1 } ],
- #- do not load usblp and trigger autosetupprintqueues in live since cups is not available
- [ 'files/live.modprobe.CD', '/etc/modprobe.d/live.conf', { mode => 0644, no_install => 1 } ],
- # live media specific initrd
- [ 'files/live-dracut.conf', '/etc/dracut.conf.d/60-live.conf', { mode => 0644, no_install => 1 } ],
- ),
- #- disable first boot wizard at live boot
- [ 'files/firstboot', '/etc/sysconfig/firstboot', { mode => 0644 } ],
- #- enable drakx-finish-install at live boot
- [ "files/finish-install.$live->{settings}{media}", '/etc/sysconfig/finish-install', { mode => 0644 } ],
- #- disable speedboot for first boot after disk installation
- [ 'files/draklive-install.d/remove.d/disable-speedboot', '/etc/draklive-install.d/remove.d/disable-speedboot', { mode => 0644 } ],
- # fix for sometimes wrong permissions
- [ 'files/draklive-install.d/run.d/home-live-permissions.sh', '/etc/draklive-install.d/run.d/home-live-permissions.sh', { mode => 755 } ],
- # fix for /var/lib/gdm sometimes ending up as root:root
- if_($live->{settings}{desktop} eq 'GNOME',
- [ 'files/draklive-install.d/run.d/gdm-permissions.sh', '/etc/draklive-install.d/run.d/gdm-permissions.sh', { mode => 755 } ]
- ),
- if_($live->{settings}{desktop} eq 'Plasma',
- [ 'files/draklive-install.d/run.d/generate-gtk-icon-cache.sh', '/etc/draklive-install.d/run.d/generate-gtk-icon-cache.sh', { mode => 755 } ],
- [ 'files/draklive-install.d/remove.d/clear-sddm-state', '/etc/draklive-install.d/remove.d/clear-sddm-state', { mode => 0644 } ],
- ),
- #- sysconfig files for first boot
- [ $live->{settings}{media} eq 'usb' ?
- "files/finish-install.$live->{settings}{media}" :
- 'files/draklive-install.d/finish-install',
- '/etc/draklive-install.d/sysconfig/finish-install', { mode => 0644 } ],
- [ 'files/draklive-install.d/firstboot', '/etc/draklive-install.d/sysconfig/firstboot', { mode => 0644 } ],
- [ 'files/draklive-install.d/services', '/etc/draklive-install.d/services', { mode => 0644 } ],
- if_($live->{settings}{media} eq 'usb',
- [ 'files/draklive-install.d/draklive-resize', '/etc/draklive-install.d/sysconfig/draklive-resize', { mode => 0644 } ],
- ),
- #- don't make kbluetoothrc display an annoying and useless popup window, and disable it by default
- [ 'files/kbluetoothrc', '/etc/kde/kbluetoothrc', { mode => 0644 } ],
- [ 'files/korgacrc', '/etc/kde/korgacrc', { mode => 0644 } ],
- (map { [ 'files/mgaonlinerc', $_ . '/.MgaOnline/mgaonline', { mode => 0644, no_install => 1 } ] } @user_config_dirs),
- (map { [ 'files/draksnapshot.sysconfig', $_ . '/.draksnapshot', { mode => 0644, no_install => 1 } ] } @user_config_dirs),
- [ 'files/compute-ooo-dicts.pl', '/usr/sbin/compute-ooo-dicts.pl', { mode => 0755 } ],
- [ 'files/compute-i18n-list.pl', '/usr/sbin/compute-i18n-list.pl', { mode => 0755 } ],
- ],
- remove_files => [
- (map { "/etc/modprobe.preload.d/$_" } qw(cpufreq pcmcia rfswitch)),
- "/etc/udev/rules.d/70-persistent-*.rules",
- "/var/lib/dbus/machine-id",
- "/etc/ssh/ssh_host_*",
- ],
- module_options => {
- loop => "max_loop=64",
- },
- exclude_modules => [],
- additional_modules => [
- #'modules/i586/unionfs.ko',
- ],
- stage2_updates => [
- # [ "files/pkgs.pm", "/usr/lib/libDrakX/install/pkgs.pm" ],
- ],
- patches => [
- ],
- erase_rpms => [
- ],
- rpms => [
- ],
- disable_services => [
- # uncommon hardware
- qw(bpalogin capi4linux cpqarrayd mdadm oki4daemon pcscd),
- # unneeded software
- qw(chronyd ntpd snmpd),
- # slows down basic usage and install, reenabled after install
- qw(crond msec),
- ],
- disable_timers => [
- ],
- vga_mode => 788,
- gfxboot => $live->{settings}{media} ne 'usb', #- disable gfxboot on USB, buggy with grub on some systems
- if_($live->{settings}{media} eq 'usb',
- initrd_pre_pivot =>
- #- keep an unmodified live tree for draklive-install
- #- hack: mount it rw with a dummy branch and remount it ro later, current unionfs fails to mount ro directly
- #- hack: the union can not be "stacked" (i.e. mounted) over another union, so do it early in initrd, and use a tmpfs for the dummy branch, so it can be moved in the real root
- join("\n", map { "sh -c '$_'" }
- 'mkdir -p /live/source /live/dummy',
- 'mount -o mode=755,rw -t tmpfs none /live/dummy',
- 'mount -o dirs=/live/dummy=rw' . if_($use_modules, ':$(cat /live/modules.lst)') . ':/live/distrib=ro -t unionfs unionfs /live/source',
- ),
- ),
- initrd_post =>
- join("\n",
- if_($live->{settings}{media} eq 'usb', do {
- my $tmp = "/live/tmp";
- my @sticky = qw(/var/tmp /tmp);
- (
- "sh -c 'mkdir -p $tmp'",
- "mount -t tmpfs none $tmp",
- "mkdir $tmp/var",
- (map {
- ("mkdir $tmp$_", "mount -o dirs=$tmp$_=rw:/live/distrib$_=ro -t unionfs unionfs $_");
- } (qw(/var/log), @sticky)),
- "chmod 1777 @sticky",
- );
- }),
- ),
- postInstall => join(';',
- if_($live->{settings}{default_user}, "echo $live->{settings}{default_user} > /etc/draklive-install.d/user"),
- "perl -pi -e 's,<DEFAULT_USER>,$live->{settings}{default_user},' /etc/draklive-install.d/sysconfig/finish-install",
-
- if_($live->{settings}{desktop} eq 'Xfce' && $live->{settings}{default_user},
- # add a desktop icon to run draklive-install
- "mkdir -p /home/$live->{settings}{default_user}/Desktop",
- "cp /usr/share/applications/mageia-draklive-install.desktop /home/$live->{settings}{default_user}/Desktop/draklive-install.desktop",
- ),
-
- #- fix user perms for copied files
- if_($live->{settings}{default_user}, "chown -R " .
- "$live->{settings}{default_user}.$live->{settings}{default_user}" .
- " /home/$live->{settings}{default_user}"
- ),
-
- # remove readahead
- "rm -f /.readahead_collect",
-
- #- adduser seems to create a sparse lastlog with a slot for all available users
- #- which can be huge
- '> /var/log/lastlog',
- if_($live->{settings}{desktop} eq 'Plasma',
- "rm -f /usr/share/icons/*/icon-theme.cache",
- "cp -a /etc/akonadi/mysql-global.conf /etc/akonadi/mysql-global-standard.conf",
- "cp /etc/akonadi/mysql-global-mobile.conf /etc/akonadi/mysql-global.conf",
- "ak=/etc/draklive-install.d/run.d/restore-akonadi-config.sh; echo -e '#!/bin/sh\ncp /etc/akonadi/mysql-global-standard.conf /etc/akonadi/mysql-global.conf' > \$ak; chmod +x \$ak",
- ),
- if_($live->{settings}{desktop} eq 'GNOME',
- # compile schema to get draklive-install in menu
- "glib-compile-schemas /usr/share/glib-2.0/schemas/",
- # fix permissions to enable GDM to rerun if the user logs out
- "chown -R gdm:gdm /var/lib/gdm",
- # switch to NetworkManager
- "systemctl disable network",
- "systemctl disable network-up",
- "systemctl enable NetworkManager.service",
- "systemctl enable NetworkManager-wait-online.service",
- "sed -i 's/NETWORK=yes/NETWORK=no/' /etc/draklive-install.d/sysconfig/finish-install",
- "echo 'AUTOSTART=FALSE' > /home/live/.net_applet",
- ),
-
- # add local medias
- "urpmi.addmedia 'Live Core' /var/local/mga_rpms/core with media_info/hdlist.cz",
- "urpmi.addmedia 'Live Nonfree' /var/local/mga_rpms/nonfree with media_info/hdlist.cz",
-
- # disable HPLIP systray startup
- "echo 'Hidden=true' >> /etc/xdg/autostart/hplip-systray.desktop",
-
- # remove pre-installed grub2, we need to be able to select grub2 vs grub2-efi at install time
- "rpm -e --nodeps grub2",
-
- # allow draklive-install to spawn subtasks that access the display
- "echo 'session optional pam_xauth.so # for draklive-install' >> /etc/pam.d/polkit-1",
-
- # set the timestamp on the font directories to be a whole second
- # fc-cache looks at the nano second portion which may be non-zero
- # as we are on ext4, but then it will compare against the stamps
- # on the squashfs live image which have whole second resolution
- # (adapted from fix descrived in OpenMandriva bug 1764)
- "find /usr/share/fonts -type d -exec touch -t \$(date +%Y%m%d%H%M.%S) '{}' ';'",
- # now update the cache for the new timestamps
- "fc-cache -rf",
-
- # set the initial wireless regulatory domain to "world", enabling
- # all possible wireless channels to be used.
- "sed -i -r 's/CRDA_DOMAIN=.*/CRDA_DOMAIN=00/' /etc/sysconfig/network",
-
- # try to avoid plymouth falling back to text mode (mga#19984)
- "sed -i -r 's/DeviceTimeout=[0-9]+/DeviceTimeout=10/' /usr/share/plymouth/plymouthd.defaults",
- ),
- additional_media => [
- if_($live->{settings}{updates_repository},
- {
- name => 'core_updates_testing',
- path => $live->{settings}{updates_repository} . '/' . $live->{settings}{arch} . '/media/core/updates_testing',
- packages => [
- ],
- },
- ),
- ],
- },
- loopbacks => {
- exclude => {
- type => 'squashfs',
- files => [
- { path => '/root/drakx' },
- #- to skip a file list generated with:
- #- find /usr/share/doc/HTML -mindepth 1 -maxdepth 1 -type d > /root/drakx/HTML.skipped
- #{ source => '/root/drakx/HTML.skipped', rooted => 1 },
- ],
- },
- if_($use_modules, modules => [
- { type => 'squashfs', source => '/root/drakx/i18n-*.lst', rooted => 1 },
- ]),
- },
- regions => {
- #- the "all" region has a magical behavior and selects all langs
- int => [qw(en)],
- },
- packs => {
- int => [ map { "i18n-$_" } qw(en) ],
- },
- if_(member($live->{settings}{media}, 'CD', 'DVD'),
- media => {
- storage => 'cdrom',
- bootloader_timeout => 10,
- boot_entries => [ "live" => " xdriver=free",
- "live-nf" => " nokmsboot",
- "linux" => " install xdriver=free",
- "linux-nf" => " install nokmsboot",
- ],
- if_($live->{settings}{product} =~ /LiveCD|LiveDVD/i,
- source => build_one_label($live),
- pre => [ 'for i in seq 1 5; do showlabels --removable | grep ' . build_one_label($live) . '; if [ $? -eq 0 ]; then break; fi; sleep 1; done' ],
- extra_modules => [ qw(vfat sd_mod usb_storage ehci_hcd ehci_pci ehci_platform ohci_hcd ohci_pci ohci_platform uhci_hcd xhci_hcd xhci_pci xhci_plat_hcd) ],
- files => [
- if_($live->{settings}{arch} eq 'x86_64',
- [ 'files/UEFI/EFI', '' ],
- ),
- # FIXME: add doc and autorun
- #[ 'extra/livecd/autorun/*', ''],
- #map { [ 'extra/livecd/' . $_, $_ ] } qw(LISEZMOI.pdf README.pdf)
- ],
- ),
-
-
-
- },
- #extra_media => [ { storage => 'usb' } ],
- mount => MDV::Draklive::Mounts::volatile_squash_union($use_modules),
- ),
- if_($live->{settings}{media} eq 'usb',
- media => {
- storage => 'usb',
- bootloader_timeout => 1,
- mount_options => 'dmask=0000,fmask=0111',
- extra_boot => [ qw(cdrom) ],
- if_($live->{settings}{product} =~ /liveusb-rw/i,
- source => "LABEL=Mga_USB",
- title => "Mageia Live USB",
- boot_entries => [ "" => "" ],
- files => [
- [ 'extra/liveusb-rw-common/*', '' ],
- ($live->{settings}{commercial} ?
- [ 'extra/liveusb-rw-commercial/*', '' ] :
- [ 'extra/liveusb-rw/*', '' ]
- ),
- ],
- partitions => [
- {
- size => common::MB(8000),
- mntpoint => '/',
- },
- ],
- remove_files => [ '.svn', '*~' ],
- ),
- },
- mount => MDV::Draklive::Mounts::squash_union('1000M', '150M', $use_modules),
- ),
-};
diff --git a/config/settings-livecd.cfg b/config/settings-livecd.cfg
deleted file mode 100644
index 7f3bdbe..0000000
--- a/config/settings-livecd.cfg
+++ /dev/null
@@ -1,14 +0,0 @@
-repository=/home/bcd/build_bcd/pieces/cauldron
-additional_repository=
-arch=x86_64
-desktop=GNOME
-media=DVD
-region=all
-pack=
-name=Mageia
-product=LiveDVD
-version=6
-commercial=0
-default_user=live
-builddir=/home/draklive/var-data/build
-chroot=/home/draklive/var-data/chroot
diff --git a/config/settings-liveusb-rw-GUADEC.cfg b/config/settings-liveusb-rw-GUADEC.cfg
deleted file mode 100644
index 11a38d1..0000000
--- a/config/settings-liveusb-rw-GUADEC.cfg
+++ /dev/null
@@ -1,12 +0,0 @@
-repository=/mnt/BIG/dis/official/2008.1
-additional_repository=http://192.168.100.8/dis/official/2008.1
-arch=i586
-desktop=GNOME
-media=usb
-region=guadec
-pack=
-name=mageia
-product=liveusb-guadec
-version=1
-commercial=0
-default_user=guest
diff --git a/config/settings-liveusb-rw.cfg b/config/settings-liveusb-rw.cfg
deleted file mode 100644
index 20569d8..0000000
--- a/config/settings-liveusb-rw.cfg
+++ /dev/null
@@ -1,13 +0,0 @@
-repository=/mnt/BIG/dis/official/2010.0
-updates_repository=
-additional_repository=
-arch=i586
-desktop=KDE4
-media=usb
-region=all
-pack=int
-name=mageia
-product=liveusb
-version=1
-commercial=1
-default_user=
diff --git a/config/settings.cfg b/config/settings.cfg
index 6342e22..cbe4e04 120000..100644
--- a/config/settings.cfg
+++ b/config/settings.cfg
@@ -1 +1,10 @@
-settings-livecd.cfg \ No newline at end of file
+vendor=Mageia
+distro=Mageia
+product=Live
+desktop=Xfce
+version=7
+arch=x86_64
+region=all
+default_user=live
+repository=/home/bcd/build_bcd/pieces/cauldron
+workdir=/home/draklive/var-data