summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2020-06-09 16:42:36 +0100
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2020-06-09 16:44:11 +0100
commitbed434004d19cbf858031408274159954947a45d (patch)
tree421da5c8b6252ee1bd77524d1db83382c012c977
parent78874b12e319a3fa59bcc88bcd0ed2c3596881a1 (diff)
examples: add extra options in GUI example settings.
-rw-r--r--NEWS1
-rw-r--r--examples/gui/config/build.cfg116
-rw-r--r--examples/gui/config/settings.cfg6
3 files changed, 88 insertions, 35 deletions
diff --git a/NEWS b/NEWS
index b02aef5..7102571 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,5 @@
- draklive2: show installer summary screen when GUI is used
+- examples: add extra options in GUI example settings
1.14
diff --git a/examples/gui/config/build.cfg b/examples/gui/config/build.cfg
index f87a9f5..da401f2 100644
--- a/examples/gui/config/build.cfg
+++ b/examples/gui/config/build.cfg
@@ -2,8 +2,16 @@ my $distro = $build->{settings}{distro};
my $release = $build->{settings}{release};
my $product = $build->{settings}{product};
my $desktop = $build->{settings}{desktop};
+my $region = $build->{settings}{region};
my $arch = $build->{settings}{arch};
+my $show_licence = $build->{settings}{show_licence} =~ /^y/;
+my $show_welcome = $build->{settings}{show_welcome} =~ /^y/;
+my $live_installer = $build->{settings}{live_installer} =~ /^y/;
+my $nonfree_drivers = $build->{settings}{nonfree_drivers} =~ /^y/;
+
+my $finish_install = $show_licence || $region eq 'all';
+
my @user_config_dirs = ('/etc/skel');
sub build_label {
@@ -31,14 +39,21 @@ my $config = {
include_packages => [
# Support first time actions and draklive-install.
- 'busybox-static', 'drakx-installer-binaries-probe',
- 'drakx-finish-install', 'draklive-install',
+ if_($finish_install || $live_installer,
+ 'busybox-static', 'drakx-installer-binaries-probe',
+ 'drakx-finish-install',
+ ),
+ if_($live_installer,
+ 'draklive-install',
+ ),
# Satisfy the basesystem bootloader requirement.
'drakiso-null-bootloader',
# Allow patching during customisation.
'patch',
+
+ split(',', $build->{settings}{include_packages})
],
exclude_packages => [
if_($arch eq 'i586',
@@ -49,31 +64,44 @@ my $config = {
# No server kernels.
'/^kernel-server-/', '/^vboxadditions-kernel-.*-server-/',
+ if_(!$nonfree_drivers,
+ '/^x11-driver-video-nvidia/', '/^dkms-nvidia/', 'dkms-broadcom-wl',
+ ),
+
# 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',
+ # No distribution licence.
+ if_($show_licence,
+ 'flash-player-plugin',
+ ),
+
+ split(',', $build->{settings}{exclude_packages})
],
# preferred_packages => [
# ],
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',
- if_($arch eq 'x86_64',
- 'dkms-nvidia-current', 'x11-driver-video-nvidia-current',
+ if_($live_installer,
+ # core
+ 'efibootmgr', 'efivar', 'refind',
+ 'grub2', 'grub2-efi', 'grub2-mageia-theme', 'os-prober',
+ ),
+ if_($nonfree_drivers,
+ # core
+ 'broadcom-bcma-config',
+ 'broadcom-ssb-config',
+ 'dkms',
+ 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',
+ if_($arch eq 'x86_64',
+ 'dkms-nvidia-current', 'x11-driver-video-nvidia-current',
+ ),
),
],
@@ -99,8 +127,10 @@ my $config = {
# 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 } ],
+ if_($finish_install,
+ # 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),
@@ -108,11 +138,13 @@ my $config = {
# 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 } ],
+ if_($live_installer,
+ # sysconfig files for first boot after install.
+ [ 'files/draklive-install.d/finish-install', '/etc/draklive-install.d/sysconfig/finish-install', { 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 } ],
+ # 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)),
@@ -127,19 +159,27 @@ my $config = {
"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",
+ if_(!$show_welcome,
+ # Disable autostart of MageiaWelcome.
+ "mkdir -p /home/\$default_user/.config/mageiawelcome",
+ "touch /home/\$default_user/.config/mageiawelcome/norun.flag",
+ ),
- # Fix permissions for copied files.
- "chown -R \$default_user.\$default_user /home/\$default_user",
+ if_($live_installer,
+ # 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",
- # 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",
+ # 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",
+ # Allow draklive-install to spawn subtasks that access the display.
+ "echo 'session optional pam_xauth.so # for draklive-install' >> /etc/pam.d/polkit-1",
+ ),
+
+ # Fix permissions for copied files.
+ "chown -R \$default_user.\$default_user /home/\$default_user",
# 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
@@ -186,9 +226,15 @@ my $config = {
bootloader_timeout => 10,
bootloader_entries => [
'Boot Mageia Live' => { append => $default_append . ' noxconf' },
+ if_($nonfree_drivers,
' + use non-free NVIDIA drivers (slower to boot)' => { append => $default_append . ' nokmsboot' },
+ ),
+ if_($live_installer,
'Install Mageia Live' => { append => $default_append . ' noxconf install' },
+ ),
+ if_($live_installer && $nonfree_drivers,
' + use non-free NVIDIA drivers (slower to boot)' => { append => $default_append . ' nokmsboot install' },
+ ),
'Memory Test' => { command => 'linux16', image => '/boot/memtest', initrd => 'none' },
],
mbr_boot_img => '/usr/share/drakiso/bootloader/images/boot_hybrid.img',
diff --git a/examples/gui/config/settings.cfg b/examples/gui/config/settings.cfg
index cf8e95b..ff33880 100644
--- a/examples/gui/config/settings.cfg
+++ b/examples/gui/config/settings.cfg
@@ -4,5 +4,11 @@ product=Live
desktop=Custom
release=8
arch=x86_64
+show_licence=no
+show_welcome=no
+live_installer=no
+nonfree_drivers=no
+include_packages=
+exclude_packages=
repository=http://mirrors.kernel.org/mageia/distrib/8
workdir=