diff options
author | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2018-03-05 23:44:04 +0000 |
---|---|---|
committer | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2018-03-05 23:44:04 +0000 |
commit | 820b7dcaf0515c8c1c59e1d87185401693b0cf52 (patch) | |
tree | a80d6c708c6308e4da439546f34c220e16c84327 /examples/gui/config/build.cfg | |
parent | 55b6bf3e3187a8454853805a955749044f043724 (diff) | |
download | drakiso-820b7dcaf0515c8c1c59e1d87185401693b0cf52.tar drakiso-820b7dcaf0515c8c1c59e1d87185401693b0cf52.tar.gz drakiso-820b7dcaf0515c8c1c59e1d87185401693b0cf52.tar.bz2 drakiso-820b7dcaf0515c8c1c59e1d87185401693b0cf52.tar.xz drakiso-820b7dcaf0515c8c1c59e1d87185401693b0cf52.zip |
Add draklive2 examples.
Diffstat (limited to 'examples/gui/config/build.cfg')
-rw-r--r-- | examples/gui/config/build.cfg | 201 |
1 files changed, 201 insertions, 0 deletions
diff --git a/examples/gui/config/build.cfg b/examples/gui/config/build.cfg new file mode 100644 index 0000000..9d1be92 --- /dev/null +++ b/examples/gui/config/build.cfg @@ -0,0 +1,201 @@ +#!/usr/bin/perl -cw + +my $distro = $build->{settings}{distro}; +my $version = $build->{settings}{version}; +my $product = $build->{settings}{product}; +my $desktop = $build->{settings}{desktop}; +my $arch = $build->{settings}{arch}; + +my @user_config_dirs = ('/etc/skel'); + +sub build_label { + my ($build) = @_; + + join('-', $distro, $version, $product, $desktop, $arch); +} + +sub build_title { + my ($build) = @_; + + join(' ', $distro, $version, $product, $desktop); +} + +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 $_l = { + system => { + enabled_media => [ + 'Core Release', +# 'Core Updates', + 'Nonfree Release', +# 'Nonfree Updates', + ], + + include_packages => [ + # Support first time actions and draklive-install. + 'busybox-static', 'drakx-installer-binaries-probe', + 'drakx-finish-install', 'draklive-install', + + # Satisfy the basesystem bootloader requirement. + 'drakiso-null-bootloader', + + # Allow patching during customisation. + 'patch', + ], + 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', + ], + preferred_packages => [ + ], + local_repo_packages => [ + # core + 'broadcom-bcma-config', + 'broadcom-ssb-config', + 'dkms', + 'efibootmgr', 'efivar', + '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-nvidia304', 'x11-driver-video-nvidia304', + 'dkms-nvidia340', 'x11-driver-video-nvidia340', + 'dkms-nvidia-current', 'x11-driver-video-nvidia-current', + ], + + 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", + + # Have inittab match systemd defaulting to init 5. + "perl -pi -e 's/^id:3:initdefault:/id:5:initdefault:/' /etc/inittab", + ), + + langs_always => [ 'en_US' ], + + disable_services => [ + ], + 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 } ], + + # 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 } ], + + # Disable first boot wizard at live boot. + [ 'files/firstboot', '/etc/sysconfig/firstboot', { mode => 0644 } ], + + # 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 } ], + + # Eject medium before live system halt/reboot. + [ 'files/halt-local.service', '/etc/systemd/system/halt-local.service', { mode => 0644, no_install => 1 } ], + [ 'files/halt.local', '/sbin/halt.local', { mode => 0755, 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 } ], + [ 'files/draklive-install.d/firstboot', '/etc/draklive-install.d/sysconfig/firstboot', { 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 } ], + + ], + 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(';', + # Get default user name. + "default_user=`grep 1000:1000 /etc/passwd`", + "default_user=\${default_user%%:*}", + + # Add a desktop icon to run draklive-install (for DEs that support it). + "mkdir -p /home/\$default_user/Desktop", + "cp /usr/share/applications/mageia-draklive-install.desktop /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", + + # 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 => { + type => 'squashfs', + files => [ + { path => '/root/drakx' }, + ], + }, + }, + regions => { + # the "all" region has a magical behavior and selects all langs + }, + copy_from_repo => [ + 'isolinux/memtest' => "boot/memtest", + ], + media => { + storage => 'iso', + label => build_label($build), + bootloader_title => build_title($build), + 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 => '' }, + ], + }, + mount => MGA::DrakISO::Mounts::volatile_squash_union(), +}; |