From 6c17619e3da91cfc3e271812a55c23f869ffba62 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sun, 26 Nov 2017 12:31:02 +0000 Subject: More simplification and cleanup, now we just support hybrid ISO media. --- config/live.cfg | 62 +++++++++++++++++++++------------------------- config/settings-livecd.cfg | 14 ----------- config/settings.cfg | 15 ++++++++++- files/finish-install | 7 ++++++ files/finish-install.DVD | 7 ------ files/halt.local | 24 ++++++++++++++++++ files/halt.local.CD | 24 ------------------ files/live.modprobe | 1 + files/live.modprobe.CD | 1 - 9 files changed, 74 insertions(+), 81 deletions(-) delete mode 100644 config/settings-livecd.cfg mode change 120000 => 100644 config/settings.cfg create mode 100644 files/finish-install delete mode 100644 files/finish-install.DVD create mode 100755 files/halt.local delete mode 100755 files/halt.local.CD create mode 100644 files/live.modprobe delete mode 100644 files/live.modprobe.CD diff --git a/config/live.cfg b/config/live.cfg index b621369..5847636 100644 --- a/config/live.cfg +++ b/config/live.cfg @@ -64,19 +64,17 @@ my $_l = { [ '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 } ], - ), + #- eject eject medium before 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 } ], + #- do not load usblp and trigger autosetupprintqueues in live since cups is not available + [ 'files/live.modprobe', '/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 } ], + [ "files/finish-install", '/etc/sysconfig/finish-install', { 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 @@ -238,29 +236,25 @@ my $_l = { 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) - ], + media => { + storage => 'iso', + bootloader_timeout => 10, + boot_entries => [ "live" => " xdriver=free", + "live-nf" => " nokmsboot", + "linux" => " install xdriver=free", + "linux-nf" => " install nokmsboot", + ], + 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', '' ], ), - }, - mount => MDV::Draklive::Mounts::volatile_squash_union($use_modules), - ), + # FIXME: add doc and autorun + #[ 'extra/livecd/autorun/*', ''], + #map { [ 'extra/livecd/' . $_, $_ ] } qw(LISEZMOI.pdf README.pdf) + ], + }, + mount => MDV::Draklive::Mounts::volatile_squash_union($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.cfg b/config/settings.cfg deleted file mode 120000 index 6342e22..0000000 --- a/config/settings.cfg +++ /dev/null @@ -1 +0,0 @@ -settings-livecd.cfg \ No newline at end of file diff --git a/config/settings.cfg b/config/settings.cfg new file mode 100644 index 0000000..d739cbc --- /dev/null +++ b/config/settings.cfg @@ -0,0 +1,14 @@ +repository=/home/bcd/build_bcd/pieces/cauldron +additional_repository= +arch=x86_64 +desktop=GNOME +media=Hybrid +region=all +pack= +name=Mageia +product=Live +version=6 +commercial=0 +default_user=live +builddir=/home/draklive/var-data/build +chroot=/home/draklive/var-data/chroot diff --git a/files/finish-install b/files/finish-install new file mode 100644 index 0000000..fed1dd5 --- /dev/null +++ b/files/finish-install @@ -0,0 +1,7 @@ +FINISH_INSTALL=yes +NETWORK=no +URPMI=no +AUTHENTICATION=no +USERS=no +TIMEZONE=simplified +COUNTRY=simplified diff --git a/files/finish-install.DVD b/files/finish-install.DVD deleted file mode 100644 index fed1dd5..0000000 --- a/files/finish-install.DVD +++ /dev/null @@ -1,7 +0,0 @@ -FINISH_INSTALL=yes -NETWORK=no -URPMI=no -AUTHENTICATION=no -USERS=no -TIMEZONE=simplified -COUNTRY=simplified diff --git a/files/halt.local b/files/halt.local new file mode 100755 index 0000000..e27ad1d --- /dev/null +++ b/files/halt.local @@ -0,0 +1,24 @@ +#!/usr/bin/perl + +use lib qw(/usr/lib/libDrakX); +use MDK::Common; +use detect_devices; +use c; + +my ($device) = cat_("/proc/mounts") =~ m!(/dev/\S+)\s+/live/media\s+iso9660!; +$device or exit; + +# try to put halt/reboot in cache, if not called directly from them +# mount is also needed by end of /etc/init.d/halt +system("$_ --help &>/dev/null") foreach qw(halt mount reboot); + +my $f = detect_devices::tryOpen($device); +# see openCdromTray() from install::any +ioctl($f, c::CDROM_LOCKDOOR(), 0); # unlock door +ioctl($f, c::CDROMEJECT(), 0); + +system("clear"); +print "\n\n\nPlease press (or ) once the medium is removed.\n"; +system("read < /dev/console"); + +ioctl($f, c::CDROMCLOSETRAY(), 0); diff --git a/files/halt.local.CD b/files/halt.local.CD deleted file mode 100755 index e27ad1d..0000000 --- a/files/halt.local.CD +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/perl - -use lib qw(/usr/lib/libDrakX); -use MDK::Common; -use detect_devices; -use c; - -my ($device) = cat_("/proc/mounts") =~ m!(/dev/\S+)\s+/live/media\s+iso9660!; -$device or exit; - -# try to put halt/reboot in cache, if not called directly from them -# mount is also needed by end of /etc/init.d/halt -system("$_ --help &>/dev/null") foreach qw(halt mount reboot); - -my $f = detect_devices::tryOpen($device); -# see openCdromTray() from install::any -ioctl($f, c::CDROM_LOCKDOOR(), 0); # unlock door -ioctl($f, c::CDROMEJECT(), 0); - -system("clear"); -print "\n\n\nPlease press (or ) once the medium is removed.\n"; -system("read < /dev/console"); - -ioctl($f, c::CDROMCLOSETRAY(), 0); diff --git a/files/live.modprobe b/files/live.modprobe new file mode 100644 index 0000000..5bb2345 --- /dev/null +++ b/files/live.modprobe @@ -0,0 +1 @@ +install usblp /bin/true diff --git a/files/live.modprobe.CD b/files/live.modprobe.CD deleted file mode 100644 index 5bb2345..0000000 --- a/files/live.modprobe.CD +++ /dev/null @@ -1 +0,0 @@ -install usblp /bin/true -- cgit v1.2.1