From 5da42d985f5bc84029fed3fc8cd9e53197dc00d6 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sat, 25 Nov 2017 21:09:10 +0000 Subject: Remove obsolete files. We build hybrid ISOs, so don't need separate USB images. Various other files are no longer used amywhere. --- config/settings-liveusb-rw-GUADEC.cfg | 12 --------- config/settings-liveusb-rw.cfg | 13 ---------- files/GUADEC-booklet.desktop | 6 ----- files/desktop-directories-liveusb-rw | 37 ---------------------------- files/draklive-install.desktop | 38 ----------------------------- files/draklive-install.usb | 1 - files/finish-install.CD | 7 ------ files/finish-install.usb | 6 ----- files/halt.local.DVD | 24 ------------------ files/interfaces | 12 --------- files/live.modprobe.DVD | 1 - files/portable-directories-flash-liveusb-rw | 22 ----------------- files/register.desktop | 27 -------------------- files/xdg-email-hook.sh | 4 --- 14 files changed, 210 deletions(-) delete mode 100644 config/settings-liveusb-rw-GUADEC.cfg delete mode 100644 config/settings-liveusb-rw.cfg delete mode 100644 files/GUADEC-booklet.desktop delete mode 100755 files/desktop-directories-liveusb-rw delete mode 100755 files/draklive-install.desktop delete mode 100644 files/draklive-install.usb delete mode 100644 files/finish-install.CD delete mode 100644 files/finish-install.usb delete mode 100755 files/halt.local.DVD delete mode 100644 files/interfaces delete mode 100644 files/live.modprobe.DVD delete mode 100755 files/portable-directories-flash-liveusb-rw delete mode 100755 files/register.desktop delete mode 100755 files/xdg-email-hook.sh 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/files/GUADEC-booklet.desktop b/files/GUADEC-booklet.desktop deleted file mode 100644 index ca2492e..0000000 --- a/files/GUADEC-booklet.desktop +++ /dev/null @@ -1,6 +0,0 @@ -[Desktop Entry] -Icon=distributor-logo -Encoding=UTF-8 -Name=GUADEC Booklet -Type=Link -URL=http://assets.expectnation.com/9/eventprovider/9/booklet.pdf diff --git a/files/desktop-directories-liveusb-rw b/files/desktop-directories-liveusb-rw deleted file mode 100755 index 3fd7635..0000000 --- a/files/desktop-directories-liveusb-rw +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh - -LIVEUSB_LOCK="$HOME/.liveusb-folders" -LIVEUSB_ROOT=/live/media -[ -e "$LIVEUSB_ROOT/My Documents" ] && LIVEUSB_ALA_WINDOWS=1 - -[ -e $LIVEUSB_LOCK ] && exit - -while pidof -x xdg-user-dirs-update; do - [ "$SECONDS" -le 60 ] || return - sleep 1 -done - -function create_link() { - NAME=$1 - SRC=$2 - [ -z "$SRC" ] && SRC=$($NAME) - XDG_DIR=$(xdg-user-dir $NAME) - LIVEUSB_DIR="$LIVEUSB_ROOT/$SRC" - mkdir -p "$LIVEUSB_DIR" - mv $XDG_DIR/{.??,}* "$LIVEUSB_DIR" - rmdir $XDG_DIR && ln -sf "$LIVEUSB_DIR" "$XDG_DIR" -} - -if [ -n "$LIVEUSB_ALA_WINDOWS" ]; then - create_link "DOCUMENTS" "My Documents" - create_link "DOWNLOAD" "My Documents/My Downloads" - create_link "MUSIC" "My Documents/My Music" - create_link "PICTURES" "My Documents/My Images" - create_link "VIDEOS" "My Documents/My Video" -else - for d in DOWNLOAD DOCUMENTS MUSIC PICTURES VIDEOS; do - create_link $d $(echo $d | tr A-Z a-z) - done -fi - -touch $LIVEUSB_LOCK diff --git a/files/draklive-install.desktop b/files/draklive-install.desktop deleted file mode 100755 index 7671a60..0000000 --- a/files/draklive-install.desktop +++ /dev/null @@ -1,38 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Exec=/usr/bin/draklive-install-lock-storage -Icon=draklive-install -Terminal=false -Type=Application -StartupNotify=true -Name=Install on Hard Disk -Name[ar]=التنصيب إلى القرص الصلب -Name[br]=Staliañ war ar bladenn kalet -Name[ca]=Instal·la al Disc Dur -Name[cs]=Instalace na pevný disk -Name[da]=Installér på harddisk -Name[de]=Auf die Festplatte installieren -Name[el]=Εγκατάσταση στο σκληρό δίσκο -Name[es]=Instalar en el Disco Duro -Name[et]=Paigaldamine kõvakettale -Name[eu]=Instalatu disko zurrunean -Name[fi]=Asenna kiintolevylle -Name[fr]=Installer sur disque dur -Name[hu]=Telepítés a merevlemezre -Name[id]=Install ke Hard Disk -Name[it]=Installa sul disco fisso -Name[ky]=Катуу дискке орнотуу -Name[nb]=Installer på harddisk -Name[nl]=Installeer op de harde schijf -Name[nn]=Installer på harddisken -Name[pl]=Zainstaluj na dysku twardym -Name[pt]=Instalar no Disco Rígido -Name[pt_BR]=Instalar no Disco Rígido -Name[ro]=Instalare pe discul dur -Name[ru]=Установка на жесткий диск -Name[sl]=Namestitev na trdi disk -Name[sv]=Installera på hårddisk -Name[tr]=Sabit diske kur -Name[uk]=Встановити на жорсткий диск -Name[zh_CN]=安装到硬盘 -Name[zh_TW]=安裝在硬碟上 diff --git a/files/draklive-install.usb b/files/draklive-install.usb deleted file mode 100644 index fbfa41c..0000000 --- a/files/draklive-install.usb +++ /dev/null @@ -1 +0,0 @@ -SOURCE=/live/source diff --git a/files/finish-install.CD b/files/finish-install.CD deleted file mode 100644 index fed1dd5..0000000 --- a/files/finish-install.CD +++ /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/finish-install.usb b/files/finish-install.usb deleted file mode 100644 index 467f1ac..0000000 --- a/files/finish-install.usb +++ /dev/null @@ -1,6 +0,0 @@ -FINISH_INSTALL=yes -USERS=with_root -AUTHENTICATION=no -USER_AUTOLOGIN_FIRST=yes -TIMEZONE=simplified -COUNTRY=simplified diff --git a/files/halt.local.DVD b/files/halt.local.DVD deleted file mode 100755 index e27ad1d..0000000 --- a/files/halt.local.DVD +++ /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/interfaces b/files/interfaces deleted file mode 100644 index 6d2f918..0000000 --- a/files/interfaces +++ /dev/null @@ -1,12 +0,0 @@ -# -# Shorewall6 version 4 - Interfaces File -# -# For information about entries in this file, type "man shorewall6-interfaces" -# -# The manpage is also online at -# http://www.shorewall.net/manpages6/shorewall6-interfaces.html -# -############################################################################### -?FORMAT 2 -############################################################################### -#ZONE INTERFACE OPTIONS diff --git a/files/live.modprobe.DVD b/files/live.modprobe.DVD deleted file mode 100644 index 5bb2345..0000000 --- a/files/live.modprobe.DVD +++ /dev/null @@ -1 +0,0 @@ -install usblp /bin/true diff --git a/files/portable-directories-flash-liveusb-rw b/files/portable-directories-flash-liveusb-rw deleted file mode 100755 index dbdda92..0000000 --- a/files/portable-directories-flash-liveusb-rw +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -function create_mozilla_profile() { - USER_DIR=$1 - PORTABLE_DIR=$2 - [ -d $USER_DIR ] && return - mkdir -p $USER_DIR - ln -sf "$PORTABLE_DIR/Data/profile" $USER_DIR - cat > "$USER_DIR/profiles.ini" < /dev/null` -[ -z "$MAILER" ] && MAILER=/usr/bin/xdg-email -exec $MAILER $@ -- cgit v1.2.1 From 88f285ecc555ba90c33a1137a6a5fa1fa8d9ffa4 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sun, 26 Nov 2017 00:07:46 +0000 Subject: Minimise differences with default Mageia/GNOME configuration. Modify rather than overwrite glib2-branding.gschema.override. Remove obsolete register.desktop from favourites. --- config/live.cfg | 9 +-- .../01_gsettings-desktop-schemas.gschema.override | 5 -- files/glib2-branding.gschema.override | 73 ---------------------- files/live.gschema.override | 5 ++ 4 files changed, 10 insertions(+), 82 deletions(-) delete mode 100644 files/01_gsettings-desktop-schemas.gschema.override delete mode 100644 files/glib2-branding.gschema.override create mode 100644 files/live.gschema.override diff --git a/config/live.cfg b/config/live.cfg index 30cce52..1ca4356 100644 --- a/config/live.cfg +++ b/config/live.cfg @@ -34,9 +34,9 @@ my $_l = { 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 } ], + # 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 } ], ), @@ -198,7 +198,8 @@ my $_l = { "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 + # 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", diff --git a/files/01_gsettings-desktop-schemas.gschema.override b/files/01_gsettings-desktop-schemas.gschema.override deleted file mode 100644 index 5702350..0000000 --- a/files/01_gsettings-desktop-schemas.gschema.override +++ /dev/null @@ -1,5 +0,0 @@ -[org.gnome.shell] -favorite-apps = [ 'mageia-draklive-install.desktop', 'register.desktop', 'firefox.desktop', 'evolution.desktop', 'empathy.desktop', 'rhythmbox.desktop', 'shotwell.desktop', 'libreoffice-writer.desktop', 'nautilus.desktop', 'gnome-documents.desktop'] - -[org.gnome.desktop.screensaver] -lock-enabled=false diff --git a/files/glib2-branding.gschema.override b/files/glib2-branding.gschema.override deleted file mode 100644 index b4184eb..0000000 --- a/files/glib2-branding.gschema.override +++ /dev/null @@ -1,73 +0,0 @@ -[org.gnome.desktop.interface] -## No accessibility by default, until we're 100% there's no regression -toolkit-accessibility = false -### For the theme, we stay with the defaults -## Note: for non-GNOME sessions, the cursor theme is defined in /var/adm/fillup-templates/sysconfig.windowmanager-desktop-data-openSUSE from desktop-data-openSUSE -# cursor-theme = "" -## Note: gtk[23]-branding-%{branding_name} must contain the same defaults for icon and gtk, otherwise the theme will change when gnome-settings-daemon starts -# icon-theme = "" -#gtk-theme = "oxygen-gtk" - -[org.gnome.desktop.background] -## Default wallpaper -picture-uri = "file:///usr/share/mga/backgrounds/default.jpg" -picture-options = "stretched" -primary-color = "#258c06" -secondary-color = "#258c06" - -[org.gnome.desktop.screensaver] -## Default wallpaper -picture-uri = "file:///usr/share/mga/backgrounds/default.jpg" -picture-options = "stretched" -primary-color = "#258c06" -secondary-color = "#258c06" - -[org.gnome.login-screen] -## Logo in the gdm login dialog -# logo='/usr/share/icons/hicolor/scalable/apps/distributor.svg' - -[org.gnome.libgnomekbd.desktop] -## Set keyboard layout global per session instead of per window -#group-per-window = false - -[org.gnome.desktop.sound] -## Make sure to have event sounds by default -event-sounds = true - -[org.gnome.desktop.wm.preferences] -## Audible bell is more annoying than useful -audible-bell = false -### For the theme, we stay with the defaults -# titlebar-uses-system-font = false -# titlebar-font = "" -# theme = "" - -[org.gnome.settings-daemon.plugins.xsettings] -## the PackageKit gtk+ module is too spammy, fdo#23917 -disabled-gtk-modules = [ "pk-gtk-module" ] - -[org.gnome.settings-daemon.plugins.media-keys] -help = "XF86Help" - -[org.gnome.shell] -## Default apps shown in the gnome-shell dash -favorite-apps = [ 'mageia-draklive-install.desktop', 'register.desktop', 'firefox.desktop', 'evolution.desktop', 'empathy.desktop', 'rhythmbox.desktop', 'shotwell.desktop', 'libreoffice-writer.desktop', 'nautilus.desktop', 'gnome-documents.desktop', 'mageia-drakconf.desktop' ] -## Default extensions that are enabled -#enabled-extensions = [ 'alternative-status-menu@gnome-shell-extensions.gnome.org' ] - -[org.gnome.gnome-panel.applet.window-list] -## Display all workspaces in the gnome-panel window list applet -#display-all-workspaces = true - -[org.freedesktop.Tracker.Miner.Files] -## Disable indexing on removable media -index-removable-devices = false - -[org.gnome.eog.ui] -## External editor to use when editing image -external-editor = "gimp.desktop" - -# ovitters: disable to avoid longstanding bug causing occasional 100% CPU usage -# in gnome-settings-daemon as well as a blinking numlock -[org.gnome.settings-daemon.peripherals.keyboard] -remember-numlock-state = false diff --git a/files/live.gschema.override b/files/live.gschema.override new file mode 100644 index 0000000..9eefe6c --- /dev/null +++ b/files/live.gschema.override @@ -0,0 +1,5 @@ +[org.gnome.shell] +favorite-apps = [ 'mageia-draklive-install.desktop', 'firefox.desktop', 'evolution.desktop', 'empathy.desktop', 'rhythmbox.desktop', 'shotwell.desktop', 'libreoffice-writer.desktop', 'nautilus.desktop', 'gnome-documents.desktop'] + +[org.gnome.desktop.screensaver] +lock-enabled=false -- cgit v1.2.1 From 9035e779ef7f3d3ed009a617326fa8c0017ad1d9 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sun, 26 Nov 2017 00:23:52 +0000 Subject: Remove obsolete disabling of speedboot. --- config/live.cfg | 2 -- files/draklive-install.d/remove.d/disable-speedboot | 1 - 2 files changed, 3 deletions(-) delete mode 100644 files/draklive-install.d/remove.d/disable-speedboot diff --git a/config/live.cfg b/config/live.cfg index 1ca4356..2d55926 100644 --- a/config/live.cfg +++ b/config/live.cfg @@ -78,8 +78,6 @@ my $_l = { [ '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 diff --git a/files/draklive-install.d/remove.d/disable-speedboot b/files/draklive-install.d/remove.d/disable-speedboot deleted file mode 100644 index 7bc22d6..0000000 --- a/files/draklive-install.d/remove.d/disable-speedboot +++ /dev/null @@ -1 +0,0 @@ -/var/lib/speedboot/status -- cgit v1.2.1 From 13cc2c8f810bc74e09bbde788df71b9cff091727 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sun, 26 Nov 2017 00:40:55 +0000 Subject: Remove more obsolete configuration values. Mostly stuff that used to be needed when we had separate USB media, plus a few lines that had been commented out rather than deleted. --- config/live.cfg | 70 ++------------------------------ files/draklive-install.d/draklive-resize | 1 - 2 files changed, 4 insertions(+), 67 deletions(-) delete mode 100644 files/draklive-install.d/draklive-resize diff --git a/config/live.cfg b/config/live.cfg index 2d55926..46dc76f 100644 --- a/config/live.cfg +++ b/config/live.cfg @@ -29,7 +29,7 @@ my $_l = { DRAKLIVE_COMMERCIAL => $live->{settings}{commercial}, DRAKLIVE_DEFAULT_USER => $live->{settings}{default_user}, }, - hide_media_dirs => to_bool($live->{settings}{product} =~ /liveusb-rw/i), + hide_media_dirs => 0, if_($live->{settings}{default_user}, preselect_kdm_user => $live->{settings}{default_user}), langs_always => [ 'en_US' ], files => [ @@ -89,15 +89,9 @@ my $_l = { [ '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/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 } ], @@ -117,10 +111,8 @@ my $_l = { }, exclude_modules => [], additional_modules => [ - #'modules/i586/unionfs.ko', ], stage2_updates => [ - # [ "files/pkgs.pm", "/usr/lib/libDrakX/install/pkgs.pm" ], ], patches => [ ], @@ -139,34 +131,9 @@ my $_l = { 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', - ), + gfxboot => 1, + initrd_post => join("\n", ), - 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,,$live->{settings}{default_user},' /etc/draklive-install.d/sysconfig/finish-install", @@ -297,35 +264,6 @@ my $_l = { }, - #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/files/draklive-install.d/draklive-resize b/files/draklive-install.d/draklive-resize deleted file mode 100644 index 5d33155..0000000 --- a/files/draklive-install.d/draklive-resize +++ /dev/null @@ -1 +0,0 @@ -DRAKLIVE_RESIZE=no -- cgit v1.2.1 From 548523823efec3a6f8a11ed588df558f39356595 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sun, 26 Nov 2017 11:25:08 +0000 Subject: Fix white space errors and apply consistent indentation. Don't use hard tabs for indentation, as that was more common. --- config/auto_inst.cfg.pl | 442 ++++++++++++++++++++++++------------------------ config/live.cfg | 216 ++++++++++++----------- 2 files changed, 329 insertions(+), 329 deletions(-) diff --git a/config/auto_inst.cfg.pl b/config/auto_inst.cfg.pl index 6abdab6..a12150d 100644 --- a/config/auto_inst.cfg.pl +++ b/config/auto_inst.cfg.pl @@ -1,5 +1,5 @@ #!/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). @@ -16,246 +16,248 @@ 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' => [ + '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-/', - ), + # 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-/', - ), + # 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 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 + # 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/', + # 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 + # 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) + # 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', + # broken stuff + 'audacity', 'xguest', 'apper', - # not wanted - 'al-anvar', # (mga #9752) - #'mate-polkit', - 'openssh-server', - 'manatools-gui', + # not wanted + 'al-anvar', # (mga #9752) + #'mate-polkit', + 'openssh-server', + 'manatools-gui', - #- no distribution license - 'flash-player-plugin', + #- 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', - ), + # 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, - ), - ], + # Plasma specific stuff + if_($has_plasma, + ), + ], - 'default_packages' => [ - if_($has_lxde, "mageia-lxde-config-$distro_release"), + 'default_packages' => [ + if_($has_lxde, "mageia-lxde-config-$distro_release"), - # i586 arch specific - if_($ENV{DRAKLIVE_ARCH} eq 'i586', - 'vboxadditions-kernel-desktop586-latest', - ), + # 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', - ), + # 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 + # try to protect base packages from rpmlib/urpmi cascade bug + 'basesystem', 'x11-server-common','x11-driver-video', 'x11-driver-input', + 'x11-driver-video-vboxvideo', - 'bluez-firmware', # missed firmware + # 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 - # mageia specific - 'mageiawelcome', # nice helper app - 'mageia-doc-mcc-en', # some nice docs + 'bluez-firmware', # missed firmware - # 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', - ), + # mageia specific + 'mageiawelcome', # nice helper app + 'mageia-doc-mcc-en', # some nice docs - # 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 - ), - ], + # 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', + ), - '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, - }; + # 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; diff --git a/config/live.cfg b/config/live.cfg index 46dc76f..6e80509 100644 --- a/config/live.cfg +++ b/config/live.cfg @@ -7,11 +7,11 @@ 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 ($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 ($version, $extra) = split(/-/, $live->{settings}{version}); + $version .= "S" if $extra eq 'spring'; + "LABEL=" . join("-", "Mageia", $version, $live->{settings}{desktop}, $live->{settings}{product}); } my $_l = { @@ -33,15 +33,15 @@ my $_l = { if_($live->{settings}{default_user}, preselect_kdm_user => $live->{settings}{default_user}), langs_always => [ 'en_US' ], files => [ - if_($live->{settings}{desktop} eq '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_($live->{settings}{desktop} eq '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 } ], ), - # 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 } ], + # 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 } ], @@ -50,16 +50,16 @@ my $_l = { [ '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 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 } ], + # 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 } ], @@ -80,14 +80,14 @@ my $_l = { [ "files/finish-install.$live->{settings}{media}", '/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 - 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 } ], - ), + # 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 [ '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 } ], @@ -109,7 +109,8 @@ my $_l = { module_options => { loop => "max_loop=64", }, - exclude_modules => [], + exclude_modules => [ + ], additional_modules => [ ], stage2_updates => [ @@ -121,12 +122,12 @@ my $_l = { 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), + # 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 => [ ], @@ -135,77 +136,77 @@ my $_l = { initrd_post => join("\n", ), postInstall => join(';', - if_($live->{settings}{default_user}, "echo $live->{settings}{default_user} > /etc/draklive-install.d/user"), - "perl -pi -e 's,,$live->{settings}{default_user},' /etc/draklive-install.d/sysconfig/finish-install", + if_($live->{settings}{default_user}, "echo $live->{settings}{default_user} > /etc/draklive-install.d/user"), + "perl -pi -e 's,,$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", - ), + 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}" - ), + #- 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", + # 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', - # 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 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", - ), + #- 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', + # 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 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", + # 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", + # 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", + # 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", + # 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 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", + # 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", - ), + # 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}, { @@ -228,7 +229,7 @@ my $_l = { ], }, if_($use_modules, modules => [ - { type => 'squashfs', source => '/root/drakx/i18n-*.lst', rooted => 1 }, + { type => 'squashfs', source => '/root/drakx/i18n-*.lst', rooted => 1 }, ]), }, regions => { @@ -242,7 +243,7 @@ my $_l = { media => { storage => 'cdrom', bootloader_timeout => 10, - boot_entries => [ "live" => " xdriver=free", + boot_entries => [ "live" => " xdriver=free", "live-nf" => " nokmsboot", "linux" => " install xdriver=free", "linux-nf" => " install nokmsboot", @@ -251,18 +252,15 @@ my $_l = { 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) - ], + 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) + ], ), - - - }, mount => MDV::Draklive::Mounts::volatile_squash_union($use_modules), ), -- cgit v1.2.1 From 1e8f2b5fefcfbfc2988fd542eeb2dc74b08abcfd Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sun, 26 Nov 2017 11:28:29 +0000 Subject: Remove obsolete support for 'Spring' edition. --- config/live.cfg | 1 - 1 file changed, 1 deletion(-) diff --git a/config/live.cfg b/config/live.cfg index 6e80509..b621369 100644 --- a/config/live.cfg +++ b/config/live.cfg @@ -10,7 +10,6 @@ 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}); } -- cgit v1.2.1 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 From 69ed419f20f09ac3eb39597fecce8073b7194cae Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sun, 26 Nov 2017 14:34:28 +0000 Subject: Remove duplicate setting of DRAKLIVE_ environment variables. This is done by the draklive script. --- config/live.cfg | 7 ------- 1 file changed, 7 deletions(-) diff --git a/config/live.cfg b/config/live.cfg index 5847636..cb9fae6 100644 --- a/config/live.cfg +++ b/config/live.cfg @@ -20,13 +20,6 @@ my $_l = { 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 => 0, if_($live->{settings}{default_user}, preselect_kdm_user => $live->{settings}{default_user}), -- cgit v1.2.1 From 5b04144b0d309bbd51cf4ebfa3219de9639ea2f1 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sun, 26 Nov 2017 14:53:28 +0000 Subject: Remove some more redundant items, add extra white space for readability. --- config/auto_inst.cfg.pl | 6 +++++- config/live.cfg | 17 ++++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/config/auto_inst.cfg.pl b/config/auto_inst.cfg.pl index a12150d..6e9bb0c 100644 --- a/config/auto_inst.cfg.pl +++ b/config/auto_inst.cfg.pl @@ -81,8 +81,10 @@ $o = { # 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', @@ -112,7 +114,6 @@ $o = { # not wanted 'al-anvar', # (mga #9752) - #'mate-polkit', 'openssh-server', 'manatools-gui', @@ -177,6 +178,7 @@ $o = { if_($has_plasma, 'task-plasma5', 'sddm', # sometimes gets nuked during build ), + # Xfce specific stuff if_($has_xfce, 'task-xfce4', @@ -250,8 +252,10 @@ $o = { '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"), ), diff --git a/config/live.cfg b/config/live.cfg index cb9fae6..e978bb3 100644 --- a/config/live.cfg +++ b/config/live.cfg @@ -2,7 +2,6 @@ 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})); @@ -29,6 +28,7 @@ my $_l = { # 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 } ], ), @@ -55,35 +55,47 @@ my $_l = { # 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 } ], + #- 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", '/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 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 [ '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 } ], + #- 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), @@ -147,6 +159,7 @@ my $_l = { #- 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", @@ -157,8 +170,10 @@ my $_l = { # 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 disable network", "systemctl disable network-up", -- cgit v1.2.1 From bf15bffd02290a82cb114330e8ac5527bea3abc8 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Wed, 29 Nov 2017 17:55:39 +0000 Subject: Update configuration to work with draklive2/grub2. --- config/auto_inst.cfg.pl | 1 + config/live.cfg | 29 ++++++------ files/UEFI/EFI/BOOT/bootx64.efi | Bin 802816 -> 0 bytes files/UEFI/EFI/BOOT/fonts/unicode.pf2 | Bin 2560080 -> 0 bytes files/UEFI/EFI/BOOT/grub.cfg | 47 ------------------- .../EFI/BOOT/themes/maggy/MageiaLogo-Bold-16.pf2 | Bin 3602 -> 0 bytes .../EFI/BOOT/themes/maggy/MageiaLogo-Bold-20.pf2 | Bin 4922 -> 0 bytes .../EFI/BOOT/themes/maggy/MageiaLogo-Bold-28.pf2 | Bin 6142 -> 0 bytes .../BOOT/themes/maggy/MageiaLogo-Regular-20.pf2 | Bin 4761 -> 0 bytes .../EFI/BOOT/themes/maggy/grub2-mageia-default.png | Bin 178033 -> 0 bytes files/UEFI/EFI/BOOT/themes/maggy/theme.txt | 50 --------------------- 11 files changed, 14 insertions(+), 113 deletions(-) delete mode 100644 files/UEFI/EFI/BOOT/bootx64.efi delete mode 100755 files/UEFI/EFI/BOOT/fonts/unicode.pf2 delete mode 100644 files/UEFI/EFI/BOOT/grub.cfg delete mode 100755 files/UEFI/EFI/BOOT/themes/maggy/MageiaLogo-Bold-16.pf2 delete mode 100755 files/UEFI/EFI/BOOT/themes/maggy/MageiaLogo-Bold-20.pf2 delete mode 100755 files/UEFI/EFI/BOOT/themes/maggy/MageiaLogo-Bold-28.pf2 delete mode 100755 files/UEFI/EFI/BOOT/themes/maggy/MageiaLogo-Regular-20.pf2 delete mode 100644 files/UEFI/EFI/BOOT/themes/maggy/grub2-mageia-default.png delete mode 100755 files/UEFI/EFI/BOOT/themes/maggy/theme.txt diff --git a/config/auto_inst.cfg.pl b/config/auto_inst.cfg.pl index 6e9bb0c..196046c 100644 --- a/config/auto_inst.cfg.pl +++ b/config/auto_inst.cfg.pl @@ -166,6 +166,7 @@ $o = { # mageia specific 'mageiawelcome', # nice helper app 'mageia-doc-mcc-en', # some nice docs + 'grub2-mageia-theme', # Gnome specific stuff if_($has_gnome, diff --git a/config/live.cfg b/config/live.cfg index e978bb3..105c3d7 100644 --- a/config/live.cfg +++ b/config/live.cfg @@ -20,7 +20,6 @@ my $_l = { auto_install => 'config/auto_inst.cfg.pl', install_env => { }, - hide_media_dirs => 0, if_($live->{settings}{default_user}, preselect_kdm_user => $live->{settings}{default_user}), langs_always => [ 'en_US' ], files => [ @@ -133,10 +132,8 @@ my $_l = { ], disable_timers => [ ], + append => "splash quiet noiswmd audit=0 rd.luks=0 rd.lvm=0 rd.md=0 rd.dm=0", vga_mode => 788, - gfxboot => 1, - initrd_post => join("\n", - ), postInstall => join(';', if_($live->{settings}{default_user}, "echo $live->{settings}{default_user} > /etc/draklive-install.d/user"), "perl -pi -e 's,,$live->{settings}{default_user},' /etc/draklive-install.d/sysconfig/finish-install", @@ -245,20 +242,20 @@ my $_l = { int => [ map { "i18n-$_" } qw(en) ], }, media => { - storage => 'iso', + storage => 'iso', + source => build_one_label($live), + bootloader_theme => 'maggy', 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) ], + bootloader_default => 0, + bootloader_entries => [ 'Boot Mageia Live' => 'xdriver=free', + ' + use non-free video drivers' => 'nokmsboot', + 'Install Mageia Live' => 'install xdriver=free', + ' + use non-free video drivers' => 'install nokmsboot', + ], + #mbr_boot_img => 'files/grub2/boot_hybrid.img', + #eltorito_img => 'files/grub2/eltorito.img', + #bootx64_efi => 'files/grub2/bootx64.efi', 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) diff --git a/files/UEFI/EFI/BOOT/bootx64.efi b/files/UEFI/EFI/BOOT/bootx64.efi deleted file mode 100644 index bb2352c..0000000 Binary files a/files/UEFI/EFI/BOOT/bootx64.efi and /dev/null differ diff --git a/files/UEFI/EFI/BOOT/fonts/unicode.pf2 b/files/UEFI/EFI/BOOT/fonts/unicode.pf2 deleted file mode 100755 index 57b682a..0000000 Binary files a/files/UEFI/EFI/BOOT/fonts/unicode.pf2 and /dev/null differ diff --git a/files/UEFI/EFI/BOOT/grub.cfg b/files/UEFI/EFI/BOOT/grub.cfg deleted file mode 100644 index 529ca74..0000000 --- a/files/UEFI/EFI/BOOT/grub.cfg +++ /dev/null @@ -1,47 +0,0 @@ - -insmod efi_gop -insmod efi_uga -insmod video_bochs -insmod video_cirrus -insmod video_fb - -insmod font -if loadfont ${prefix}/fonts/unicode.pf2 -then - insmod gfxterm - set gfxmode=1024x768,800x600,auto - set gfxpayload=keep - terminal_output gfxterm -fi - -insmod png -set theme=/EFI/BOOT/themes/maggy/theme.txt -export theme -loadfont /EFI/BOOT/themes/maggy/MageiaLogo-Bold-16.pf2 -loadfont /EFI/BOOT/themes/maggy/MageiaLogo-Bold-20.pf2 -loadfont /EFI/BOOT/themes/maggy/MageiaLogo-Bold-28.pf2 -loadfont /EFI/BOOT/themes/maggy/MageiaLogo-Regular-20.pf2 - -set timeout=10 - -search --no-floppy --set=root -l 'VOLUME_LABEL' - -menuentry 'Boot Mageia 6 Live' { - linux /boot/vmlinuz root=mgalive:LABEL=VOLUME_LABEL splash quiet noiswmd audit=0 rd.luks=0 rd.lvm=0 rd.md=0 rd.dm=0 xdriver=free - initrd /boot/cdrom/initrd.gz -} - -menuentry ' + use non-free video drivers (slower to boot)' { - linux /boot/vmlinuz root=mgalive:LABEL=VOLUME_LABEL splash quiet noiswmd audit=0 rd.luks=0 rd.lvm=0 rd.md=0 rd.dm=0 nokmsboot - initrd /boot/cdrom/initrd.gz -} - -menuentry 'Install Mageia 6 Live' { - linux /boot/vmlinuz root=mgalive:LABEL=VOLUME_LABEL splash quiet noiswmd audit=0 rd.luks=0 rd.lvm=0 rd.md=0 rd.dm=0 install xdriver=free - initrd /boot/cdrom/initrd.gz -} - -menuentry ' + use non-free video drivers (slower to boot)' { - linux /boot/vmlinuz root=mgalive:LABEL=VOLUME_LABEL splash quiet noiswmd audit=0 rd.luks=0 rd.lvm=0 rd.md=0 rd.dm=0 install nokmsboot - initrd /boot/cdrom/initrd.gz -} diff --git a/files/UEFI/EFI/BOOT/themes/maggy/MageiaLogo-Bold-16.pf2 b/files/UEFI/EFI/BOOT/themes/maggy/MageiaLogo-Bold-16.pf2 deleted file mode 100755 index 2fd329b..0000000 Binary files a/files/UEFI/EFI/BOOT/themes/maggy/MageiaLogo-Bold-16.pf2 and /dev/null differ diff --git a/files/UEFI/EFI/BOOT/themes/maggy/MageiaLogo-Bold-20.pf2 b/files/UEFI/EFI/BOOT/themes/maggy/MageiaLogo-Bold-20.pf2 deleted file mode 100755 index 6e619c9..0000000 Binary files a/files/UEFI/EFI/BOOT/themes/maggy/MageiaLogo-Bold-20.pf2 and /dev/null differ diff --git a/files/UEFI/EFI/BOOT/themes/maggy/MageiaLogo-Bold-28.pf2 b/files/UEFI/EFI/BOOT/themes/maggy/MageiaLogo-Bold-28.pf2 deleted file mode 100755 index 605406f..0000000 Binary files a/files/UEFI/EFI/BOOT/themes/maggy/MageiaLogo-Bold-28.pf2 and /dev/null differ diff --git a/files/UEFI/EFI/BOOT/themes/maggy/MageiaLogo-Regular-20.pf2 b/files/UEFI/EFI/BOOT/themes/maggy/MageiaLogo-Regular-20.pf2 deleted file mode 100755 index 5cb52f4..0000000 Binary files a/files/UEFI/EFI/BOOT/themes/maggy/MageiaLogo-Regular-20.pf2 and /dev/null differ diff --git a/files/UEFI/EFI/BOOT/themes/maggy/grub2-mageia-default.png b/files/UEFI/EFI/BOOT/themes/maggy/grub2-mageia-default.png deleted file mode 100644 index df9c862..0000000 Binary files a/files/UEFI/EFI/BOOT/themes/maggy/grub2-mageia-default.png and /dev/null differ diff --git a/files/UEFI/EFI/BOOT/themes/maggy/theme.txt b/files/UEFI/EFI/BOOT/themes/maggy/theme.txt deleted file mode 100755 index 598612f..0000000 --- a/files/UEFI/EFI/BOOT/themes/maggy/theme.txt +++ /dev/null @@ -1,50 +0,0 @@ -# GRUB gfxmenu theme "maggy". - -title-text: "Mageia 6 UEFI" -title-font: "MageiaLogo Bold 28" -title-color: "white" - -desktop-image: "grub2-mageia-default.png" -terminal-font: "Unknown Regular 16" - -+ boot_menu { - left = 5% - top = 15% - width = 75% - height = 55% - item_font = "MageiaLogo Regular 20" - selected_item_font = "MageiaLogo Bold 20" - color_normal="black/black" - item_color = "#0e1a27" - selected_item_color = "white" - item_height = 24 - item_spacing = 10 -} - -+ progress_bar -{ - id = "__timeout__" - left = 20% - top = 70% - width = 60% - height = 2% - fg_color = "lightskyblue" - bg_color = "dodgerblue" - border_color = "midnightblue" -} - -# Informational message bar. -+ vbox { - left = 10% - top = 84%-35 - width = 50% - height = 35 - + label { - text="Select an item with the arrow keys and press Enter to boot." - font="MageiaLogo Bold 16" color="white" - } - + label { - text="Press 'c' for command line, 'e' to edit." - font="MageiaLogo Bold 16" color="white" - } -} -- cgit v1.2.1 From 8585fe0ece9cd5b5791378ea6d231ba665794ce5 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Wed, 6 Dec 2017 23:39:42 +0000 Subject: Add support for language/keyboard selection in bootloader. Eventually most of this should move elsewhere so it can be shared with the classic installer ISOs. --- bootloader/Makefile | 14 ++++ bootloader/lang-names.txt | 66 ++++++++++++++++ bootloader/make-grub-po | 180 +++++++++++++++++++++++++++++++++++++++++++ bootloader/make-kbd-info | 115 +++++++++++++++++++++++++++ bootloader/make-kbd-po | 81 +++++++++++++++++++ bootloader/po/Makefile | 16 ++++ bootloader/po/bootloader.pot | 62 +++++++++++++++ bootloader/po/de.po | 62 +++++++++++++++ bootloader/po/fr.po | 62 +++++++++++++++ config/live.cfg | 28 +++---- 10 files changed, 673 insertions(+), 13 deletions(-) create mode 100644 bootloader/Makefile create mode 100644 bootloader/lang-names.txt create mode 100755 bootloader/make-grub-po create mode 100755 bootloader/make-kbd-info create mode 100755 bootloader/make-kbd-po create mode 100644 bootloader/po/Makefile create mode 100644 bootloader/po/bootloader.pot create mode 100644 bootloader/po/de.po create mode 100644 bootloader/po/fr.po diff --git a/bootloader/Makefile b/bootloader/Makefile new file mode 100644 index 0000000..9994dae --- /dev/null +++ b/bootloader/Makefile @@ -0,0 +1,14 @@ +all: kbd-names.txt lang-kbds.txt po + +kbd-names%txt lang-kbds%txt: layouts + make-kbd-info + +layouts: + +.PHONY: po +po: make-grub-po make-kbd-po kbd-names.txt + make -C po + +clean: + rm -rf kbd-names.txt lang-kbds.txt layouts + make -C po clean diff --git a/bootloader/lang-names.txt b/bootloader/lang-names.txt new file mode 100644 index 0000000..57a70e5 --- /dev/null +++ b/bootloader/lang-names.txt @@ -0,0 +1,66 @@ +# The GNU Unifont font contains all the glyphs used in this file.use utf8; +# \x{nnnn} represents the Unicode code point U+nnnn (where nnnn is four hex digits). +use utf8; +( +"af_ZA" => "Afrikaans", # Afrikaans +"ar_EG" => "\x{fef2}\x{fe91}\x{feae}\x{fecb}", # Arabic +"bg_BG" => "Български", # Bulgarian +"bn_BD" => "\x{09ac}\x{09be}\x{0982}\x{09b2}\x{09be}", # Bengali +"bs_BA" => "Bosanski", # Bosnian +"ca_ES" => "Català", # Catalan +"cs_CZ" => "Čeština", # Czech +"cy_GB" => "Cymraeg", # Welsh +"da_DK" => "Dansk", # Danish +"de_DE" => "Deutsch", # German +"el_GR" => "Ελληνικά", # Greek +"en_GB" => "English (UK)", # English +"en_US" => "English (US)", # English +"es_ES" => "Español", # Spanish +"et_EE" => "Eesti", # Estonian +"fa_IR" => "\x{fbfd}\x{feb4}\x{0631}\x{fe8e}\x{fed3}", # Farsi +"fi_FI" => "Suomi", # Finnish +"fr_FR" => "Français", # French +"gl_ES" => "Galego", # Galician +"ka_GE" => "ქართული", # Kartuli +"gu_IN" => "\x{0a97}\x{0ac1}\x{0a9c}\x{0ab0}\x{0abe}\x{0aa4}\x{0ac0}", # Gujarati +"he_IL" => "תירבע", # Hebrew +"hi_IN" => "\x{0939}\x{093f}\x{0902}\x{0926}\x{0940}", # Hindi +"hr_HR" => "Hrvatski", # Croatian +"hu_HU" => "Magyar", # Hungarian +"id_ID" => "Bahasa Indonesia", # Indonesian +"it_IT" => "Italiano", # Italian +"ja_JP" => "日本語", # Japanese +"jv_ID" => "Basa Jawa", # Javanese +"km_KH" => "Khmer", # Khmer +"ko_KR" => "한글", # Korean +"ky_KG" => "Кыргызча", # Kirghiz +"lo_LA" => "\x{0e9e}\x{0eb2}\x{0eaa}\x{0eb2}\x{0ea5}\x{0eb2}\x{0ea7}", # Lao +"lt_LT" => "Lietuvių", # Lithuanian +"mk_MK" => "Македонски", # Macedonian +"mr_IN" => "\x{092e}\x{0930}\x{093e}\x{0920}\x{0940}", # Marathi +"nb_NO" => "Norsk (bokmål)", # Norwegian +"nn_NO" => "Norsk (nynorsk)", # Norwegian +"nl_NL" => "Nederlands", # Dutch +"pa_IN" => "\x{0a2a}\x{0a70}\x{0a1c}\x{0a3e}\x{0a2c}\x{0a40}", # Punjabi +"pl_PL" => "Polski", # Polish +"pt_PT" => "Português", # Portuguese +"pt_BR" => "Português (Brasil)", # Portuguese (Brazilian) +"ro_RO" => "Română", # Romanian +"ru_RU" => "Русский", # Russian +"si_LK" => "\x{0dc3}\x{0dd2}\x{0d82}\x{0dc4}\x{0dbd}", # Sinhala +"sk_SK" => "Slovenčina", # Slovak +"sl_SI" => "Slovenščina", # Slovenian +"sr_CS" => "Srpski", # Serbian +"sv_SE" => "Svenska", # Swedish +"ta_IN" => "\x{0ba4}\x{0bae}\x{0bbf}\x{0bb4}\x{0bcd}", # Tamil +"tg_TJ" => "Тоҷикӣ", # Tajik +"th_TH" => "\x{0e20}\x{0e32}\x{0e29}\x{0e32}\x{0e44}\x{0e17}\x{0e22}", # Thai +"tr_TR" => "Türkçe", # Turkish +"uk_UA" => "Українська", # Ukrainian +"vi_VN" => "Tiếng Việt", # Vietnamese +"wa_BE" => "Walon", # Walloon +"xh_ZA" => "isiXhosa", # Xhosa +"zh_CN" => "简体中文", # Simplified Chinese +"zh_TW" => "繁體中文 (台灣)", # Traditional Chinese +"zu_ZA" => "isiZulu", # Zulu +) diff --git a/bootloader/make-grub-po b/bootloader/make-grub-po new file mode 100755 index 0000000..d85005b --- /dev/null +++ b/bootloader/make-grub-po @@ -0,0 +1,180 @@ +#!/usr/bin/perl + +# Copyright (C) 2017 Mageia +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# SYNOPSIS +# +# This program generates a PO file containing translations of the grub2 +# runtime messages into the language specified by the first command line +# argument. grub2 must be installed on the build system, so that the +# translations are available. +# +# The full set of translations is quite large, so we only generate +# translations for the messages we expect to see in the ISO bootloader. +# +# The PO file (${LANGUAGE}-grub.po) is stored in the current working +# directory. + +use lib qw(/usr/lib/libDrakX); + +use strict; + +use Cwd qw(abs_path getcwd); +use MDK::Common; +use common; + +# Get correct namespace (grub instead of libDrakX). +BEGIN { unshift @::textdomains, 'grub' } + +# Set the translation language. +@ARGV == 1 && $ARGV[0] or die "Usage: make-grub-po \n"; +$ENV{LANGUAGE} = $ARGV[0]; + +# Define the list of strings we want to translate. +my @msgids = ( + "Press enter to boot the selected OS, `e' to edit the commands before booting " . + "or `c' for a command-line. ESC to return previous menu.", + + "The highlighted entry will be executed automatically in %ds.", + + "%ds remaining.", + + "%ds", + + "Minimal BASH-like line editing is supported. For the first word, TAB lists " . + "possible command completions. Anywhere else TAB lists possible device or " . + "file completions. %s", + + "ESC at any time exits.", + + "Press any key to continue...", + + "Possible commands are:", + + "Possible devices are:", + + "Possible files are:", + + "Possible partitions are:", + + "Possible arguments are:", + + "Possible things are:", + + "can't find command `%s'", + + "one argument expected", + + "two arguments expected", + + "three arguments expected", + + "four arguments expected", + + "missing arguments", + + "unknown argument", + + "missing `%c' symbol", + + "filename expected", + + "file or layout name required", + + "file `%s' not found", + + "no terminal specified", + + "terminal `%s' isn't found", + + "Active input terminals:", + + "Available input terminals:", + + "Active output terminals:", + + "Available output terminals:", + + "no server is specified", + + "Device %s:", + + "Partition %s:", + + "No known filesystem detected", + + "Filesystem cannot be accessed", + + "Filesystem type %s", + + "- Label `%s'", + + "- Last modification time %d-%02d-%02d %02d:%02d:%02d %s", + + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sunday", + + " - Sector size %uB", + + " - Total size %llu%sKiB", + + " - Total size unknown", + + "Loaded fonts:", + + "error: %s.\n", + + ".5" +); + +# Open the output file +my $fn = getcwd() . '/' . $ARGV[0] . '-grub.po'; +open(my $fh, '>' . $fn) or die "couldn't open $fn"; + +print $fh "# This file is automatically generated\n"; +print $fh "\n"; + +foreach (@msgids) { + my ($msgid) = $_; + + my $msgstr = translate($msgid); + + # Blank the message string if there is no translation available. + $msgstr = '' if $msgstr eq $msgid; + + # Any double quote characters need to be escaped when writing the + # PO file. + $msgid =~ s/"/\\"/g; + $msgstr =~ s/"/\\"/g; + + # Any newline characters need to be escaped when writing the + # PO file. + $msgid =~ s/\R/\\n/g; + $msgstr =~ s/\R/\\n/g; + + # Write the entry for this item. + print $fh "msgid \"$msgid\"\n"; + print $fh "msgstr \"$msgstr\"\n"; + print $fh "\n"; +} + +close($fh); diff --git a/bootloader/make-kbd-info b/bootloader/make-kbd-info new file mode 100755 index 0000000..d36fde8 --- /dev/null +++ b/bootloader/make-kbd-info @@ -0,0 +1,115 @@ +#!/usr/bin/perl + +# Copyright (C) 2017 Mageia +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# SYNOPSIS +# +# This program gets the list of supported keyboards from libDrakX and +# generates a grub2 keyboard mapping file for each keyboard in the list. +# It then generates the keyboard names file and the language to keyboard +# mapping file that are used when generating the bootloader menus for +# the Mageia ISOs. +# +# The grub2 keyboard mapping files are generated using the grub2-kbdcomp +# program. The X11 keyboard layout and variant names are obtained from +# libDrakX. The files (*.gkb) are stored in the 'layouts' subdirectory +# of the current working directory. +# +# The keyboard names file consists of a list of paired identifier and +# description strings. The identifier is the keyboard identifier used +# in libDrakX. The description is the canonical keyboard description +# provided by libDrakX. The file (kbd-names.txt) is stored in the +# current working directory. +# +# The language to keyboard mapping file consists of a map of language +# identifier to keyboard identifier strings. The language identifier +# is the standard language/country code used for specifying a locale +# (e.g. en_US). The keyboard identifier is the default keyboard for +# that language, as provided by libDrakX. The file (lang-kbds.txt) is +# stored in the current working directory. +# +# The list of supported languages is read from the language names file +# (lang-names.txt) that is used when generating the bootloader menus. +# This file is expected to be found in the current working directory. + +use lib qw(/usr/lib/libDrakX); + +use strict; + +use Cwd qw(getcwd); +use Data::Dumper; +use MDK::Common; +use common; +use keyboard; +use run_program; + +# Make sure we get the canonical description for the keyboard. +$ENV{LANGUAGE} = 'C'; + +# Make sure the 'layouts' subdirectory exists. +my $kbd_dir = getcwd() . '/layouts'; +mkdir_p($kbd_dir); + +# Generate the grub2 keyboard mapping files and collect the keyboard +# descriptions. For keyboards with multiple layouts, only use the first +# layout. If we fail to generate a keyboard mapping, don't include that +# keyboard in the lists. +my %names; +my @keyboards = map { { KEYBOARD => $_ } } keyboard::KEYBOARDs(); +foreach (@keyboards) { + my $id = $_->{KEYBOARD}; + my $xkb = keyboard::keyboard2full_xkb($_); + my @model = split(',', $xkb->{XkbModel}); + my @layout = split(',', $xkb->{XkbLayout}); + my @variant = split(',', $xkb->{XkbVariant}); + my $kbd_file = $kbd_dir . '/' . $id . '.gkb'; + if (-e $kbd_file || run_program::run('grub2-kbdcomp', '-o', $kbd_file, '-model', $model[0], $layout[0], $variant[0])) { + $names{$id} = translate(keyboard::keyboard2text($_)); + } else { + rm_rf($kbd_file); + } +} + +# Generate the keyboard names file. +my $filename = getcwd() . '/kbd-names.txt'; +open(my $f, '>' . $filename) or die "couldn't open $filename"; +print $f "(\n"; +foreach my $id (sort keys %names) { + my $name = $names{$id}; + printf $f " '$id'%s => '$name',\n", ' ' x (16 - length($id)); +} +print $f ")\n"; +close($f); + +# Read the list of supported languages. +my $lang_names = getcwd() . '/lang-names.txt'; +-e $lang_names or die "cannot find language names file $lang_names\n"; +my @langs = group_by2(eval(cat_($lang_names))) + or die "error in language names file $lang_names\n"; + +# Generate the language to keyboard mapping file. +$filename = getcwd() . '/lang-kbds.txt'; +open($f, '>' . $filename) or die "couldn't open $filename"; +print $f "{\n"; +foreach (@langs) { + my ($lang) = @$_; + my $kbd = keyboard::lang2keyboard($lang)->{KEYBOARD}; + $kbd = '' if !$names{$kbd}; + printf $f " '$lang' => '$kbd',\n"; +} +print $f "}\n"; +close($f); diff --git a/bootloader/make-kbd-po b/bootloader/make-kbd-po new file mode 100755 index 0000000..54ed57e --- /dev/null +++ b/bootloader/make-kbd-po @@ -0,0 +1,81 @@ +#!/usr/bin/perl + +# Copyright (C) 2017 Mageia +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# SYNOPSIS +# +# This program reads the keyboard names file created by the make-kbd-info +# program and generates a PO file containing translations of the keyboard +# names into the language specified by the first command line argument. +# The translations are obtained from libDrakX. +# +# The keyboard names file (kbd-names.txt) is searched for in the directory +# containing this program. The PO file (${LANGUAGE}-kbd.po) is stored in +# the current working directory. + +use lib qw(/usr/lib/libDrakX); + +use strict; + +use Cwd qw(abs_path getcwd); +use MDK::Common; +use common; +use keyboard; + +# Get correct namespace (drakx-kbd-mouse-x11 instead of libDrakX). +BEGIN { unshift @::textdomains, 'drakx-kbd-mouse-x11' } + +# Set the translation language. +@ARGV == 1 && $ARGV[0] or die "Usage: make-kbd-po \n"; +$ENV{LANGUAGE} = $ARGV[0]; + +# Read the keyboard names file. +my $kbd_names = dirname(abs_path($0)) . '/kbd-names.txt'; +-e $kbd_names or die "cannot find keyboard name file $kbd_names\n"; +my @kbds = group_by2(eval(cat_($kbd_names))) + or die "error in keyboard name file $kbd_names\n"; + +# Open the output file +my $fn = getcwd() . '/' . $ARGV[0] . '-kbd.po'; +open(my $fh, '>' . $fn) or die "couldn't open $fn"; + +print $fh "# This file is automatically generated\n"; +print $fh "\n"; + +foreach (@kbds) { + my ($kbd, $msgid) = @$_; + + # make-kbd-info strips off the prefix from the drakx-kbd-mouse-x11 + # msgids, so we must use the original msgid to get the translation. + my $msgstr = translate(keyboard::KEYBOARD2text($kbd)); + + # Any double quote characters need to be escaped when writing the + # PO file. + $msgid =~ s/"/\\"/g; + $msgstr =~ s/"/\\"/g; + + # Some translations contain embedded newline characters. We need + # all translations to be a single line. + $msgstr =~ s/\R/ /g; + + # Write the entry for this keyboard. + print $fh "msgid \"$msgid\"\n"; + print $fh "msgstr \"$msgstr\"\n"; + print $fh "\n"; +} + +close($fh); diff --git a/bootloader/po/Makefile b/bootloader/po/Makefile new file mode 100644 index 0000000..297110e --- /dev/null +++ b/bootloader/po/Makefile @@ -0,0 +1,16 @@ +PO_FILES = $(filter-out $(wildcard *-*.po), $(wildcard *.po)) +MO_FILES = $(addsuffix .mo, $(basename $(PO_FILES))) + +all: $(MO_FILES) + +%.mo: %.po %-grub.po %-kbd.po + msgfmt -o $@ $^ + +%-grub.po: ../make-grub-po + ../make-grub-po $(basename $*) + +%-kbd.po: ../make-kbd-po ../kbd-names.txt + ../make-kbd-po $(basename $*) + +clean: + rm -f *-grub.po *-kbd.po *.mo diff --git a/bootloader/po/bootloader.pot b/bootloader/po/bootloader.pot new file mode 100644 index 0000000..3c70470 --- /dev/null +++ b/bootloader/po/bootloader.pot @@ -0,0 +1,62 @@ +# Translations for Mageia ISO boot loader +# Copyright (C) 2017 Mageia +# +# NOTE: If you add a new language, please uncomment (or add if necessary) +# the corresponding line(s) in the lang-names.txt file. +# +# NOTE: Except where noted, all strings must fit on a single line on the +# bootloader screen (which may be running at a low resolution). Please keep +# the translated strings as short as possible. +# +# NOTE: grub2 currently doesn't display some scripts properly. It is probably +# best not to enable these languages. Language codes known to be affected +# are: bn gu hi mr pa si ta +# +msgid "" +msgstr "" +"Project-Id-Version: draklive-config\n" +"POT-Creation-Date: 2017-11-30 14:23+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" + +# NOTE: Please leave "[$lang]" untranslated - it is automatically replaced +# by the currently selected language code (e.g. en_US). +msgid "Language [$lang]" +msgstr "" + +# NOTE: Please leave "[$kbd]" untranslated - it is automatically replaced +# by the currently selected keyboard code (e.g. us). +msgid "Keyboard [$kbd]" +msgstr "" + +msgid "[more options after boot]" +msgstr "" + +msgid "Boot Mageia Live" +msgstr "" + +msgid "Install Mageia Live" +msgstr "" + +msgid " + use non-free video drivers (slower to boot)" +msgstr "" + +msgid "Select an item with the arrow keys and press Enter to boot." +msgstr "" + +msgid "Press 'c' for command line, 'e' to edit." +msgstr "" + +# NOTE: The Mageia grub2 package replaces one of the upstream messages +# with this, but doesn't provide any translations. This doesn't need +# to fit on a single line. +msgid "" +"Press Ctrl-x to start, Ctrl-c for a command prompt or Escape to discard " +"edits and return to the menu. Pressing Tab lists possible completions." +msgstr "" diff --git a/bootloader/po/de.po b/bootloader/po/de.po new file mode 100644 index 0000000..d965c90 --- /dev/null +++ b/bootloader/po/de.po @@ -0,0 +1,62 @@ +# Translations for Mageia ISO boot loader +# Copyright (C) 2017 Mageia +# +# NOTE: If you add a new language, please uncomment (or add if necessary) +# the corresponding line(s) in the lang-names.txt file. +# +# NOTE: All strings must fit on a single line on the bootloader screen (which +# may be running at a low resolution). Please keep the translated strings as +# short as possible. +# +# NOTE: grub2 currently doesn't display some scripts properly. It is probably +# best not to enable these languages. Language codes known to be affected +# are: bn gu hi mr pa si ta +# +msgid "" +msgstr "" +"Project-Id-Version: draklive-config\n" +"POT-Creation-Date: 2017-11-30 14:23+0000\n" +"PO-Revision-2017-11-30 14:23+0000\n" +"Last-Translator: Martin Whitaker\n" +"Language-Team: LANGUAGE \n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +# NOTE: Please leave "[$lang]" untranslated - it is automatically replaced +# by the currently selected language code (e.g. en_US). +msgid "Language [$lang]" +msgstr "Sprache [$lang]" + +# NOTE: Please leave "[$kbd]" untranslated - it is automatically replaced +# by the currently selected keyboard code (e.g. us). +msgid "Keyboard [$kbd]" +msgstr "Tastatur [$kbd]" + +msgid "[more options after boot]" +msgstr "untranslated" + +msgid "Boot Mageia Live" +msgstr "Mageia Live starten" + +msgid "Install Mageia Live" +msgstr "Mageia Live installieren" + +msgid " + use non-free video drivers (slower to boot)" +msgstr " + verwende unfreie Videotreiber (System startet langsamer)" + +msgid "Select an item with the arrow keys and press Enter to boot." +msgstr "untranslated" + +msgid "Press 'c' for command line, 'e' to edit." +msgstr "untranslated" + +# NOTE: The Mageia grub2 package replaces one of the upstream messages +# with this, but doesn't provide any translations. This doesn't need +# to fit on a single line. +msgid "" +"Press Ctrl-x to start, Ctrl-c for a command prompt or Escape to discard " +"edits and return to the menu. Pressing Tab lists possible completions." +msgstr "untranslated" diff --git a/bootloader/po/fr.po b/bootloader/po/fr.po new file mode 100644 index 0000000..4aba501 --- /dev/null +++ b/bootloader/po/fr.po @@ -0,0 +1,62 @@ +# Translations for Mageia ISO boot loader +# Copyright (C) 2017 Mageia +# +# NOTE: If you add a new language, please uncomment (or add if necessary) +# the corresponding line(s) in the lang-names.txt file. +# +# NOTE: All strings must fit on a single line on the bootloader screen (which +# may be running at a low resolution). Please keep the translated strings as +# short as possible. +# +# NOTE: grub2 currently doesn't display some scripts properly. It is probably +# best not to enable these languages. Language codes known to be affected +# are: bn gu hi mr pa si ta +# +msgid "" +msgstr "" +"Project-Id-Version: draklive-config\n" +"POT-Creation-Date: 2017-11-30 14:23+0000\n" +"PO-Revision-Date: 2017-11-30 14:23+0000\n" +"Last-Translator: Martin Whitaker\n" +"Language-Team: LANGUAGE \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +# NOTE: Please leave "[$lang]" untranslated - it is automatically replaced +# by the currently selected language code (e.g. en_US). +msgid "Language [$lang]" +msgstr "Langue [$lang]" + +# NOTE: Please leave "[$kbd]" untranslated - it is automatically replaced +# by the currently selected keyboard code (e.g. us). +msgid "Keyboard [$kbd]" +msgstr "Clavier [$kbd]" + +msgid "[more options after boot]" +msgstr "" + +msgid "Boot Mageia Live" +msgstr "Amorcer Mageia Live" + +msgid "Install Mageia Live" +msgstr "Installer Mageia Live" + +msgid " + use non-free video drivers (slower to boot)" +msgstr " + avec pilote vidéo propriétaire (démarrage lent)" + +msgid "Select an item with the arrow keys and press Enter to boot." +msgstr "" + +msgid "Press 'c' for command line, 'e' to edit." +msgstr "" + +# NOTE: The Mageia grub2 package replaces one of the upstream messages +# with this, but doesn't provide any translations. This doesn't need +# to fit on a single line. +msgid "" +"Press Ctrl-x to start, Ctrl-c for a command prompt or Escape to discard " +"edits and return to the menu. Pressing Tab lists possible completions." +msgstr "" diff --git a/config/live.cfg b/config/live.cfg index 105c3d7..1a2bbc8 100644 --- a/config/live.cfg +++ b/config/live.cfg @@ -242,19 +242,21 @@ my $_l = { int => [ map { "i18n-$_" } qw(en) ], }, media => { - storage => 'iso', - source => build_one_label($live), - bootloader_theme => 'maggy', - bootloader_timeout => 10, - bootloader_default => 0, - bootloader_entries => [ 'Boot Mageia Live' => 'xdriver=free', - ' + use non-free video drivers' => 'nokmsboot', - 'Install Mageia Live' => 'install xdriver=free', - ' + use non-free video drivers' => 'install nokmsboot', - ], - #mbr_boot_img => 'files/grub2/boot_hybrid.img', - #eltorito_img => 'files/grub2/eltorito.img', - #bootx64_efi => 'files/grub2/bootx64.efi', + storage => 'iso', + source => build_one_label($live), + bootloader_langs => 'bootloader/lang-names.txt', + bootloader_kbds => 'bootloader/kbd-names.txt', + bootloader_messages => 'bootloader/po', + bootloader_default => 0, + bootloader_timeout => 10, + bootloader_entries => [ 'Boot Mageia Live' => 'xdriver=free', + ' + use non-free video drivers (slower to boot)' => 'nokmsboot', + 'Install Mageia Live' => 'install xdriver=free', + ' + use non-free video drivers (slower to boot)' => 'install nokmsboot', + ], + #mbr_boot_img => 'bootloader/boot_hybrid.img', + #eltorito_img => 'bootloader/eltorito.img', + #bootx64_efi => 'bootloader/bootx64.efi', files => [ # FIXME: add doc and autorun #[ 'extra/livecd/autorun/*', ''], -- cgit v1.2.1 From 52bb40d59aed2dc9777bf3ff20be3a6d9b56e5ca Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sat, 9 Dec 2017 12:07:01 +0000 Subject: live.gschema.override: add drakconf to favourites. --- files/live.gschema.override | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/live.gschema.override b/files/live.gschema.override index 9eefe6c..a5622b7 100644 --- a/files/live.gschema.override +++ b/files/live.gschema.override @@ -1,5 +1,5 @@ [org.gnome.shell] -favorite-apps = [ 'mageia-draklive-install.desktop', 'firefox.desktop', 'evolution.desktop', 'empathy.desktop', 'rhythmbox.desktop', 'shotwell.desktop', 'libreoffice-writer.desktop', 'nautilus.desktop', 'gnome-documents.desktop'] +favorite-apps = [ 'mageia-draklive-install.desktop', 'firefox.desktop', 'evolution.desktop', 'empathy.desktop', 'rhythmbox.desktop', 'shotwell.desktop', 'libreoffice-writer.desktop', 'nautilus.desktop', 'gnome-documents.desktop', 'mageia-drakconf.desktop' ] [org.gnome.desktop.screensaver] lock-enabled=false -- cgit v1.2.1 From 6dfba4b638f9f16112824318cc869eb6d8d1a86e Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Tue, 19 Dec 2017 17:28:18 +0000 Subject: Switch to using drakiso version of draklive. - s/$live/$build/ - rename live.cfg to build.cfg - remove some redundant settings and configuration values - use mga6 repository for testing until cauldron stabilises - rename postInstall to final_fixes --- config/build.cfg | 264 ++++++++++++++++++++++++++++++++++++++++ config/live.cfg | 267 ----------------------------------------- config/settings.cfg | 14 +-- files/mga_rpms/update_media.sh | 2 +- 4 files changed, 270 insertions(+), 277 deletions(-) create mode 100644 config/build.cfg delete mode 100644 config/live.cfg diff --git a/config/build.cfg b/config/build.cfg new file mode 100644 index 0000000..e7935f0 --- /dev/null +++ b/config/build.cfg @@ -0,0 +1,264 @@ +#!/usr/bin/perl -cw + +use MDK::Common; + +my $use_modules = to_bool($build->{settings}{pack}); +my @user_config_dirs = ('/etc/skel', if_($build->{settings}{default_user}, '/home/' . $build->{settings}{default_user})); + +sub build_one_label { + my ($build) = @_; + + my ($version, $extra) = split(/-/, $build->{settings}{version}); + "LABEL=" . join("-", "Mageia", $version, $build->{settings}{desktop}, $build->{settings}{product}); +} + +my $_l = { + system => { + auto_install => 'config/auto_inst.cfg.pl', + install_env => { + }, + if_($build->{settings}{default_user}, preselect_kdm_user => $build->{settings}{default_user}), + langs_always => [ 'en_US' ], + files => [ + if_($build->{settings}{desktop} eq '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 } ], + ), + # 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_($build->{settings}{arch} eq 'i586', + [ 'files/mga_rpms/i586/mga_rpms', '/var/local' ], + ), + if_($build->{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 } ], + + #- 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", '/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 + if_($build->{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_($build->{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 + [ '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 } ], + + #- 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 => [ + ], + stage2_updates => [ + ], + 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 => [ + ], + append => "splash quiet noiswmd audit=0 rd.luks=0 rd.lvm=0 rd.md=0 rd.dm=0", + vga_mode => 788, + final_fixes => join(';', + if_($build->{settings}{default_user}, "echo $build->{settings}{default_user} > /etc/draklive-install.d/user"), + "perl -pi -e 's,,$build->{settings}{default_user},' /etc/draklive-install.d/sysconfig/finish-install", + + if_($build->{settings}{desktop} eq 'Xfce' && $build->{settings}{default_user}, + # add a desktop icon to run draklive-install + "mkdir -p /home/$build->{settings}{default_user}/Desktop", + "cp /usr/share/applications/mageia-draklive-install.desktop /home/$build->{settings}{default_user}/Desktop/draklive-install.desktop", + ), + + #- fix user perms for copied files + if_($build->{settings}{default_user}, "chown -R " . + "$build->{settings}{default_user}.$build->{settings}{default_user}" . + " /home/$build->{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_($build->{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_($build->{settings}{desktop} eq '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 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_($build->{settings}{updates_repository}, + { + name => 'core_updates_testing', + path => $build->{settings}{updates_repository} . '/' . $build->{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) ], + }, + media => { + storage => 'iso', + source => build_one_label($build), + bootloader_langs => 'bootloader/lang-names.txt', + bootloader_kbds => 'bootloader/kbd-names.txt', + bootloader_messages => 'bootloader/po', + bootloader_default => 0, + bootloader_timeout => 10, + bootloader_entries => [ 'Boot Mageia Live' => 'xdriver=free', + ' + use non-free video drivers (slower to boot)' => 'nokmsboot', + 'Install Mageia Live' => 'install xdriver=free', + ' + use non-free video drivers (slower to boot)' => 'install nokmsboot', + ], + #mbr_boot_img => 'bootloader/boot_hybrid.img', + #eltorito_img => 'bootloader/eltorito.img', + #bootx64_efi => 'bootloader/bootx64.efi', + files => [ + # FIXME: add doc and autorun + #[ 'extra/livecd/autorun/*', ''], + #map { [ 'extra/livecd/' . $_, $_ ] } qw(LISEZMOI.pdf README.pdf) + ], + }, + mount => MGA::DrakISO::Mounts::volatile_squash_union($use_modules), +}; diff --git a/config/live.cfg b/config/live.cfg deleted file mode 100644 index 1a2bbc8..0000000 --- a/config/live.cfg +++ /dev/null @@ -1,267 +0,0 @@ -#!/usr/bin/perl -cw - -use MDK::Common; - -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}); - "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 => { - }, - if_($live->{settings}{default_user}, preselect_kdm_user => $live->{settings}{default_user}), - langs_always => [ 'en_US' ], - files => [ - if_($live->{settings}{desktop} eq '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 } ], - ), - # 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 } ], - - #- 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", '/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 - 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 - [ '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 } ], - - #- 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 => [ - ], - stage2_updates => [ - ], - 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 => [ - ], - append => "splash quiet noiswmd audit=0 rd.luks=0 rd.lvm=0 rd.md=0 rd.dm=0", - vga_mode => 788, - postInstall => join(';', - if_($live->{settings}{default_user}, "echo $live->{settings}{default_user} > /etc/draklive-install.d/user"), - "perl -pi -e 's,,$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', - # 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 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) ], - }, - media => { - storage => 'iso', - source => build_one_label($live), - bootloader_langs => 'bootloader/lang-names.txt', - bootloader_kbds => 'bootloader/kbd-names.txt', - bootloader_messages => 'bootloader/po', - bootloader_default => 0, - bootloader_timeout => 10, - bootloader_entries => [ 'Boot Mageia Live' => 'xdriver=free', - ' + use non-free video drivers (slower to boot)' => 'nokmsboot', - 'Install Mageia Live' => 'install xdriver=free', - ' + use non-free video drivers (slower to boot)' => 'install nokmsboot', - ], - #mbr_boot_img => 'bootloader/boot_hybrid.img', - #eltorito_img => 'bootloader/eltorito.img', - #bootx64_efi => 'bootloader/bootx64.efi', - files => [ - # 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.cfg b/config/settings.cfg index d739cbc..c49e14b 100644 --- a/config/settings.cfg +++ b/config/settings.cfg @@ -1,14 +1,10 @@ -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 +product=Live +desktop=GNOME +arch=x86_64 +region=all default_user=live +repository=/home/bcd/build_bcd/pieces/6 builddir=/home/draklive/var-data/build chroot=/home/draklive/var-data/chroot diff --git a/files/mga_rpms/update_media.sh b/files/mga_rpms/update_media.sh index 0d5bddf..f742b66 100755 --- a/files/mga_rpms/update_media.sh +++ b/files/mga_rpms/update_media.sh @@ -1,5 +1,5 @@ -bcdmedia=/home/bcd/build_bcd/pieces/cauldron +bcdmedia=/home/bcd/build_bcd/pieces/6 copy_latest() { -- cgit v1.2.1 From 73736f5c820dc990031f1dec2211a55f52dc1e06 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Tue, 19 Dec 2017 17:36:38 +0000 Subject: Revise volume label to match the ISO file name. --- config/build.cfg | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/config/build.cfg b/config/build.cfg index e7935f0..3472fd6 100644 --- a/config/build.cfg +++ b/config/build.cfg @@ -8,8 +8,7 @@ my @user_config_dirs = ('/etc/skel', if_($build->{settings}{default_user}, '/hom sub build_one_label { my ($build) = @_; - my ($version, $extra) = split(/-/, $build->{settings}{version}); - "LABEL=" . join("-", "Mageia", $version, $build->{settings}{desktop}, $build->{settings}{product}); + "LABEL=" . join("-", "Mageia", $build->{settings}{version}, $build->{settings}{product}, $build->{settings}{desktop}); } my $_l = { -- cgit v1.2.1 From a37173d23897a26b91032344826f88da05aa08aa Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Fri, 22 Dec 2017 16:23:35 +0000 Subject: Update config files for latest changes in drakiso. --- config/build.cfg | 30 ++++++++++++++++++------------ config/settings.cfg | 5 +++-- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/config/build.cfg b/config/build.cfg index 3472fd6..38f9295 100644 --- a/config/build.cfg +++ b/config/build.cfg @@ -5,12 +5,20 @@ use MDK::Common; my $use_modules = to_bool($build->{settings}{pack}); my @user_config_dirs = ('/etc/skel', if_($build->{settings}{default_user}, '/home/' . $build->{settings}{default_user})); -sub build_one_label { +sub build_label { my ($build) = @_; - "LABEL=" . join("-", "Mageia", $build->{settings}{version}, $build->{settings}{product}, $build->{settings}{desktop}); + join('-', 'Mageia', $build->{settings}{version}, $build->{settings}{product}, $build->{settings}{desktop}, $build->{settings}{arch}); } +sub build_title { + my ($build) = @_; + + join(' ', 'Mageia', $build->{settings}{version}, $build->{settings}{product}, $build->{settings}{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 => { auto_install => 'config/auto_inst.cfg.pl', @@ -128,7 +136,6 @@ my $_l = { ], disable_timers => [ ], - append => "splash quiet noiswmd audit=0 rd.luks=0 rd.lvm=0 rd.md=0 rd.dm=0", vga_mode => 788, final_fixes => join(';', if_($build->{settings}{default_user}, "echo $build->{settings}{default_user} > /etc/draklive-install.d/user"), @@ -239,24 +246,23 @@ my $_l = { }, media => { storage => 'iso', - source => build_one_label($build), + label => build_label($build), + bootloader_title => build_title($build), bootloader_langs => 'bootloader/lang-names.txt', bootloader_kbds => 'bootloader/kbd-names.txt', bootloader_messages => 'bootloader/po', bootloader_default => 0, bootloader_timeout => 10, - bootloader_entries => [ 'Boot Mageia Live' => 'xdriver=free', - ' + use non-free video drivers (slower to boot)' => 'nokmsboot', - 'Install Mageia Live' => 'install xdriver=free', - ' + use non-free video drivers (slower to boot)' => 'install nokmsboot', - ], + 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' }, + ' + use non-free video drivers (slower to boot)' => { append => $default_append . ' nokmsboot' }, + ], #mbr_boot_img => 'bootloader/boot_hybrid.img', #eltorito_img => 'bootloader/eltorito.img', #bootx64_efi => 'bootloader/bootx64.efi', files => [ - # FIXME: add doc and autorun - #[ 'extra/livecd/autorun/*', ''], - #map { [ 'extra/livecd/' . $_, $_ ] } qw(LISEZMOI.pdf README.pdf) ], }, mount => MGA::DrakISO::Mounts::volatile_squash_union($use_modules), diff --git a/config/settings.cfg b/config/settings.cfg index c49e14b..790e563 100644 --- a/config/settings.cfg +++ b/config/settings.cfg @@ -1,7 +1,8 @@ -name=Mageia -version=6 +vendor=Mageia +distro=Mageia product=Live desktop=GNOME +version=6 arch=x86_64 region=all default_user=live -- cgit v1.2.1 From 55bb8f856da37081bce0506aa50879366a7f4b96 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Fri, 22 Dec 2017 18:30:25 +0000 Subject: Add autorun and memtest. --- config/build.cfg | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/build.cfg b/config/build.cfg index 38f9295..900b0a7 100644 --- a/config/build.cfg +++ b/config/build.cfg @@ -244,6 +244,11 @@ my $_l = { packs => { int => [ map { "i18n-$_" } qw(en) ], }, + copy_from_repo => [ + 'autorun.inf' => 'files/autorun.inf', + 'dosutils' => 'dosutils', + 'isolinux/memtest' => "boot/memtest", + ], media => { storage => 'iso', label => build_label($build), @@ -258,6 +263,7 @@ my $_l = { ' + use non-free video drivers (slower to boot)' => { append => $default_append . ' nokmsboot' }, 'Install Mageia Live' => { append => $default_append . ' xdriver=free' }, ' + use non-free video drivers (slower to boot)' => { append => $default_append . ' nokmsboot' }, + 'Memory Test' => { command => 'linux16', image => '/boot/memtest', initrd => '' }, ], #mbr_boot_img => 'bootloader/boot_hybrid.img', #eltorito_img => 'bootloader/eltorito.img', -- cgit v1.2.1 From 5d2a65ecd96488496332a1c216608ba57424292e Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sat, 23 Dec 2017 00:14:20 +0000 Subject: Updates for latest drakiso. --- config/build.cfg | 4 +--- config/settings.cfg | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/config/build.cfg b/config/build.cfg index 900b0a7..244ec32 100644 --- a/config/build.cfg +++ b/config/build.cfg @@ -246,7 +246,7 @@ my $_l = { }, copy_from_repo => [ 'autorun.inf' => 'files/autorun.inf', - 'dosutils' => 'dosutils', + 'dosutils' => 'files/dosutils', 'isolinux/memtest' => "boot/memtest", ], media => { @@ -268,8 +268,6 @@ my $_l = { #mbr_boot_img => 'bootloader/boot_hybrid.img', #eltorito_img => 'bootloader/eltorito.img', #bootx64_efi => 'bootloader/bootx64.efi', - files => [ - ], }, mount => MGA::DrakISO::Mounts::volatile_squash_union($use_modules), }; diff --git a/config/settings.cfg b/config/settings.cfg index 790e563..a078fd3 100644 --- a/config/settings.cfg +++ b/config/settings.cfg @@ -7,5 +7,4 @@ arch=x86_64 region=all default_user=live repository=/home/bcd/build_bcd/pieces/6 -builddir=/home/draklive/var-data/build -chroot=/home/draklive/var-data/chroot +workdir=/home/draklive/var-data -- cgit v1.2.1 From 941a530dc797f35727d8cf0f37ad65ec8c05d733 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sat, 23 Dec 2017 20:30:19 +0000 Subject: bootloader files moved to drakiso --- bootloader/Makefile | 14 ---- bootloader/lang-names.txt | 66 ---------------- bootloader/make-grub-po | 180 ------------------------------------------- bootloader/make-kbd-info | 115 --------------------------- bootloader/make-kbd-po | 81 ------------------- bootloader/po/Makefile | 16 ---- bootloader/po/bootloader.pot | 62 --------------- bootloader/po/de.po | 62 --------------- bootloader/po/fr.po | 62 --------------- 9 files changed, 658 deletions(-) delete mode 100644 bootloader/Makefile delete mode 100644 bootloader/lang-names.txt delete mode 100755 bootloader/make-grub-po delete mode 100755 bootloader/make-kbd-info delete mode 100755 bootloader/make-kbd-po delete mode 100644 bootloader/po/Makefile delete mode 100644 bootloader/po/bootloader.pot delete mode 100644 bootloader/po/de.po delete mode 100644 bootloader/po/fr.po diff --git a/bootloader/Makefile b/bootloader/Makefile deleted file mode 100644 index 9994dae..0000000 --- a/bootloader/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -all: kbd-names.txt lang-kbds.txt po - -kbd-names%txt lang-kbds%txt: layouts - make-kbd-info - -layouts: - -.PHONY: po -po: make-grub-po make-kbd-po kbd-names.txt - make -C po - -clean: - rm -rf kbd-names.txt lang-kbds.txt layouts - make -C po clean diff --git a/bootloader/lang-names.txt b/bootloader/lang-names.txt deleted file mode 100644 index 57a70e5..0000000 --- a/bootloader/lang-names.txt +++ /dev/null @@ -1,66 +0,0 @@ -# The GNU Unifont font contains all the glyphs used in this file.use utf8; -# \x{nnnn} represents the Unicode code point U+nnnn (where nnnn is four hex digits). -use utf8; -( -"af_ZA" => "Afrikaans", # Afrikaans -"ar_EG" => "\x{fef2}\x{fe91}\x{feae}\x{fecb}", # Arabic -"bg_BG" => "Български", # Bulgarian -"bn_BD" => "\x{09ac}\x{09be}\x{0982}\x{09b2}\x{09be}", # Bengali -"bs_BA" => "Bosanski", # Bosnian -"ca_ES" => "Català", # Catalan -"cs_CZ" => "Čeština", # Czech -"cy_GB" => "Cymraeg", # Welsh -"da_DK" => "Dansk", # Danish -"de_DE" => "Deutsch", # German -"el_GR" => "Ελληνικά", # Greek -"en_GB" => "English (UK)", # English -"en_US" => "English (US)", # English -"es_ES" => "Español", # Spanish -"et_EE" => "Eesti", # Estonian -"fa_IR" => "\x{fbfd}\x{feb4}\x{0631}\x{fe8e}\x{fed3}", # Farsi -"fi_FI" => "Suomi", # Finnish -"fr_FR" => "Français", # French -"gl_ES" => "Galego", # Galician -"ka_GE" => "ქართული", # Kartuli -"gu_IN" => "\x{0a97}\x{0ac1}\x{0a9c}\x{0ab0}\x{0abe}\x{0aa4}\x{0ac0}", # Gujarati -"he_IL" => "תירבע", # Hebrew -"hi_IN" => "\x{0939}\x{093f}\x{0902}\x{0926}\x{0940}", # Hindi -"hr_HR" => "Hrvatski", # Croatian -"hu_HU" => "Magyar", # Hungarian -"id_ID" => "Bahasa Indonesia", # Indonesian -"it_IT" => "Italiano", # Italian -"ja_JP" => "日本語", # Japanese -"jv_ID" => "Basa Jawa", # Javanese -"km_KH" => "Khmer", # Khmer -"ko_KR" => "한글", # Korean -"ky_KG" => "Кыргызча", # Kirghiz -"lo_LA" => "\x{0e9e}\x{0eb2}\x{0eaa}\x{0eb2}\x{0ea5}\x{0eb2}\x{0ea7}", # Lao -"lt_LT" => "Lietuvių", # Lithuanian -"mk_MK" => "Македонски", # Macedonian -"mr_IN" => "\x{092e}\x{0930}\x{093e}\x{0920}\x{0940}", # Marathi -"nb_NO" => "Norsk (bokmål)", # Norwegian -"nn_NO" => "Norsk (nynorsk)", # Norwegian -"nl_NL" => "Nederlands", # Dutch -"pa_IN" => "\x{0a2a}\x{0a70}\x{0a1c}\x{0a3e}\x{0a2c}\x{0a40}", # Punjabi -"pl_PL" => "Polski", # Polish -"pt_PT" => "Português", # Portuguese -"pt_BR" => "Português (Brasil)", # Portuguese (Brazilian) -"ro_RO" => "Română", # Romanian -"ru_RU" => "Русский", # Russian -"si_LK" => "\x{0dc3}\x{0dd2}\x{0d82}\x{0dc4}\x{0dbd}", # Sinhala -"sk_SK" => "Slovenčina", # Slovak -"sl_SI" => "Slovenščina", # Slovenian -"sr_CS" => "Srpski", # Serbian -"sv_SE" => "Svenska", # Swedish -"ta_IN" => "\x{0ba4}\x{0bae}\x{0bbf}\x{0bb4}\x{0bcd}", # Tamil -"tg_TJ" => "Тоҷикӣ", # Tajik -"th_TH" => "\x{0e20}\x{0e32}\x{0e29}\x{0e32}\x{0e44}\x{0e17}\x{0e22}", # Thai -"tr_TR" => "Türkçe", # Turkish -"uk_UA" => "Українська", # Ukrainian -"vi_VN" => "Tiếng Việt", # Vietnamese -"wa_BE" => "Walon", # Walloon -"xh_ZA" => "isiXhosa", # Xhosa -"zh_CN" => "简体中文", # Simplified Chinese -"zh_TW" => "繁體中文 (台灣)", # Traditional Chinese -"zu_ZA" => "isiZulu", # Zulu -) diff --git a/bootloader/make-grub-po b/bootloader/make-grub-po deleted file mode 100755 index d85005b..0000000 --- a/bootloader/make-grub-po +++ /dev/null @@ -1,180 +0,0 @@ -#!/usr/bin/perl - -# Copyright (C) 2017 Mageia -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -# SYNOPSIS -# -# This program generates a PO file containing translations of the grub2 -# runtime messages into the language specified by the first command line -# argument. grub2 must be installed on the build system, so that the -# translations are available. -# -# The full set of translations is quite large, so we only generate -# translations for the messages we expect to see in the ISO bootloader. -# -# The PO file (${LANGUAGE}-grub.po) is stored in the current working -# directory. - -use lib qw(/usr/lib/libDrakX); - -use strict; - -use Cwd qw(abs_path getcwd); -use MDK::Common; -use common; - -# Get correct namespace (grub instead of libDrakX). -BEGIN { unshift @::textdomains, 'grub' } - -# Set the translation language. -@ARGV == 1 && $ARGV[0] or die "Usage: make-grub-po \n"; -$ENV{LANGUAGE} = $ARGV[0]; - -# Define the list of strings we want to translate. -my @msgids = ( - "Press enter to boot the selected OS, `e' to edit the commands before booting " . - "or `c' for a command-line. ESC to return previous menu.", - - "The highlighted entry will be executed automatically in %ds.", - - "%ds remaining.", - - "%ds", - - "Minimal BASH-like line editing is supported. For the first word, TAB lists " . - "possible command completions. Anywhere else TAB lists possible device or " . - "file completions. %s", - - "ESC at any time exits.", - - "Press any key to continue...", - - "Possible commands are:", - - "Possible devices are:", - - "Possible files are:", - - "Possible partitions are:", - - "Possible arguments are:", - - "Possible things are:", - - "can't find command `%s'", - - "one argument expected", - - "two arguments expected", - - "three arguments expected", - - "four arguments expected", - - "missing arguments", - - "unknown argument", - - "missing `%c' symbol", - - "filename expected", - - "file or layout name required", - - "file `%s' not found", - - "no terminal specified", - - "terminal `%s' isn't found", - - "Active input terminals:", - - "Available input terminals:", - - "Active output terminals:", - - "Available output terminals:", - - "no server is specified", - - "Device %s:", - - "Partition %s:", - - "No known filesystem detected", - - "Filesystem cannot be accessed", - - "Filesystem type %s", - - "- Label `%s'", - - "- Last modification time %d-%02d-%02d %02d:%02d:%02d %s", - - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday", - "Sunday", - - " - Sector size %uB", - - " - Total size %llu%sKiB", - - " - Total size unknown", - - "Loaded fonts:", - - "error: %s.\n", - - ".5" -); - -# Open the output file -my $fn = getcwd() . '/' . $ARGV[0] . '-grub.po'; -open(my $fh, '>' . $fn) or die "couldn't open $fn"; - -print $fh "# This file is automatically generated\n"; -print $fh "\n"; - -foreach (@msgids) { - my ($msgid) = $_; - - my $msgstr = translate($msgid); - - # Blank the message string if there is no translation available. - $msgstr = '' if $msgstr eq $msgid; - - # Any double quote characters need to be escaped when writing the - # PO file. - $msgid =~ s/"/\\"/g; - $msgstr =~ s/"/\\"/g; - - # Any newline characters need to be escaped when writing the - # PO file. - $msgid =~ s/\R/\\n/g; - $msgstr =~ s/\R/\\n/g; - - # Write the entry for this item. - print $fh "msgid \"$msgid\"\n"; - print $fh "msgstr \"$msgstr\"\n"; - print $fh "\n"; -} - -close($fh); diff --git a/bootloader/make-kbd-info b/bootloader/make-kbd-info deleted file mode 100755 index d36fde8..0000000 --- a/bootloader/make-kbd-info +++ /dev/null @@ -1,115 +0,0 @@ -#!/usr/bin/perl - -# Copyright (C) 2017 Mageia -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -# SYNOPSIS -# -# This program gets the list of supported keyboards from libDrakX and -# generates a grub2 keyboard mapping file for each keyboard in the list. -# It then generates the keyboard names file and the language to keyboard -# mapping file that are used when generating the bootloader menus for -# the Mageia ISOs. -# -# The grub2 keyboard mapping files are generated using the grub2-kbdcomp -# program. The X11 keyboard layout and variant names are obtained from -# libDrakX. The files (*.gkb) are stored in the 'layouts' subdirectory -# of the current working directory. -# -# The keyboard names file consists of a list of paired identifier and -# description strings. The identifier is the keyboard identifier used -# in libDrakX. The description is the canonical keyboard description -# provided by libDrakX. The file (kbd-names.txt) is stored in the -# current working directory. -# -# The language to keyboard mapping file consists of a map of language -# identifier to keyboard identifier strings. The language identifier -# is the standard language/country code used for specifying a locale -# (e.g. en_US). The keyboard identifier is the default keyboard for -# that language, as provided by libDrakX. The file (lang-kbds.txt) is -# stored in the current working directory. -# -# The list of supported languages is read from the language names file -# (lang-names.txt) that is used when generating the bootloader menus. -# This file is expected to be found in the current working directory. - -use lib qw(/usr/lib/libDrakX); - -use strict; - -use Cwd qw(getcwd); -use Data::Dumper; -use MDK::Common; -use common; -use keyboard; -use run_program; - -# Make sure we get the canonical description for the keyboard. -$ENV{LANGUAGE} = 'C'; - -# Make sure the 'layouts' subdirectory exists. -my $kbd_dir = getcwd() . '/layouts'; -mkdir_p($kbd_dir); - -# Generate the grub2 keyboard mapping files and collect the keyboard -# descriptions. For keyboards with multiple layouts, only use the first -# layout. If we fail to generate a keyboard mapping, don't include that -# keyboard in the lists. -my %names; -my @keyboards = map { { KEYBOARD => $_ } } keyboard::KEYBOARDs(); -foreach (@keyboards) { - my $id = $_->{KEYBOARD}; - my $xkb = keyboard::keyboard2full_xkb($_); - my @model = split(',', $xkb->{XkbModel}); - my @layout = split(',', $xkb->{XkbLayout}); - my @variant = split(',', $xkb->{XkbVariant}); - my $kbd_file = $kbd_dir . '/' . $id . '.gkb'; - if (-e $kbd_file || run_program::run('grub2-kbdcomp', '-o', $kbd_file, '-model', $model[0], $layout[0], $variant[0])) { - $names{$id} = translate(keyboard::keyboard2text($_)); - } else { - rm_rf($kbd_file); - } -} - -# Generate the keyboard names file. -my $filename = getcwd() . '/kbd-names.txt'; -open(my $f, '>' . $filename) or die "couldn't open $filename"; -print $f "(\n"; -foreach my $id (sort keys %names) { - my $name = $names{$id}; - printf $f " '$id'%s => '$name',\n", ' ' x (16 - length($id)); -} -print $f ")\n"; -close($f); - -# Read the list of supported languages. -my $lang_names = getcwd() . '/lang-names.txt'; --e $lang_names or die "cannot find language names file $lang_names\n"; -my @langs = group_by2(eval(cat_($lang_names))) - or die "error in language names file $lang_names\n"; - -# Generate the language to keyboard mapping file. -$filename = getcwd() . '/lang-kbds.txt'; -open($f, '>' . $filename) or die "couldn't open $filename"; -print $f "{\n"; -foreach (@langs) { - my ($lang) = @$_; - my $kbd = keyboard::lang2keyboard($lang)->{KEYBOARD}; - $kbd = '' if !$names{$kbd}; - printf $f " '$lang' => '$kbd',\n"; -} -print $f "}\n"; -close($f); diff --git a/bootloader/make-kbd-po b/bootloader/make-kbd-po deleted file mode 100755 index 54ed57e..0000000 --- a/bootloader/make-kbd-po +++ /dev/null @@ -1,81 +0,0 @@ -#!/usr/bin/perl - -# Copyright (C) 2017 Mageia -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -# SYNOPSIS -# -# This program reads the keyboard names file created by the make-kbd-info -# program and generates a PO file containing translations of the keyboard -# names into the language specified by the first command line argument. -# The translations are obtained from libDrakX. -# -# The keyboard names file (kbd-names.txt) is searched for in the directory -# containing this program. The PO file (${LANGUAGE}-kbd.po) is stored in -# the current working directory. - -use lib qw(/usr/lib/libDrakX); - -use strict; - -use Cwd qw(abs_path getcwd); -use MDK::Common; -use common; -use keyboard; - -# Get correct namespace (drakx-kbd-mouse-x11 instead of libDrakX). -BEGIN { unshift @::textdomains, 'drakx-kbd-mouse-x11' } - -# Set the translation language. -@ARGV == 1 && $ARGV[0] or die "Usage: make-kbd-po \n"; -$ENV{LANGUAGE} = $ARGV[0]; - -# Read the keyboard names file. -my $kbd_names = dirname(abs_path($0)) . '/kbd-names.txt'; --e $kbd_names or die "cannot find keyboard name file $kbd_names\n"; -my @kbds = group_by2(eval(cat_($kbd_names))) - or die "error in keyboard name file $kbd_names\n"; - -# Open the output file -my $fn = getcwd() . '/' . $ARGV[0] . '-kbd.po'; -open(my $fh, '>' . $fn) or die "couldn't open $fn"; - -print $fh "# This file is automatically generated\n"; -print $fh "\n"; - -foreach (@kbds) { - my ($kbd, $msgid) = @$_; - - # make-kbd-info strips off the prefix from the drakx-kbd-mouse-x11 - # msgids, so we must use the original msgid to get the translation. - my $msgstr = translate(keyboard::KEYBOARD2text($kbd)); - - # Any double quote characters need to be escaped when writing the - # PO file. - $msgid =~ s/"/\\"/g; - $msgstr =~ s/"/\\"/g; - - # Some translations contain embedded newline characters. We need - # all translations to be a single line. - $msgstr =~ s/\R/ /g; - - # Write the entry for this keyboard. - print $fh "msgid \"$msgid\"\n"; - print $fh "msgstr \"$msgstr\"\n"; - print $fh "\n"; -} - -close($fh); diff --git a/bootloader/po/Makefile b/bootloader/po/Makefile deleted file mode 100644 index 297110e..0000000 --- a/bootloader/po/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -PO_FILES = $(filter-out $(wildcard *-*.po), $(wildcard *.po)) -MO_FILES = $(addsuffix .mo, $(basename $(PO_FILES))) - -all: $(MO_FILES) - -%.mo: %.po %-grub.po %-kbd.po - msgfmt -o $@ $^ - -%-grub.po: ../make-grub-po - ../make-grub-po $(basename $*) - -%-kbd.po: ../make-kbd-po ../kbd-names.txt - ../make-kbd-po $(basename $*) - -clean: - rm -f *-grub.po *-kbd.po *.mo diff --git a/bootloader/po/bootloader.pot b/bootloader/po/bootloader.pot deleted file mode 100644 index 3c70470..0000000 --- a/bootloader/po/bootloader.pot +++ /dev/null @@ -1,62 +0,0 @@ -# Translations for Mageia ISO boot loader -# Copyright (C) 2017 Mageia -# -# NOTE: If you add a new language, please uncomment (or add if necessary) -# the corresponding line(s) in the lang-names.txt file. -# -# NOTE: Except where noted, all strings must fit on a single line on the -# bootloader screen (which may be running at a low resolution). Please keep -# the translated strings as short as possible. -# -# NOTE: grub2 currently doesn't display some scripts properly. It is probably -# best not to enable these languages. Language codes known to be affected -# are: bn gu hi mr pa si ta -# -msgid "" -msgstr "" -"Project-Id-Version: draklive-config\n" -"POT-Creation-Date: 2017-11-30 14:23+0000\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" - -# NOTE: Please leave "[$lang]" untranslated - it is automatically replaced -# by the currently selected language code (e.g. en_US). -msgid "Language [$lang]" -msgstr "" - -# NOTE: Please leave "[$kbd]" untranslated - it is automatically replaced -# by the currently selected keyboard code (e.g. us). -msgid "Keyboard [$kbd]" -msgstr "" - -msgid "[more options after boot]" -msgstr "" - -msgid "Boot Mageia Live" -msgstr "" - -msgid "Install Mageia Live" -msgstr "" - -msgid " + use non-free video drivers (slower to boot)" -msgstr "" - -msgid "Select an item with the arrow keys and press Enter to boot." -msgstr "" - -msgid "Press 'c' for command line, 'e' to edit." -msgstr "" - -# NOTE: The Mageia grub2 package replaces one of the upstream messages -# with this, but doesn't provide any translations. This doesn't need -# to fit on a single line. -msgid "" -"Press Ctrl-x to start, Ctrl-c for a command prompt or Escape to discard " -"edits and return to the menu. Pressing Tab lists possible completions." -msgstr "" diff --git a/bootloader/po/de.po b/bootloader/po/de.po deleted file mode 100644 index d965c90..0000000 --- a/bootloader/po/de.po +++ /dev/null @@ -1,62 +0,0 @@ -# Translations for Mageia ISO boot loader -# Copyright (C) 2017 Mageia -# -# NOTE: If you add a new language, please uncomment (or add if necessary) -# the corresponding line(s) in the lang-names.txt file. -# -# NOTE: All strings must fit on a single line on the bootloader screen (which -# may be running at a low resolution). Please keep the translated strings as -# short as possible. -# -# NOTE: grub2 currently doesn't display some scripts properly. It is probably -# best not to enable these languages. Language codes known to be affected -# are: bn gu hi mr pa si ta -# -msgid "" -msgstr "" -"Project-Id-Version: draklive-config\n" -"POT-Creation-Date: 2017-11-30 14:23+0000\n" -"PO-Revision-2017-11-30 14:23+0000\n" -"Last-Translator: Martin Whitaker\n" -"Language-Team: LANGUAGE \n" -"Language: de\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" - -# NOTE: Please leave "[$lang]" untranslated - it is automatically replaced -# by the currently selected language code (e.g. en_US). -msgid "Language [$lang]" -msgstr "Sprache [$lang]" - -# NOTE: Please leave "[$kbd]" untranslated - it is automatically replaced -# by the currently selected keyboard code (e.g. us). -msgid "Keyboard [$kbd]" -msgstr "Tastatur [$kbd]" - -msgid "[more options after boot]" -msgstr "untranslated" - -msgid "Boot Mageia Live" -msgstr "Mageia Live starten" - -msgid "Install Mageia Live" -msgstr "Mageia Live installieren" - -msgid " + use non-free video drivers (slower to boot)" -msgstr " + verwende unfreie Videotreiber (System startet langsamer)" - -msgid "Select an item with the arrow keys and press Enter to boot." -msgstr "untranslated" - -msgid "Press 'c' for command line, 'e' to edit." -msgstr "untranslated" - -# NOTE: The Mageia grub2 package replaces one of the upstream messages -# with this, but doesn't provide any translations. This doesn't need -# to fit on a single line. -msgid "" -"Press Ctrl-x to start, Ctrl-c for a command prompt or Escape to discard " -"edits and return to the menu. Pressing Tab lists possible completions." -msgstr "untranslated" diff --git a/bootloader/po/fr.po b/bootloader/po/fr.po deleted file mode 100644 index 4aba501..0000000 --- a/bootloader/po/fr.po +++ /dev/null @@ -1,62 +0,0 @@ -# Translations for Mageia ISO boot loader -# Copyright (C) 2017 Mageia -# -# NOTE: If you add a new language, please uncomment (or add if necessary) -# the corresponding line(s) in the lang-names.txt file. -# -# NOTE: All strings must fit on a single line on the bootloader screen (which -# may be running at a low resolution). Please keep the translated strings as -# short as possible. -# -# NOTE: grub2 currently doesn't display some scripts properly. It is probably -# best not to enable these languages. Language codes known to be affected -# are: bn gu hi mr pa si ta -# -msgid "" -msgstr "" -"Project-Id-Version: draklive-config\n" -"POT-Creation-Date: 2017-11-30 14:23+0000\n" -"PO-Revision-Date: 2017-11-30 14:23+0000\n" -"Last-Translator: Martin Whitaker\n" -"Language-Team: LANGUAGE \n" -"Language: fr\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" - -# NOTE: Please leave "[$lang]" untranslated - it is automatically replaced -# by the currently selected language code (e.g. en_US). -msgid "Language [$lang]" -msgstr "Langue [$lang]" - -# NOTE: Please leave "[$kbd]" untranslated - it is automatically replaced -# by the currently selected keyboard code (e.g. us). -msgid "Keyboard [$kbd]" -msgstr "Clavier [$kbd]" - -msgid "[more options after boot]" -msgstr "" - -msgid "Boot Mageia Live" -msgstr "Amorcer Mageia Live" - -msgid "Install Mageia Live" -msgstr "Installer Mageia Live" - -msgid " + use non-free video drivers (slower to boot)" -msgstr " + avec pilote vidéo propriétaire (démarrage lent)" - -msgid "Select an item with the arrow keys and press Enter to boot." -msgstr "" - -msgid "Press 'c' for command line, 'e' to edit." -msgstr "" - -# NOTE: The Mageia grub2 package replaces one of the upstream messages -# with this, but doesn't provide any translations. This doesn't need -# to fit on a single line. -msgid "" -"Press Ctrl-x to start, Ctrl-c for a command prompt or Escape to discard " -"edits and return to the menu. Pressing Tab lists possible completions." -msgstr "" -- cgit v1.2.1 From 4f7847f05e437254653dbb89ee1e77edccef26f4 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sat, 23 Dec 2017 20:38:12 +0000 Subject: Move update_media.sh to top level and get repo path from settings.cfg --- files/mga_rpms/update_media.sh | 87 ---------------------------------------- update_media.sh | 90 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+), 87 deletions(-) delete mode 100755 files/mga_rpms/update_media.sh create mode 100755 update_media.sh diff --git a/files/mga_rpms/update_media.sh b/files/mga_rpms/update_media.sh deleted file mode 100755 index f742b66..0000000 --- a/files/mga_rpms/update_media.sh +++ /dev/null @@ -1,87 +0,0 @@ - -bcdmedia=/home/bcd/build_bcd/pieces/6 - -copy_latest() -{ - repo=$1 - for arch in i586 x86_64 ; do - if [ $2 = "lib" ] ; then - if [ $arch = "x86_64" ] ; then - name=lib64$3 - else - name=lib$3 - fi - else - name=$2 - fi - if [ $arch = "i586" ] ; then - name=${name/-desktop-/-desktop586-} - fi - path=`ls -1v $bcdmedia/$arch/media/$repo/{release,updates}/$name.rpm 2> /dev/null | tail -1` - if [ -z $path ] ; then - echo "Couldn't find $name for $arch" - exit 1 - else - cp $path $arch/mga_rpms/$repo/ - fi - done -} - -# create dirs if non-existant -mkdir -p {i586,x86_64}/mga_rpms/{core,nonfree}/media_info - -# clean dirs -rm -f {i586,x86_64}/mga_rpms/{core,nonfree}/*.rpm -rm -f {i586,x86_64}/mga_rpms/{core,nonfree}/media_info/* - -# add grub2 -copy_latest core grub2-2* -copy_latest core grub2-efi-2* -copy_latest core grub2-mageia-theme-2* -copy_latest core lib efivar0-* -copy_latest core efibootmgr-* -copy_latest core efivar-* - -# add dkms -copy_latest core dkms-2* -copy_latest core binutils-2* -copy_latest core gcc-5* -copy_latest core gcc-cpp-5* -copy_latest core glibc-devel-* -copy_latest core isl-0* -copy_latest core kernel-desktop-devel-4* -copy_latest core kernel-desktop-devel-latest-4* -copy_latest core kernel-userspace-headers-4* -copy_latest core lib isl15-0* -copy_latest core lib mpc3-1* -copy_latest core lib ncurses-devel-* -copy_latest core libstdc++-devel-* -copy_latest core make-4* - -# add nvidia -copy_latest nonfree dkms-nvidia304-* -copy_latest nonfree dkms-nvidia340-* -copy_latest nonfree dkms-nvidia-current-* -copy_latest nonfree x11-driver-video-nvidia304-* -copy_latest nonfree x11-driver-video-nvidia340-* -copy_latest nonfree x11-driver-video-nvidia-current-* - -# add broadcom-wl -copy_latest nonfree dkms-broadcom-wl-* -copy_latest nonfree broadcom-wl-common-* - -# add broadcom wireless configs -copy_latest core broadcom-bcma-config-* -copy_latest core broadcom-ssb-config-* - -# add repo pubkeys -for arch in i586 x86_64 ; do - cp $bcdmedia/$arch/media/core/release/media_info/pubkey $arch/mga_rpms/core/media_info/ - cp $bcdmedia/$arch/media/nonfree/release/media_info/pubkey $arch/mga_rpms/nonfree/media_info/ -done - -# create hdlists -for arch in i586 x86_64 ; do - genhdlist2 $arch/mga_rpms/core - genhdlist2 $arch/mga_rpms/nonfree -done diff --git a/update_media.sh b/update_media.sh new file mode 100755 index 0000000..f340fde --- /dev/null +++ b/update_media.sh @@ -0,0 +1,90 @@ +#!/bin/sh +repository=$(grep repository config/settings.cfg | sed s/repository=//) +echo "Updating files/mga_rpms from $repository" + +cd files/mga_rpms + +copy_latest() +{ + repo=$1 + for arch in i586 x86_64 ; do + if [ $2 = "lib" ] ; then + if [ $arch = "x86_64" ] ; then + name=lib64$3 + else + name=lib$3 + fi + else + name=$2 + fi + if [ $arch = "i586" ] ; then + name=${name/-desktop-/-desktop586-} + fi + path=`ls -1v $repository/$arch/media/$repo/{release,updates}/$name.rpm 2> /dev/null | tail -1` + if [ -z $path ] ; then + echo "Couldn't find $name for $arch" + exit 1 + else + cp $path $arch/mga_rpms/$repo/ + fi + done +} + +# create dirs if non-existant +mkdir -p {i586,x86_64}/mga_rpms/{core,nonfree}/media_info + +# clean dirs +rm -f {i586,x86_64}/mga_rpms/{core,nonfree}/*.rpm +rm -f {i586,x86_64}/mga_rpms/{core,nonfree}/media_info/* + +# add grub2 +copy_latest core grub2-2* +copy_latest core grub2-efi-2* +copy_latest core grub2-mageia-theme-2* +copy_latest core lib efivar0-* +copy_latest core efibootmgr-* +copy_latest core efivar-* + +# add dkms +copy_latest core dkms-2* +copy_latest core binutils-2* +copy_latest core gcc-5* +copy_latest core gcc-cpp-5* +copy_latest core glibc-devel-* +copy_latest core isl-0* +copy_latest core kernel-desktop-devel-4* +copy_latest core kernel-desktop-devel-latest-4* +copy_latest core kernel-userspace-headers-4* +copy_latest core lib isl15-0* +copy_latest core lib mpc3-1* +copy_latest core lib ncurses-devel-* +copy_latest core libstdc++-devel-* +copy_latest core make-4* + +# add nvidia +copy_latest nonfree dkms-nvidia304-* +copy_latest nonfree dkms-nvidia340-* +copy_latest nonfree dkms-nvidia-current-* +copy_latest nonfree x11-driver-video-nvidia304-* +copy_latest nonfree x11-driver-video-nvidia340-* +copy_latest nonfree x11-driver-video-nvidia-current-* + +# add broadcom-wl +copy_latest nonfree dkms-broadcom-wl-* +copy_latest nonfree broadcom-wl-common-* + +# add broadcom wireless configs +copy_latest core broadcom-bcma-config-* +copy_latest core broadcom-ssb-config-* + +# add repo pubkeys +for arch in i586 x86_64 ; do + cp $repository/$arch/media/core/release/media_info/pubkey $arch/mga_rpms/core/media_info/ + cp $repository/$arch/media/nonfree/release/media_info/pubkey $arch/mga_rpms/nonfree/media_info/ +done + +# create hdlists +for arch in i586 x86_64 ; do + genhdlist2 $arch/mga_rpms/core + genhdlist2 $arch/mga_rpms/nonfree +done -- cgit v1.2.1 From bb243cecd644af1cf359cd29d52504d2bbafde4b Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sat, 23 Dec 2017 20:39:43 +0000 Subject: Add script for fetching the grub2 bootloader files from the repo. --- update_bootloader_files.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 update_bootloader_files.sh diff --git a/update_bootloader_files.sh b/update_bootloader_files.sh new file mode 100755 index 0000000..98ff5dc --- /dev/null +++ b/update_bootloader_files.sh @@ -0,0 +1,22 @@ +#!/bin/sh +repository=$(grep repository config/settings.cfg | sed s/repository=//) + +# Remove old files +rm -rf bootloader + +# The 64-bit packge contains everything we need. The non-UEFI grub2 images +# are built for i386, and everything else should be architecture-independent +path=`ls -1v $repository/x86_64/media/core/{release,updates}/drakiso-bootloader-files*.rpm 2> /dev/null | tail -1` +if [ -z $path ] ; then + echo "ERROR: couldn't find drakiso-bootloader-files RPM in $repository." + exit 1 +else + echo "Extracting bootloader files from repository." + rpm2cpio $path | cpio -idm + if [ $? -ne 0 ] ; then + echo "ERROR: failed to extract files from archive." + exit 1 + fi + mv usr/share/drakiso-bootloader bootloader + rm -r usr +fi -- cgit v1.2.1 From 67c1a866459151ba98331dfc152bcf7a00d5e87b Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sat, 23 Dec 2017 20:51:31 +0000 Subject: Update build scripts. --- build_all.sh | 23 +++++++++++++++++++++++ build_one.sh | 9 +++++++++ tools/build_live.sh | 26 -------------------------- update_bootloader_files.sh | 1 + 4 files changed, 33 insertions(+), 26 deletions(-) create mode 100755 build_all.sh create mode 100755 build_one.sh delete mode 100755 tools/build_live.sh diff --git a/build_all.sh b/build_all.sh new file mode 100755 index 0000000..2842913 --- /dev/null +++ b/build_all.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +declare -A desktops + +release=6 + +archs="i586 x86_64" + +desktops[i586]="Xfce" + +desktops[x86_64]="GNOME Plasma Xfce" + +./update_media.sh +./update_bootloader_files.sh +for arch in $archs; do + for desktop in ${desktops[$arch]}; do + sudo -u draklive sudo /usr/sbin/draklive --clean --all --define arch=$arch --define desktop=$desktop + sudo -u bcd mkdir -p /home/bcd/public_html/isos/trial-builds/Mageia-${release}-LiveDVD-${desktop}-${arch}-DVD + sudo -u bcd cp /home/draklive/var-data/build/Mageia-${release}-LiveDVD-${desktop}-${arch}-DVD/dist/* /home/bcd/public_html/isos/trial-builds/Mageia-${release}-LiveDVD-${desktop}-${arch}-DVD + # not enough space on rabbit's RAM disk for all four variants, so delete as we go + sudo -u draklive sudo /usr/sbin/draklive --clean --define arch=$arch --define desktop=$desktop + done +done diff --git a/build_one.sh b/build_one.sh new file mode 100755 index 0000000..bf0b47b --- /dev/null +++ b/build_one.sh @@ -0,0 +1,9 @@ +#!/bin/sh +./update_media.sh +./update_bootloader_files.sh +draklive='perl -I ../drakiso/lib ../drakiso/draklive' +if [ $# -ge 0 ] ; then + sudo $draklive $* +else + sudo $draklive --clean --all +fi diff --git a/tools/build_live.sh b/tools/build_live.sh deleted file mode 100755 index dce0430..0000000 --- a/tools/build_live.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -# Run this script from the draklive-config directory: -# ./tools/build_live.sh - -declare -A desktops - -release=6-rc - -archs="i586 x86_64" - -desktops[i586]="Xfce" - -desktops[x86_64]="GNOME Plasma Xfce" - -pushd files/mga_rpms -./update_media.sh -popd -for arch in $archs; do - for desktop in ${desktops[$arch]}; do - sudo -u draklive sudo /usr/sbin/draklive --clean --all --define arch=$arch --define desktop=$desktop - sudo -u bcd mkdir -p /home/bcd/public_html/isos/trial-builds/Mageia-${release}-LiveDVD-${desktop}-${arch}-DVD - sudo -u bcd cp /home/draklive/var-data/build/Mageia-${release}-LiveDVD-${desktop}-${arch}-DVD/dist/* /home/bcd/public_html/isos/trial-builds/Mageia-${release}-LiveDVD-${desktop}-${arch}-DVD - # not enough space on rabbit's RAM disk for all four variants, so delete as we go - sudo -u draklive sudo /usr/sbin/draklive --clean --define arch=$arch --define desktop=$desktop - done -done diff --git a/update_bootloader_files.sh b/update_bootloader_files.sh index 98ff5dc..554f872 100755 --- a/update_bootloader_files.sh +++ b/update_bootloader_files.sh @@ -1,5 +1,6 @@ #!/bin/sh repository=$(grep repository config/settings.cfg | sed s/repository=//) +echo "Fetching bootloader files from $repository" # Remove old files rm -rf bootloader -- cgit v1.2.1 From 090792e47255bdc1e8ad0609478a426bc3e1801a Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sat, 23 Dec 2017 21:00:19 +0000 Subject: Update config to use bootloader files fetched from repo. --- config/build.cfg | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/config/build.cfg b/config/build.cfg index 244ec32..f5ddd06 100644 --- a/config/build.cfg +++ b/config/build.cfg @@ -253,9 +253,11 @@ my $_l = { storage => 'iso', label => build_label($build), bootloader_title => build_title($build), + bootloader_theme => 'bootloader/maggy', + bootloader_font => 'bootloader/unicode.pf2', bootloader_langs => 'bootloader/lang-names.txt', bootloader_kbds => 'bootloader/kbd-names.txt', - bootloader_messages => 'bootloader/po', + bootloader_messages => 'bootloader/messages', bootloader_default => 0, bootloader_timeout => 10, bootloader_entries => [ @@ -265,9 +267,9 @@ my $_l = { ' + use non-free video drivers (slower to boot)' => { append => $default_append . ' nokmsboot' }, 'Memory Test' => { command => 'linux16', image => '/boot/memtest', initrd => '' }, ], - #mbr_boot_img => 'bootloader/boot_hybrid.img', - #eltorito_img => 'bootloader/eltorito.img', - #bootx64_efi => 'bootloader/bootx64.efi', + mbr_boot_img => 'bootloader/images/boot_hybrid.img', + eltorito_img => 'bootloader/images/eltorito.img', + bootx64_efi => 'bootloader/images/bootx64.efi', }, mount => MGA::DrakISO::Mounts::volatile_squash_union($use_modules), }; -- cgit v1.2.1 From 6248aa59cfb946ddc1395a9def0cbd15e84ceca2 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sat, 23 Dec 2017 21:09:07 +0000 Subject: Fix bug in build_one script. --- build_one.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_one.sh b/build_one.sh index bf0b47b..0e81d3e 100755 --- a/build_one.sh +++ b/build_one.sh @@ -2,7 +2,7 @@ ./update_media.sh ./update_bootloader_files.sh draklive='perl -I ../drakiso/lib ../drakiso/draklive' -if [ $# -ge 0 ] ; then +if [ $# -gt 0 ] ; then sudo $draklive $* else sudo $draklive --clean --all -- cgit v1.2.1 From 07a95d825007b1463d339612ba0c6f16de7852d0 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Thu, 4 Jan 2018 00:25:26 +0000 Subject: Minor cleanup. --- update_bootloader_files.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/update_bootloader_files.sh b/update_bootloader_files.sh index 554f872..6cfdd8b 100755 --- a/update_bootloader_files.sh +++ b/update_bootloader_files.sh @@ -13,11 +13,11 @@ if [ -z $path ] ; then exit 1 else echo "Extracting bootloader files from repository." - rpm2cpio $path | cpio -idm + rpm2cpio $path | cpio -idm --quiet if [ $? -ne 0 ] ; then echo "ERROR: failed to extract files from archive." exit 1 fi - mv usr/share/drakiso-bootloader bootloader - rm -r usr + mv usr/share/drakiso-bootloader bootloader + rm -r usr fi -- cgit v1.2.1 From f20d3a201d826f3032eafeaa5dbf2a0dd1c88487 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Fri, 12 Jan 2018 08:51:39 +0000 Subject: Update for reworked draklive. No longer need to run as root. auto_inst.cfg.pl is automatically generated from information in build.cfg. --- build_one.sh | 4 +- config/auto_inst.cfg.pl | 273 ----------------------------------------- config/build.cfg | 314 +++++++++++++++++++++++++++++++++++++----------- 3 files changed, 245 insertions(+), 346 deletions(-) delete mode 100644 config/auto_inst.cfg.pl diff --git a/build_one.sh b/build_one.sh index 0e81d3e..ccfda8e 100755 --- a/build_one.sh +++ b/build_one.sh @@ -3,7 +3,7 @@ ./update_bootloader_files.sh draklive='perl -I ../drakiso/lib ../drakiso/draklive' if [ $# -gt 0 ] ; then - sudo $draklive $* + $draklive $* else - sudo $draklive --clean --all + $draklive --clean --all fi diff --git a/config/auto_inst.cfg.pl b/config/auto_inst.cfg.pl deleted file mode 100644 index 196046c..0000000 --- a/config/auto_inst.cfg.pl +++ /dev/null @@ -1,273 +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) - '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 - 'grub2-mageia-theme', - - # 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 index f5ddd06..a6d5ca4 100644 --- a/config/build.cfg +++ b/config/build.cfg @@ -2,32 +2,236 @@ use MDK::Common; -my $use_modules = to_bool($build->{settings}{pack}); -my @user_config_dirs = ('/etc/skel', if_($build->{settings}{default_user}, '/home/' . $build->{settings}{default_user})); +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 $distro_theme = 'Default'; +my $distro_release = 'Default'; +my $distro_config = lc($distro_release); + +my $use_modules = to_bool($build->{settings}{pack}); +my @user_config_dirs = ('/etc/skel', if_($default_user, '/home/' . $default_user)); sub build_label { my ($build) = @_; - join('-', 'Mageia', $build->{settings}{version}, $build->{settings}{product}, $build->{settings}{desktop}, $build->{settings}{arch}); + join('-', $distro, $version, $product, $desktops[0], $arch); } sub build_title { my ($build) = @_; - join(' ', 'Mageia', $build->{settings}{version}, $build->{settings}{product}, $build->{settings}{desktop}); + 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 $_l = { system => { - auto_install => 'config/auto_inst.cfg.pl', - install_env => { - }, - if_($build->{settings}{default_user}, preselect_kdm_user => $build->{settings}{default_user}), + 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), + 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_gnome, qw(GNOME)), + if_($has_lxde, qw(LXDE)), + if_($has_plasma, qw(PLASMA5)), + if_($has_xfce, qw(XFCE)), + )) + ], + compssListLevel => 5, + + include_packages => [ + if_($has_lxde, "mageia-lxde-config-$distro_release"), + + # i586 arch specific + if_($arch eq 'i586', + 'vboxadditions-kernel-desktop586-latest', + ), + + # x86_64 arch specific + if_($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 + 'grub2-mageia-theme', + + # 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 + ), + ], + exclude_packages => [ + # i586 arch specific + if_($arch eq 'i586', + '/^kernel-desktop-/', '/^vboxadditions-kernel-.*-desktop-/', + '/^libatlas3-/', + ), + + # x86_64 arch specific + if_($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) + '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', + ), + ], + preferred_packages => [ + if_($has_plasma, 'sddm'), + 'gdm', + ], + + post_install_nr => join(";", + "cp /tmp/media/$arch/release-notes.* /mnt", + "chmod 0644 /mnt/release-notes.*", + ), + 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", + + #- FIXME: in any::set_autologin, unlink if gdm/sddm conf file and binary exist + if_($has_xfce || $has_lxde, "rm -f /etc/sysconfig/autologin"), + ), + langs_always => [ 'en_US' ], + +# additional_media => [ +# { +# name => '', +# path => '', +# packages => [ +# ], +# }, +# ), +# ], +# rpms => [ +# ], +# erase_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 => [ + ], files => [ - if_($build->{settings}{desktop} eq 'GNOME', + 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 } ], @@ -46,10 +250,10 @@ my $_l = { [ 'files/live.modprobe.conf', '/etc/modprobe.conf', { mode => 0644 } ], # add local repos - if_($build->{settings}{arch} eq 'i586', + if_($arch eq 'i586', [ 'files/mga_rpms/i586/mga_rpms', '/var/local' ], ), - if_($build->{settings}{arch} eq 'x86_64', + if_($arch eq 'x86_64', [ 'files/mga_rpms/x86_64/mga_rpms', '/var/local' ], ), @@ -82,11 +286,11 @@ my $_l = { [ '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_($build->{settings}{desktop} eq 'GNOME', + if_($has_gnome, [ 'files/draklive-install.d/run.d/gdm-permissions.sh', '/etc/draklive-install.d/run.d/gdm-permissions.sh', { mode => 755 } ] ), - if_($build->{settings}{desktop} eq 'Plasma', + 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 } ], [ 'files/draklive-install.d/remove.d/clear-sddm-state', '/etc/draklive-install.d/remove.d/clear-sddm-state', { mode => 0644 } ], ), @@ -111,46 +315,22 @@ my $_l = { "/var/lib/dbus/machine-id", "/etc/ssh/ssh_host_*", ], - module_options => { - loop => "max_loop=64", - }, - exclude_modules => [ - ], - additional_modules => [ - ], - stage2_updates => [ - ], 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, final_fixes => join(';', - if_($build->{settings}{default_user}, "echo $build->{settings}{default_user} > /etc/draklive-install.d/user"), - "perl -pi -e 's,,$build->{settings}{default_user},' /etc/draklive-install.d/sysconfig/finish-install", - - if_($build->{settings}{desktop} eq 'Xfce' && $build->{settings}{default_user}, + if_($default_user, + "echo $default_user > /etc/draklive-install.d/user", + "perl -pi -e 's,,$default_user,' /etc/draklive-install.d/sysconfig/finish-install", + ), + if_($has_xfce && $default_user, # add a desktop icon to run draklive-install - "mkdir -p /home/$build->{settings}{default_user}/Desktop", - "cp /usr/share/applications/mageia-draklive-install.desktop /home/$build->{settings}{default_user}/Desktop/draklive-install.desktop", + "mkdir -p /home/$default_user/Desktop", + "cp /usr/share/applications/mageia-draklive-install.desktop /home/$default_user/Desktop/draklive-install.desktop", ), #- fix user perms for copied files - if_($build->{settings}{default_user}, "chown -R " . - "$build->{settings}{default_user}.$build->{settings}{default_user}" . - " /home/$build->{settings}{default_user}" + if_($default_user, + "chown -R $default_user.$default_user /home/$default_user" ), # remove readahead @@ -160,13 +340,7 @@ my $_l = { #- which can be huge '> /var/log/lastlog', - if_($build->{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_($build->{settings}{desktop} eq 'GNOME', + 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/", @@ -175,17 +349,23 @@ my $_l = { "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", + "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", + ), # 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", + "urpmi.addmedia -q 'Live Core' /var/local/mga_rpms/core with media_info/hdlist.cz", + "urpmi.addmedia -q '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", @@ -212,16 +392,8 @@ my $_l = { # 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_($build->{settings}{updates_repository}, - { - name => 'core_updates_testing', - path => $build->{settings}{updates_repository} . '/' . $build->{settings}{arch} . '/media/core/updates_testing', - packages => [ - ], - }, - ), - ], + + vga_mode => 788, }, loopbacks => { exclude => { @@ -263,8 +435,8 @@ my $_l = { 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' }, - ' + 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 => '' }, ], mbr_boot_img => 'bootloader/images/boot_hybrid.img', -- cgit v1.2.1 From ae17937155b36c09a88bf7716607426a115cb0a7 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sun, 14 Jan 2018 13:36:54 +0000 Subject: Update to allow draklive to generate the local repo. --- build_all.sh | 1 - build_one.sh | 1 - config/build.cfg | 49 ++++++++++++++---------------- update_media.sh | 90 -------------------------------------------------------- 4 files changed, 22 insertions(+), 119 deletions(-) delete mode 100755 update_media.sh diff --git a/build_all.sh b/build_all.sh index 2842913..2d3d222 100755 --- a/build_all.sh +++ b/build_all.sh @@ -10,7 +10,6 @@ desktops[i586]="Xfce" desktops[x86_64]="GNOME Plasma Xfce" -./update_media.sh ./update_bootloader_files.sh for arch in $archs; do for desktop in ${desktops[$arch]}; do diff --git a/build_one.sh b/build_one.sh index ccfda8e..f71e1c1 100755 --- a/build_one.sh +++ b/build_one.sh @@ -1,5 +1,4 @@ #!/bin/sh -./update_media.sh ./update_bootloader_files.sh draklive='perl -I ../drakiso/lib ../drakiso/draklive' if [ $# -gt 0 ] ; then diff --git a/config/build.cfg b/config/build.cfg index a6d5ca4..7cf2dcd 100644 --- a/config/build.cfg +++ b/config/build.cfg @@ -103,7 +103,6 @@ my $_l = { # mageia specific 'mageiawelcome', # nice helper app 'mageia-doc-mcc-en', # some nice docs - 'grub2-mageia-theme', # Gnome specific stuff if_($has_gnome, @@ -138,22 +137,15 @@ my $_l = { # 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 bootloaders, but we need to keep one to satisfy basesystem requirements. + # We will zap it later. The grub2 bootloaders are needed for install, so we + # add them to the local repo, which means they are automatically excluded. + 'grub', # no devel packages on live media - 'glibc-devel', 'gdb', 'gcc', 'gcc3.3', 'dkms', + 'gdb', 'gcc3.3', '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 @@ -189,6 +181,21 @@ my $_l = { if_($has_plasma, 'sddm'), 'gdm', ], + local_repo_packages => [ + # core + 'broadcom-bcma-config', + 'broadcom-ssb-config', + 'dkms', + 'efibootmgr', 'efivar', + 'grub2', 'grub2-efi', 'grub2-mageia-theme', + 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_nr => join(";", "cp /tmp/media/$arch/release-notes.* /mnt", @@ -249,14 +256,6 @@ my $_l = { [ '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_($arch eq 'i586', - [ 'files/mga_rpms/i586/mga_rpms', '/var/local' ], - ), - if_($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 } ], @@ -363,15 +362,11 @@ my $_l = { "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", ), - # add local medias - "urpmi.addmedia -q 'Live Core' /var/local/mga_rpms/core with media_info/hdlist.cz", - "urpmi.addmedia -q '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", + # remove pre-installed lilo, we don't need it + "rpm -e --nodeps lilo", # allow draklive-install to spawn subtasks that access the display "echo 'session optional pam_xauth.so # for draklive-install' >> /etc/pam.d/polkit-1", diff --git a/update_media.sh b/update_media.sh deleted file mode 100755 index f340fde..0000000 --- a/update_media.sh +++ /dev/null @@ -1,90 +0,0 @@ -#!/bin/sh -repository=$(grep repository config/settings.cfg | sed s/repository=//) -echo "Updating files/mga_rpms from $repository" - -cd files/mga_rpms - -copy_latest() -{ - repo=$1 - for arch in i586 x86_64 ; do - if [ $2 = "lib" ] ; then - if [ $arch = "x86_64" ] ; then - name=lib64$3 - else - name=lib$3 - fi - else - name=$2 - fi - if [ $arch = "i586" ] ; then - name=${name/-desktop-/-desktop586-} - fi - path=`ls -1v $repository/$arch/media/$repo/{release,updates}/$name.rpm 2> /dev/null | tail -1` - if [ -z $path ] ; then - echo "Couldn't find $name for $arch" - exit 1 - else - cp $path $arch/mga_rpms/$repo/ - fi - done -} - -# create dirs if non-existant -mkdir -p {i586,x86_64}/mga_rpms/{core,nonfree}/media_info - -# clean dirs -rm -f {i586,x86_64}/mga_rpms/{core,nonfree}/*.rpm -rm -f {i586,x86_64}/mga_rpms/{core,nonfree}/media_info/* - -# add grub2 -copy_latest core grub2-2* -copy_latest core grub2-efi-2* -copy_latest core grub2-mageia-theme-2* -copy_latest core lib efivar0-* -copy_latest core efibootmgr-* -copy_latest core efivar-* - -# add dkms -copy_latest core dkms-2* -copy_latest core binutils-2* -copy_latest core gcc-5* -copy_latest core gcc-cpp-5* -copy_latest core glibc-devel-* -copy_latest core isl-0* -copy_latest core kernel-desktop-devel-4* -copy_latest core kernel-desktop-devel-latest-4* -copy_latest core kernel-userspace-headers-4* -copy_latest core lib isl15-0* -copy_latest core lib mpc3-1* -copy_latest core lib ncurses-devel-* -copy_latest core libstdc++-devel-* -copy_latest core make-4* - -# add nvidia -copy_latest nonfree dkms-nvidia304-* -copy_latest nonfree dkms-nvidia340-* -copy_latest nonfree dkms-nvidia-current-* -copy_latest nonfree x11-driver-video-nvidia304-* -copy_latest nonfree x11-driver-video-nvidia340-* -copy_latest nonfree x11-driver-video-nvidia-current-* - -# add broadcom-wl -copy_latest nonfree dkms-broadcom-wl-* -copy_latest nonfree broadcom-wl-common-* - -# add broadcom wireless configs -copy_latest core broadcom-bcma-config-* -copy_latest core broadcom-ssb-config-* - -# add repo pubkeys -for arch in i586 x86_64 ; do - cp $repository/$arch/media/core/release/media_info/pubkey $arch/mga_rpms/core/media_info/ - cp $repository/$arch/media/nonfree/release/media_info/pubkey $arch/mga_rpms/nonfree/media_info/ -done - -# create hdlists -for arch in i586 x86_64 ; do - genhdlist2 $arch/mga_rpms/core - genhdlist2 $arch/mga_rpms/nonfree -done -- cgit v1.2.1 From c6f1fbe1557b473ff287f24813fd160ade04964f Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sun, 14 Jan 2018 21:53:05 +0000 Subject: No point adding a custom resolv.conf - draklive cleans it. --- config/build.cfg | 3 --- files/resolv.conf | 5 ----- 2 files changed, 8 deletions(-) delete mode 100644 files/resolv.conf diff --git a/config/build.cfg b/config/build.cfg index 7cf2dcd..c0c9cc2 100644 --- a/config/build.cfg +++ b/config/build.cfg @@ -256,9 +256,6 @@ my $_l = { [ '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 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 } ], diff --git a/files/resolv.conf b/files/resolv.conf deleted file mode 100644 index 1941dae..0000000 --- a/files/resolv.conf +++ /dev/null @@ -1,5 +0,0 @@ -# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) -# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN - -nameserver 8.8.8.8 -nameserver 8.8.4.4 -- cgit v1.2.1 From daeb5cc5842cf1b9fb85e8c7972f2923350c5cc7 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Fri, 2 Mar 2018 23:30:01 +0000 Subject: Add support for 32-bit EFI. --- build_all.sh | 2 +- build_one.sh | 9 ++++++++- config/build.cfg | 7 ++++++- update_bootloader_files.sh | 15 +++++++++------ 4 files changed, 24 insertions(+), 9 deletions(-) diff --git a/build_all.sh b/build_all.sh index 2d3d222..078cd04 100755 --- a/build_all.sh +++ b/build_all.sh @@ -10,8 +10,8 @@ desktops[i586]="Xfce" desktops[x86_64]="GNOME Plasma Xfce" -./update_bootloader_files.sh for arch in $archs; do + ./update_bootloader_files.sh $arch for desktop in ${desktops[$arch]}; do sudo -u draklive sudo /usr/sbin/draklive --clean --all --define arch=$arch --define desktop=$desktop sudo -u bcd mkdir -p /home/bcd/public_html/isos/trial-builds/Mageia-${release}-LiveDVD-${desktop}-${arch}-DVD diff --git a/build_one.sh b/build_one.sh index f71e1c1..be6bac9 100755 --- a/build_one.sh +++ b/build_one.sh @@ -1,5 +1,12 @@ #!/bin/sh -./update_bootloader_files.sh +arch=$(grep arch config/settings.cfg | sed s/arch=//) +for arg in $*; do + value=${arg#arch=} + if [ $value != $arg ]; then + arch=$value + fi +done +./update_bootloader_files.sh $arch draklive='perl -I ../drakiso/lib ../drakiso/draklive' if [ $# -gt 0 ] ; then $draklive $* diff --git a/config/build.cfg b/config/build.cfg index c0c9cc2..97373b2 100644 --- a/config/build.cfg +++ b/config/build.cfg @@ -433,7 +433,12 @@ my $_l = { ], mbr_boot_img => 'bootloader/images/boot_hybrid.img', eltorito_img => 'bootloader/images/eltorito.img', - bootx64_efi => 'bootloader/images/bootx64.efi', + if_($arch eq 'i586', + boot_efi => 'bootloader/images/bootia32.efi' + ), + if_($arch eq 'x86_64', + boot_efi => 'bootloader/images/bootx64.efi' + ), }, mount => MGA::DrakISO::Mounts::volatile_squash_union($use_modules), }; diff --git a/update_bootloader_files.sh b/update_bootloader_files.sh index 6cfdd8b..fb66e7b 100755 --- a/update_bootloader_files.sh +++ b/update_bootloader_files.sh @@ -1,18 +1,21 @@ #!/bin/sh repository=$(grep repository config/settings.cfg | sed s/repository=//) -echo "Fetching bootloader files from $repository" +if [ $# -eq 0 ]; then + arch=$(grep arch config/settings.cfg | sed s/arch=//) +else + arch=$1 +fi +echo "Fetching $arch bootloader files from $repository" # Remove old files rm -rf bootloader -# The 64-bit packge contains everything we need. The non-UEFI grub2 images -# are built for i386, and everything else should be architecture-independent -path=`ls -1v $repository/x86_64/media/core/{release,updates}/drakiso-bootloader-files*.rpm 2> /dev/null | tail -1` +path=`ls -1v $repository/$arch/media/core/{release,updates}/drakiso-bootloader-files*.rpm 2> /dev/null | tail -1` if [ -z $path ] ; then - echo "ERROR: couldn't find drakiso-bootloader-files RPM in $repository." + echo "ERROR: couldn't find $arch drakiso-bootloader-files RPM in $repository." exit 1 else - echo "Extracting bootloader files from repository." + echo "Extracting $arch bootloader files from repository." rpm2cpio $path | cpio -idm --quiet if [ $? -ne 0 ] ; then echo "ERROR: failed to extract files from archive." -- cgit v1.2.1 From d73c34d30d805ddd442a7eb076f03d6531988020 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Fri, 2 Mar 2018 23:30:26 +0000 Subject: Include os-prober in local repository. --- config/build.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/build.cfg b/config/build.cfg index 97373b2..1ad2914 100644 --- a/config/build.cfg +++ b/config/build.cfg @@ -187,7 +187,7 @@ my $_l = { 'broadcom-ssb-config', 'dkms', 'efibootmgr', 'efivar', - 'grub2', 'grub2-efi', 'grub2-mageia-theme', + '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 -- cgit v1.2.1 From afb13d1257d5c9aabcdc1ef194f1a05b4f7a00e3 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sat, 3 Mar 2018 15:39:08 +0000 Subject: Update build scripts for rename of draklive to draklive2. --- build_all.sh | 4 ++-- build_one.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build_all.sh b/build_all.sh index 078cd04..fd271d7 100755 --- a/build_all.sh +++ b/build_all.sh @@ -13,10 +13,10 @@ desktops[x86_64]="GNOME Plasma Xfce" for arch in $archs; do ./update_bootloader_files.sh $arch for desktop in ${desktops[$arch]}; do - sudo -u draklive sudo /usr/sbin/draklive --clean --all --define arch=$arch --define desktop=$desktop + sudo -u draklive sudo /usr/bin/draklive2 --clean --all --define arch=$arch --define desktop=$desktop sudo -u bcd mkdir -p /home/bcd/public_html/isos/trial-builds/Mageia-${release}-LiveDVD-${desktop}-${arch}-DVD sudo -u bcd cp /home/draklive/var-data/build/Mageia-${release}-LiveDVD-${desktop}-${arch}-DVD/dist/* /home/bcd/public_html/isos/trial-builds/Mageia-${release}-LiveDVD-${desktop}-${arch}-DVD # not enough space on rabbit's RAM disk for all four variants, so delete as we go - sudo -u draklive sudo /usr/sbin/draklive --clean --define arch=$arch --define desktop=$desktop + sudo -u draklive sudo /usr/bin/draklive2 --clean --define arch=$arch --define desktop=$desktop done done diff --git a/build_one.sh b/build_one.sh index be6bac9..f8ba515 100755 --- a/build_one.sh +++ b/build_one.sh @@ -7,7 +7,7 @@ for arg in $*; do fi done ./update_bootloader_files.sh $arch -draklive='perl -I ../drakiso/lib ../drakiso/draklive' +draklive='perl -I ../drakiso/lib ../drakiso/draklive2' if [ $# -gt 0 ] ; then $draklive $* else -- cgit v1.2.1 From dc16c1eb290c8642614f25d09972ad0a546123bc Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sun, 4 Mar 2018 20:06:20 +0000 Subject: Remove obsolete package selections, fixes, and workarounds. --- config/build.cfg | 110 +++------------------- files/compute-i18n-list.pl | 88 ----------------- files/compute-ooo-dicts.pl | 55 ----------- files/defaultspooler | 1 - files/draklive-install.d/run.d/gdm-permissions.sh | 5 - files/draksnapshot.sysconfig | 1 - files/kbluetoothrc | 5 - files/live.modprobe | 1 - 8 files changed, 12 insertions(+), 254 deletions(-) delete mode 100755 files/compute-i18n-list.pl delete mode 100755 files/compute-ooo-dicts.pl delete mode 100644 files/defaultspooler delete mode 100755 files/draklive-install.d/run.d/gdm-permissions.sh delete mode 100644 files/draksnapshot.sysconfig delete mode 100644 files/kbluetoothrc delete mode 100644 files/live.modprobe diff --git a/config/build.cfg b/config/build.cfg index 1ad2914..8163948 100644 --- a/config/build.cfg +++ b/config/build.cfg @@ -14,10 +14,6 @@ my $has_lxde = member('LXDE', @desktops); my $has_plasma = member('Plasma', @desktops); my $has_xfce = member('Xfce', @desktops); -my $distro_theme = 'Default'; -my $distro_release = 'Default'; -my $distro_config = lc($distro_release); - my $use_modules = to_bool($build->{settings}{pack}); my @user_config_dirs = ('/etc/skel', if_($default_user, '/home/' . $default_user)); @@ -56,7 +52,6 @@ my $_l = { 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 @@ -72,48 +67,31 @@ my $_l = { compssListLevel => 5, include_packages => [ - if_($has_lxde, "mageia-lxde-config-$distro_release"), - - # i586 arch specific - if_($arch eq 'i586', - 'vboxadditions-kernel-desktop586-latest', - ), - - # x86_64 arch specific - if_($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', + if_($has_lxde, "mageia-lxde-config-Default"), # 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 + 'mc', 'btrfs-progs', 'hdparm', 'patch', + 'bind-utils', 'mdadm', 'dmraid', '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', + 'task-gnome', + 'gparted', # provides some options not currently supported in diskdrake + 'hexchat', # alternative IRC client 'adwaita-gtk2-theme', ), # Plasma specific stuff if_($has_plasma, - 'task-plasma5', 'sddm', # sometimes gets nuked during build + 'task-plasma5', ), # Xfce specific stuff @@ -126,12 +104,6 @@ my $_l = { # i586 arch specific if_($arch eq 'i586', '/^kernel-desktop-/', '/^vboxadditions-kernel-.*-desktop-/', - '/^libatlas3-/', - ), - - # x86_64 arch specific - if_($arch eq 'x86_64', - '/^lib64atlas3-/', ), # no server kernels @@ -142,27 +114,10 @@ my $_l = { # add them to the local repo, which means they are automatically excluded. 'grub', - # no devel packages on live media - 'gdb', 'gcc3.3', - 'empathy', 'gnome-builder', # pulls devel stuff - - # 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', + 'efax', # not wanted - 'al-anvar', # (mga #9752) - 'openssh-server', 'manatools-gui', #- no distribution license @@ -170,10 +125,8 @@ my $_l = { # Gnome specific stuff if_($has_gnome, - 'beagle', 'inkscape', - 'bluedevil', #- bluez-pin provide - 'pinentry-qt4', #- qt4 app - '/noatun/', #- prefer amarok + 'gnome-builder', + 'inkscape', # ??? 'polkit-kde-agent-1', ), ], @@ -197,19 +150,12 @@ my $_l = { 'dkms-nvidia-current', 'x11-driver-video-nvidia-current', ], - post_install_nr => join(";", - "cp /tmp/media/$arch/release-notes.* /mnt", - "chmod 0644 /mnt/release-notes.*", - ), 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", - - #- FIXME: in any::set_autologin, unlink if gdm/sddm conf file and binary exist - if_($has_xfce || $has_lxde, "rm -f /etc/sysconfig/autologin"), ), langs_always => [ 'en_US' ], @@ -231,7 +177,8 @@ my $_l = { # uncommon hardware qw(bpalogin capi4linux cpqarrayd mdadm oki4daemon pcscd), # unneeded software - qw(chronyd ntpd snmpd), + qw(chronyd snmpd), + if_($has_gnome, qw(ntpd)), # slows down basic usage and install, reenabled after install qw(crond msec), ], @@ -259,16 +206,10 @@ my $_l = { # 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 } ], - #- 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 } ], @@ -281,11 +222,6 @@ my $_l = { # 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_($has_gnome, - [ 'files/draklive-install.d/run.d/gdm-permissions.sh', '/etc/draklive-install.d/run.d/gdm-permissions.sh', { mode => 755 } ] - ), - 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 } ], [ 'files/draklive-install.d/remove.d/clear-sddm-state', '/etc/draklive-install.d/remove.d/clear-sddm-state', { mode => 0644 } ], @@ -296,14 +232,8 @@ my $_l = { [ '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 } ], - #- 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)), @@ -329,13 +259,6 @@ my $_l = { "chown -R $default_user.$default_user /home/$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_($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", @@ -362,9 +285,6 @@ my $_l = { # disable HPLIP systray startup "echo 'Hidden=true' >> /etc/xdg/autostart/hplip-systray.desktop", - # remove pre-installed lilo, we don't need it - "rpm -e --nodeps lilo", - # allow draklive-install to spawn subtasks that access the display "echo 'session optional pam_xauth.so # for draklive-install' >> /etc/pam.d/polkit-1", @@ -380,9 +300,6 @@ my $_l = { # 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", ), vga_mode => 788, @@ -392,9 +309,6 @@ my $_l = { 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 => [ diff --git a/files/compute-i18n-list.pl b/files/compute-i18n-list.pl deleted file mode 100755 index 914585b..0000000 --- a/files/compute-i18n-list.pl +++ /dev/null @@ -1,88 +0,0 @@ -#!/usr/bin/perl - -use MDK::Common; -use Getopt::Long; -use lib qw(/usr/lib/libDrakX); -use run_program; - -# alleged i18n packages for french (useful to spot missing requires on locales-fr) -# rpm -qa \*-fr\* --qf '%{name}\n' | perl -n -e '/^(.*)-fr(_.+)?$/ and print "$1\n"' | sort -u -# my @packages = ( -# aspell -# kde-i18n -# locales -# mozilla-firefox -# myspell -# myspell-hyph -# openoffice.org-l10n -# ); - -my ($prefix, $ooo_version); -GetOptions( - "prefix=s" => \$prefix, - "ooo=s" => \$ooo_version, -); - -my @misowned_dirs = qw( -/usr/lib/ooo-${ooo_version} -/usr/lib/ooo-${ooo_version}/help -/usr/share/apps -/usr/share/apps/khangman -/usr/share/apps/khangman/data -/usr/share/apps/ktuberling -/usr/share/apps/ktuberling/sounds -/usr/share/doc/HTML -/usr/share/locale -); - -my @dirs = qw( -/usr/share/man -/usr/share/doc/HTML -); - -my @files = qw( -/usr/lib/ooo-${ooo_version}/share/dict/$L.* -/usr/lib/ooo-${ooo_version}/share/dict/$L_comb.* -/usr/lib/ooo-${ooo_version}/share/dict/hyph_$L.* -/usr/lib/ooo-${ooo_version}/share/dict/th_$L.* -/usr/lib/ooo-${ooo_version}/share/dict/th_$L_v2.* -); - -my %per_locale_files = ( - zh => [ - #- disables anti-aliasing by default - '/etc/fonts/conf.d/99-ttf-arphic-uming-bitmaps.conf' - ], -); - -my @locale_packages = run_program::rooted_get_stdout($prefix, 'rpm', '-qa', 'locales-*', '--qf', '%{name}\n'); -my @locales = sort(map { s/^locales-//; chomp; $_ } @locale_packages); - -sub expand_files { - my ($p, $o_lang) = @_; - $p =~ s/\$L/$o_lang/ if $o_lang; - map { s/^$prefix//; $_ } grep { -e $_ } glob($prefix . $p); -} - -foreach my $l (@locales) { - my @list; - my $locale_pkg = "locales-$l"; - #my $l_pattern = qr/^$l([_.@].+)?$/; - #my @l_packages = map { ("$_-$l", "$_-${l}_*") } @packages; - my @l_packages = chomp_(run_program::rooted_get_stdout($prefix, 'rpm', '-q', '--qf', '%{name}\n', '--whatrequires', $locale_pkg)); - unshift @l_packages, $locale_pkg; - my @list = chomp_(run_program::rooted_get_stdout($prefix, 'rpm', '-ql', @l_packages)); - my @all_locales = map { m!^/usr/share/locale/([^/]+)$! } chomp_(run_program::rooted_get_stdout($prefix, 'rpm', '-ql', $locale_pkg)); - # skip misowned directories such as /usr/share/locale - @list = grep { ! -d $prefix . $_ || member(basename($_), @all_locales) } @list; - #@list = difference2(\@list, \@misowned_dirs); - foreach my $l2 (@all_locales) { - foreach my $d (@dirs) { - my $l_d = $d . '/' . $l2; - push @list, $l_d if -e $prefix . $l_d; - } - push @list, expand_files($_, $l2) foreach @files; - } - push @list, expand_files($_) foreach @{$per_locale_files{$l} || []}; - output_p($prefix . "/root/drakx/i18n-$l.lst", map { "$_\n" } sort(@list)); -} diff --git a/files/compute-ooo-dicts.pl b/files/compute-ooo-dicts.pl deleted file mode 100755 index d9968c5..0000000 --- a/files/compute-ooo-dicts.pl +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/perl - -use MDK::Common; -use Getopt::Long; -use lib qw(/usr/lib/libDrakX); -use run_program; - -my $prefix; -my $check_locale; -GetOptions( - "prefix=s" => \$prefix, - "check-locale" => \$check_locale, -); -my $dictd = $ARGV[0] or die "syntax: $0 [--check-locale] [--prefix ] "; - -my $dictf = "dictionary.lst"; -my $dicts = "dictionary.src"; -my $dictu = "dictionary.unused"; - -my @dictl; -my @unused; - -my @available_langs = map { - /^locales-(\S+)/ ? $1 : (); -} chomp_(run_program::rooted_get_stdout($prefix, 'rpm', '-qa', '--provides', 'locales-*')); - -sub add_dict { - my ($type, $name, $file, $add) = @_; - my ($lang, $country) = $name =~ /^([^_]+)_([^_]+)/; - my ($root_name) = $file =~ /^(.*)\.(.*?)$/; - if (!$check_locale || member($lang, @available_langs)) { - push @dictl, [ $type, $lang, $country, $root_name ] if $add; - } else { - push @unused, "$dictd/$file"; - } -} - -rename("$prefix$dictd/$dictf", "$prefix$dictd/$dicts") if ! -e "$prefix$dictd/$dicts"; -foreach (all("$prefix/$dictd")) { - if (/^hyph_(.+)\.(.*?)$/) { - add_dict('HYPH', $1, $_, $2 eq 'dic'); - } elsif (/^th_(.+)\.(.*?)$/) { - add_dict('THES', $1, $_, $2 eq 'idx'); - } elsif (/^(.+_.+)\.(.*?)$/) { - add_dict('DICT', $1, $_, $2 eq 'dic'); - } -} - -output_p("$prefix$dictd/$dictf", - join('', grep { /^#/ } cat_("$prefix$dictd/$dicts")), - "\n", - map { join(' ', @$_) . "\n" } @dictl, - ); - -output_p("$prefix$dictd/$dictu", map { "$_\n" } @unused); diff --git a/files/defaultspooler b/files/defaultspooler deleted file mode 100644 index 462d36c..0000000 --- a/files/defaultspooler +++ /dev/null @@ -1 +0,0 @@ -cups diff --git a/files/draklive-install.d/run.d/gdm-permissions.sh b/files/draklive-install.d/run.d/gdm-permissions.sh deleted file mode 100755 index 62d37d1..0000000 --- a/files/draklive-install.d/run.d/gdm-permissions.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -if [ -d "/var/lib/gdm" ]; then - /usr/bin/chown -R gdm:gdm /var/lib/gdm -fi diff --git a/files/draksnapshot.sysconfig b/files/draksnapshot.sysconfig deleted file mode 100644 index cca41e8..0000000 --- a/files/draksnapshot.sysconfig +++ /dev/null @@ -1 +0,0 @@ -AUTOSTART=FALSE diff --git a/files/kbluetoothrc b/files/kbluetoothrc deleted file mode 100644 index 2680caa..0000000 --- a/files/kbluetoothrc +++ /dev/null @@ -1,5 +0,0 @@ -[General] -AutoStart=false - -[Notification Messages] -kbluepinLocInfo-usr-lib-kdebluetooth=false diff --git a/files/live.modprobe b/files/live.modprobe deleted file mode 100644 index 5bb2345..0000000 --- a/files/live.modprobe +++ /dev/null @@ -1 +0,0 @@ -install usblp /bin/true -- cgit v1.2.1 From 5d9e6b07bbb7de9fbb706cea05dbdaeff148dd45 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sun, 4 Mar 2018 22:41:28 +0000 Subject: Rationalise and better document the configuration. --- config/build.cfg | 212 +++++++++++++++++++-------------------- files/blacklist-ide.conf | 2 + files/blacklist_ide.conf | 2 - files/dracut-live.conf | 16 +++ files/empty.conf | 0 files/live-dracut.conf | 16 --- files/live.51-mageia-resume.conf | 0 files/live.modprobe.conf | 0 8 files changed, 123 insertions(+), 125 deletions(-) create mode 100644 files/blacklist-ide.conf delete mode 100644 files/blacklist_ide.conf create mode 100644 files/dracut-live.conf create mode 100644 files/empty.conf delete mode 100644 files/live-dracut.conf delete mode 100644 files/live.51-mageia-resume.conf delete mode 100644 files/live.modprobe.conf diff --git a/config/build.cfg b/config/build.cfg index 8163948..a00ab83 100644 --- a/config/build.cfg +++ b/config/build.cfg @@ -15,7 +15,7 @@ my $has_plasma = member('Plasma', @desktops); my $has_xfce = member('Xfce', @desktops); my $use_modules = to_bool($build->{settings}{pack}); -my @user_config_dirs = ('/etc/skel', if_($default_user, '/home/' . $default_user)); +my @user_config_dirs = ('/etc/skel', '/home/' . $default_user); sub build_label { my ($build) = @_; @@ -58,6 +58,7 @@ my $_l = { 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)), @@ -67,72 +68,74 @@ my $_l = { compssListLevel => 5, include_packages => [ - if_($has_lxde, "mageia-lxde-config-Default"), + # Satisfy the basesystem bootloader requirement. + 'drakiso-null-bootloader', - # utils wanted - 'mc', 'btrfs-progs', 'hdparm', 'patch', - 'bind-utils', 'mdadm', 'dmraid', - '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 + # Some extra admin tools. + 'bind-utils', 'btrfs-progs', 'dmraid', 'gparted', 'hdparm', + 'manatools', 'mc', 'mdadm', 'vim-enhanced', - # mageia specific - 'mageia-doc-mcc-en', # some nice docs + # Mageia docs. + 'mageia-doc-mcc-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', - # Gnome specific stuff if_($has_gnome, 'task-gnome', - 'gparted', # provides some options not currently supported in diskdrake - 'hexchat', # alternative IRC client - 'adwaita-gtk2-theme', + 'adwaita-gtk2-theme', # Temporary fix for mga#20868. + 'hexchat', # Alternative IRC client. + ), + + if_($has_lxde, + 'mageia-lxde-config-Default' ), - # Plasma specific stuff if_($has_plasma, 'task-plasma5', ), - # Xfce specific stuff if_($has_xfce, 'task-xfce4', - 'gparted', # provides some options not currently supported in diskdrake ), ], exclude_packages => [ - # i586 arch specific if_($arch eq 'i586', + # We want the desktop586 kernel for maximum hardware compatibility. '/^kernel-desktop-/', '/^vboxadditions-kernel-.*-desktop-/', ), - # no server kernels + # No server kernels. '/^kernel-server-/', '/^vboxadditions-kernel-.*-server-/', - # No bootloaders, but we need to keep one to satisfy basesystem requirements. - # We will zap it later. The grub2 bootloaders are needed for install, so we - # add them to the local repo, which means they are automatically excluded. - 'grub', + # 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', - # old stuff + # Unwanted stuff. 'efax', - # not wanted + # Not yet ready. 'manatools-gui', - #- no distribution license - 'flash-player-plugin', - - # Gnome specific stuff if_($has_gnome, 'gnome-builder', - 'inkscape', # ??? + 'inkscape', 'polkit-kde-agent-1', ), ], preferred_packages => [ + if_($has_gnome, 'gdm'), if_($has_plasma, 'sddm'), - 'gdm', ], local_repo_packages => [ # core @@ -143,6 +146,7 @@ my $_l = { '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', @@ -151,89 +155,85 @@ my $_l = { ], post_install => join(";", - # systemd boots by default to multiuser.target (old init 3), so change to graphical (old init 5) + # 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 + # Have inittab match systemd defaulting to init 5. "perl -pi -e 's/^id:3:initdefault:/id:5:initdefault:/' /etc/inittab", ), langs_always => [ 'en_US' ], -# additional_media => [ -# { -# name => '', -# path => '', -# packages => [ -# ], -# }, -# ), -# ], -# rpms => [ -# ], -# erase_rpms => [ -# ], disable_services => [ - # uncommon hardware + # Uncommon hardware. qw(bpalogin capi4linux cpqarrayd mdadm oki4daemon pcscd), - # unneeded software + # Unneeded software. qw(chronyd snmpd), if_($has_gnome, qw(ntpd)), - # slows down basic usage and install, reenabled after install + # Slows down basic usage and install, reenabled after install. qw(crond msec), ], disable_timers => [ ], files => [ - 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 } ], + # Clean configuration files. + [ 'files/empty.conf', '/etc/dracut.conf.d/51-mageia-resume.conf', { mode => 0644 } ], + [ 'files/empty.conf', '/etc/modprobe.conf', { 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 + # 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 } ], + # Blacklist pata_acpi (mga#3395). + [ '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 } ], + # Live media specific initrd. + [ 'files/dracut-live.conf', '/etc/dracut.conf.d/60-live.conf', { mode => 0644, no_install => 1 } ], - # disable suspend and hibernate in live mode + # 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 eject medium before halt/reboot + # 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 } ], - # 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 } ], + # 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 } ], - #- enable drakx-finish-install at live boot - [ "files/finish-install", '/etc/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 + # 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 } ], - ), - #- sysconfig files for first boot - [ '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 } ], + # Disable Korganiser autostart. + [ 'files/korgacrc', '/etc/kde/korgacrc', { mode => 0644 } ], + ), - [ 'files/korgacrc', '/etc/kde/korgacrc', { mode => 0644 } ], - (map { [ 'files/mgaonlinerc', $_ . '/.MgaOnline/mgaonline', { mode => 0644, no_install => 1 } ] } @user_config_dirs), ], remove_files => [ (map { "/etc/modprobe.preload.d/$_" } qw(cpufreq pcmcia rfswitch)), @@ -244,30 +244,15 @@ my $_l = { patches => [ ], final_fixes => join(';', - if_($default_user, - "echo $default_user > /etc/draklive-install.d/user", - "perl -pi -e 's,,$default_user,' /etc/draklive-install.d/sysconfig/finish-install", - ), - if_($has_xfce && $default_user, - # 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", - ), - - #- fix user perms for copied files - if_($default_user, - "chown -R $default_user.$default_user /home/$default_user" - ), - if_($has_gnome, - # modify and compile schema to get draklive-install and Firefox in menu + # 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 + # Fix permissions to enable GDM to rerun if the user logs out. "chown -R gdm:gdm /var/lib/gdm", - # switch to NetworkManager + # Switch to NetworkManager. "systemctl -q disable network", "systemctl -q disable network-up", "systemctl -q enable NetworkManager.service", @@ -275,6 +260,7 @@ my $_l = { "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", @@ -282,22 +268,35 @@ my $_l = { "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", ), - # disable HPLIP systray startup - "echo 'Hidden=true' >> /etc/xdg/autostart/hplip-systray.desktop", + 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", + ), + + # Fix permissions for copied files. + "chown -R $default_user.$default_user /home/$default_user", - # allow draklive-install to spawn subtasks that access the display + # Set default user name for draklive-install. + "echo $default_user > /etc/draklive-install.d/user", + "perl -pi -e 's,,$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 + # 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) + # (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 + # Now update the cache for the new timestamps. "fc-cache -rf", - # set the initial wireless regulatory domain to "world", enabling + # 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", ), @@ -316,7 +315,6 @@ my $_l = { ]), }, regions => { - #- the "all" region has a magical behavior and selects all langs int => [qw(en)], }, packs => { diff --git a/files/blacklist-ide.conf b/files/blacklist-ide.conf new file mode 100644 index 0000000..146e357 --- /dev/null +++ b/files/blacklist-ide.conf @@ -0,0 +1,2 @@ +# temp fix for 3395 +blacklist pata_acpi diff --git a/files/blacklist_ide.conf b/files/blacklist_ide.conf deleted file mode 100644 index 146e357..0000000 --- a/files/blacklist_ide.conf +++ /dev/null @@ -1,2 +0,0 @@ -# temp fix for 3395 -blacklist pata_acpi diff --git a/files/dracut-live.conf b/files/dracut-live.conf new file mode 100644 index 0000000..42b3e24 --- /dev/null +++ b/files/dracut-live.conf @@ -0,0 +1,16 @@ +# it is a live, build initrd to boot any hardware +hostonly="no" +# load mga livecd support +add_dracutmodules+=" mgalive " +# block some dracut modules we dont want / use +omit_dracutmodules+=" caps crypt dm dmraid mdraid lvm nfs i18n resume modsign " +# compress initrd with xz +compress_l="xz" +# whitelist only the filesystems needed by live CDs and live USB +filesystems="iso9660 vfat =fs/nls squashfs overlay" +# ensure drm drivers are available early in the boot sequence +add_drivers+=" amdgpu radeon nouveau i915 vboxvideo " +# fibre channel & iSCSI modules are unneeded on live CD/USB and pull 1MB+ of firmware files +omit_drivers+=" qla1280 qla2xxx qla4xxx " +# pata_acpi is not wanted on boot +omit_drivers+=" pata_acpi " diff --git a/files/empty.conf b/files/empty.conf new file mode 100644 index 0000000..e69de29 diff --git a/files/live-dracut.conf b/files/live-dracut.conf deleted file mode 100644 index 42b3e24..0000000 --- a/files/live-dracut.conf +++ /dev/null @@ -1,16 +0,0 @@ -# it is a live, build initrd to boot any hardware -hostonly="no" -# load mga livecd support -add_dracutmodules+=" mgalive " -# block some dracut modules we dont want / use -omit_dracutmodules+=" caps crypt dm dmraid mdraid lvm nfs i18n resume modsign " -# compress initrd with xz -compress_l="xz" -# whitelist only the filesystems needed by live CDs and live USB -filesystems="iso9660 vfat =fs/nls squashfs overlay" -# ensure drm drivers are available early in the boot sequence -add_drivers+=" amdgpu radeon nouveau i915 vboxvideo " -# fibre channel & iSCSI modules are unneeded on live CD/USB and pull 1MB+ of firmware files -omit_drivers+=" qla1280 qla2xxx qla4xxx " -# pata_acpi is not wanted on boot -omit_drivers+=" pata_acpi " diff --git a/files/live.51-mageia-resume.conf b/files/live.51-mageia-resume.conf deleted file mode 100644 index e69de29..0000000 diff --git a/files/live.modprobe.conf b/files/live.modprobe.conf deleted file mode 100644 index e69de29..0000000 -- cgit v1.2.1 From 11dc6c20bc6c2f650eff0fd7654f674376e3ee50 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Mon, 5 Mar 2018 23:32:20 +0000 Subject: Use default_user setting in drakx-finish-install after live install. --- config/build.cfg | 2 +- files/draklive-install.d/finish-install | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/build.cfg b/config/build.cfg index a00ab83..1500e0a 100644 --- a/config/build.cfg +++ b/config/build.cfg @@ -279,7 +279,7 @@ my $_l = { # Set default user name for draklive-install. "echo $default_user > /etc/draklive-install.d/user", - "perl -pi -e 's,,$default_user,' /etc/draklive-install.d/sysconfig/finish-install", + "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", diff --git a/files/draklive-install.d/finish-install b/files/draklive-install.d/finish-install index ba93dd9..28fe550 100644 --- a/files/draklive-install.d/finish-install +++ b/files/draklive-install.d/finish-install @@ -8,6 +8,6 @@ NETWORK=yes URPMI=yes AUTHENTICATION=no USERS=with_root -USER_RENAME_FROM=live +USER_RENAME_FROM=DEFAULT_USER USER_AUTOLOGIN_FIRST=no GLX=no -- cgit v1.2.1 From f47d6bd65f315c5e951b2324110c7e71409eabb3 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sun, 11 Mar 2018 11:54:07 +0000 Subject: Get both arch's when updating bootloader files. --- build_all.sh | 2 +- build_one.sh | 9 +-------- update_bootloader_files.sh | 33 ++++++++++++++++----------------- 3 files changed, 18 insertions(+), 26 deletions(-) diff --git a/build_all.sh b/build_all.sh index fd271d7..9a7c3f1 100755 --- a/build_all.sh +++ b/build_all.sh @@ -10,8 +10,8 @@ desktops[i586]="Xfce" desktops[x86_64]="GNOME Plasma Xfce" +./update_bootloader_files.sh for arch in $archs; do - ./update_bootloader_files.sh $arch for desktop in ${desktops[$arch]}; do sudo -u draklive sudo /usr/bin/draklive2 --clean --all --define arch=$arch --define desktop=$desktop sudo -u bcd mkdir -p /home/bcd/public_html/isos/trial-builds/Mageia-${release}-LiveDVD-${desktop}-${arch}-DVD diff --git a/build_one.sh b/build_one.sh index f8ba515..705888f 100755 --- a/build_one.sh +++ b/build_one.sh @@ -1,12 +1,5 @@ #!/bin/sh -arch=$(grep arch config/settings.cfg | sed s/arch=//) -for arg in $*; do - value=${arg#arch=} - if [ $value != $arg ]; then - arch=$value - fi -done -./update_bootloader_files.sh $arch +./update_bootloader_files.sh draklive='perl -I ../drakiso/lib ../drakiso/draklive2' if [ $# -gt 0 ] ; then $draklive $* diff --git a/update_bootloader_files.sh b/update_bootloader_files.sh index fb66e7b..4e7b2e8 100755 --- a/update_bootloader_files.sh +++ b/update_bootloader_files.sh @@ -1,26 +1,25 @@ #!/bin/sh repository=$(grep repository config/settings.cfg | sed s/repository=//) -if [ $# -eq 0 ]; then - arch=$(grep arch config/settings.cfg | sed s/arch=//) -else - arch=$1 -fi -echo "Fetching $arch bootloader files from $repository" +echo "Fetching bootloader files from $repository" # Remove old files rm -rf bootloader +mkdir bootloader -path=`ls -1v $repository/$arch/media/core/{release,updates}/drakiso-bootloader-files*.rpm 2> /dev/null | tail -1` -if [ -z $path ] ; then - echo "ERROR: couldn't find $arch drakiso-bootloader-files RPM in $repository." - exit 1 -else - echo "Extracting $arch bootloader files from repository." - rpm2cpio $path | cpio -idm --quiet - if [ $? -ne 0 ] ; then - echo "ERROR: failed to extract files from archive." +archs="i586 x86_64" +for arch in $archs; do + path=`ls -1v $repository/$arch/media/core/{release,updates}/drakiso-bootloader-files*.rpm 2> /dev/null | tail -1` + if [ -z $path ] ; then + echo "ERROR: couldn't find $arch drakiso-bootloader-files RPM in $repository." exit 1 + else + echo "Extracting $arch bootloader files from repository." + rpm2cpio $path | cpio -idm --quiet + if [ $? -ne 0 ] ; then + echo "ERROR: failed to extract files from archive." + exit 1 + fi fi - mv usr/share/drakiso-bootloader bootloader + cp -ru usr/share/drakiso-bootloader/* bootloader rm -r usr -fi +done -- cgit v1.2.1 From 704676b297f1132e7812790901c31a034be1bca6 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sat, 17 Mar 2018 13:30:16 +0000 Subject: Update for drakiso mixed 32/64 bit EFI support. --- config/build.cfg | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/config/build.cfg b/config/build.cfg index 1500e0a..da7ef56 100644 --- a/config/build.cfg +++ b/config/build.cfg @@ -346,10 +346,12 @@ my $_l = { mbr_boot_img => 'bootloader/images/boot_hybrid.img', eltorito_img => 'bootloader/images/eltorito.img', if_($arch eq 'i586', - boot_efi => 'bootloader/images/bootia32.efi' + efi_type => '32bit', + boot32_efi => 'bootloader/images/bootia32.efi' ), if_($arch eq 'x86_64', - boot_efi => 'bootloader/images/bootx64.efi' + efi_type => '64bit', + boot64_efi => 'bootloader/images/bootx64.efi' ), }, mount => MGA::DrakISO::Mounts::volatile_squash_union($use_modules), -- cgit v1.2.1 From f73c6d7f081fb92fbc161e7ca9fdfd62f0665481 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Wed, 23 May 2018 20:54:06 +0100 Subject: Update to match changes to drakiso. --- config/build.cfg | 43 +++++++++++++------------------------------ update_bootloader_files.sh | 2 +- 2 files changed, 14 insertions(+), 31 deletions(-) diff --git a/config/build.cfg b/config/build.cfg index da7ef56..4178d87 100644 --- a/config/build.cfg +++ b/config/build.cfg @@ -1,7 +1,3 @@ -#!/usr/bin/perl -cw - -use MDK::Common; - my $distro = $build->{settings}{distro}; my $version = $build->{settings}{version}; my $product = $build->{settings}{product}; @@ -14,7 +10,6 @@ my $has_lxde = member('LXDE', @desktops); my $has_plasma = member('Plasma', @desktops); my $has_xfce = member('Xfce', @desktops); -my $use_modules = to_bool($build->{settings}{pack}); my @user_config_dirs = ('/etc/skel', '/home/' . $default_user); sub build_label { @@ -31,7 +26,7 @@ sub build_title { 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 = { +my $config = { system => { enabled_media => [ 'Core Release', @@ -65,7 +60,7 @@ my $_l = { if_($has_xfce, qw(XFCE)), )) ], - compssListLevel => 5, + rpmsrate_level => 5, include_packages => [ # Satisfy the basesystem bootloader requirement. @@ -154,6 +149,8 @@ my $_l = { '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", @@ -162,8 +159,6 @@ my $_l = { "perl -pi -e 's/^id:3:initdefault:/id:5:initdefault:/' /etc/inittab", ), - langs_always => [ 'en_US' ], - disable_services => [ # Uncommon hardware. qw(bpalogin capi4linux cpqarrayd mdadm oki4daemon pcscd), @@ -304,35 +299,19 @@ my $_l = { vga_mode => 788, }, loopbacks => { - exclude => { - type => 'squashfs', - files => [ - { path => '/root/drakx' }, - ], - }, - if_($use_modules, modules => [ - { type => 'squashfs', source => '/root/drakx/i18n-*.lst', rooted => 1 }, - ]), + exclude => [ + { path => '/root/drakx' }, + ], }, regions => { int => [qw(en)], }, - packs => { - int => [ map { "i18n-$_" } qw(en) ], - }, - copy_from_repo => [ - 'autorun.inf' => 'files/autorun.inf', - 'dosutils' => 'files/dosutils', - 'isolinux/memtest' => "boot/memtest", - ], media => { - storage => 'iso', label => build_label($build), bootloader_title => build_title($build), bootloader_theme => 'bootloader/maggy', bootloader_font => 'bootloader/unicode.pf2', bootloader_langs => 'bootloader/lang-names.txt', - bootloader_kbds => 'bootloader/kbd-names.txt', bootloader_messages => 'bootloader/messages', bootloader_default => 0, bootloader_timeout => 10, @@ -341,7 +320,7 @@ my $_l = { ' + 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 => '' }, + 'Memory Test' => { command => 'linux16', image => '/boot/memtest', initrd => 'none' }, ], mbr_boot_img => 'bootloader/images/boot_hybrid.img', eltorito_img => 'bootloader/images/eltorito.img', @@ -353,6 +332,10 @@ my $_l = { efi_type => '64bit', boot64_efi => 'bootloader/images/bootx64.efi' ), + copy_from_repo => [ + 'autorun.inf' => 'files/autorun.inf', + 'dosutils' => 'files/dosutils', + 'isolinux/memtest' => "boot/memtest", + ], }, - mount => MGA::DrakISO::Mounts::volatile_squash_union($use_modules), }; diff --git a/update_bootloader_files.sh b/update_bootloader_files.sh index 4e7b2e8..7655012 100755 --- a/update_bootloader_files.sh +++ b/update_bootloader_files.sh @@ -20,6 +20,6 @@ for arch in $archs; do exit 1 fi fi - cp -ru usr/share/drakiso-bootloader/* bootloader + cp -ru usr/share/drakiso/bootloader/* bootloader rm -r usr done -- cgit v1.2.1 From 3d693cd0b547bd67e238bed901d8beae444503bb Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Wed, 23 May 2018 21:12:44 +0100 Subject: Use installed draklive2 binary in build script. --- build_one.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/build_one.sh b/build_one.sh index 705888f..161030e 100755 --- a/build_one.sh +++ b/build_one.sh @@ -1,8 +1,7 @@ #!/bin/sh ./update_bootloader_files.sh -draklive='perl -I ../drakiso/lib ../drakiso/draklive2' if [ $# -gt 0 ] ; then - $draklive $* + draklive2 $* else - $draklive --clean --all + draklive2 --clean --all fi -- cgit v1.2.1 From 43554ecf072ba1b25a1ae98d6d7107fb59e88ae8 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sat, 25 Aug 2018 20:08:32 +0100 Subject: Add draklive installer manual. --- config/build.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/build.cfg b/config/build.cfg index 4178d87..768ef6a 100644 --- a/config/build.cfg +++ b/config/build.cfg @@ -71,7 +71,7 @@ my $config = { 'manatools', 'mc', 'mdadm', 'vim-enhanced', # Mageia docs. - 'mageia-doc-mcc-en', + 'mageia-doc-mcc-en', 'mageia-doc-draklive-en', # Allow patching during customisation. 'patch', -- cgit v1.2.1 From e496b117be7b8e96acffdee409c8897a3cd03837 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sat, 25 Aug 2018 20:08:58 +0100 Subject: task-xfce4 is now task-xfce. --- config/build.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/build.cfg b/config/build.cfg index 768ef6a..41f60c0 100644 --- a/config/build.cfg +++ b/config/build.cfg @@ -97,7 +97,7 @@ my $config = { ), if_($has_xfce, - 'task-xfce4', + 'task-xfce', ), ], exclude_packages => [ -- cgit v1.2.1 From f3209552968767f1f96b708cef1c09510ba1824a Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Tue, 23 Oct 2018 21:41:33 +0100 Subject: Enable booting from kernel in persistent overlay. --- config/build.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/config/build.cfg b/config/build.cfg index 41f60c0..f330ddc 100644 --- a/config/build.cfg +++ b/config/build.cfg @@ -308,6 +308,7 @@ my $config = { }, media => { label => build_label($build), + overlay_label => 'mgalive-persist', bootloader_title => build_title($build), bootloader_theme => 'bootloader/maggy', bootloader_font => 'bootloader/unicode.pf2', -- cgit v1.2.1 From 4f9bd74bfae216130fb36f25b1113971f47d52ef Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Tue, 23 Oct 2018 21:42:24 +0100 Subject: Remove halt-local service - it doesn't work. --- config/build.cfg | 4 ---- files/halt-local.service | 23 ----------------------- files/halt.local | 24 ------------------------ 3 files changed, 51 deletions(-) delete mode 100644 files/halt-local.service delete mode 100755 files/halt.local diff --git a/config/build.cfg b/config/build.cfg index f330ddc..be0f484 100644 --- a/config/build.cfg +++ b/config/build.cfg @@ -196,10 +196,6 @@ 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 } ], - # 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 } ], diff --git a/files/halt-local.service b/files/halt-local.service deleted file mode 100644 index bc7f284..0000000 --- a/files/halt-local.service +++ /dev/null @@ -1,23 +0,0 @@ -# This file is part of systemd. -# -# systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. - -[Unit] -Description=/sbin/halt.local Compatibility -ConditionFileIsExecutable=/sbin/halt.local -DefaultDependencies=no -After=shutdown.target -Before=final.target - -[Service] -Type=oneshot -ExecStartPre=-/bin/kill -54 1 -ExecStartPre=-/usr/bin/plymouth quit -ExecStartPre=-/usr/bin/chvt 1 -ExecStart=/sbin/halt.local -TimeoutSec=0 -StandardOutput=tty -RemainAfterExit=yes diff --git a/files/halt.local b/files/halt.local deleted file mode 100755 index e27ad1d..0000000 --- a/files/halt.local +++ /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); -- cgit v1.2.1 From 526c61a629947c777cc391896d09f2be03ed03fd Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Tue, 23 Oct 2018 21:45:00 +0100 Subject: Remove control of firstboot wizard - it no longer exists. --- config/build.cfg | 4 ---- files/draklive-install.d/firstboot | 1 - files/firstboot | 1 - 3 files changed, 6 deletions(-) delete mode 100644 files/draklive-install.d/firstboot delete mode 100644 files/firstboot diff --git a/config/build.cfg b/config/build.cfg index be0f484..e27aac9 100644 --- a/config/build.cfg +++ b/config/build.cfg @@ -184,9 +184,6 @@ my $config = { # 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 } ], @@ -198,7 +195,6 @@ my $config = { # 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 } ], # Reenable services in installed system. [ 'files/draklive-install.d/services', '/etc/draklive-install.d/services', { mode => 0644 } ], diff --git a/files/draklive-install.d/firstboot b/files/draklive-install.d/firstboot deleted file mode 100644 index a842497..0000000 --- a/files/draklive-install.d/firstboot +++ /dev/null @@ -1 +0,0 @@ -FIRSTBOOT=no diff --git a/files/firstboot b/files/firstboot deleted file mode 100644 index a842497..0000000 --- a/files/firstboot +++ /dev/null @@ -1 +0,0 @@ -FIRSTBOOT=no -- cgit v1.2.1 From da98c424f110a1279c521b839eb77bf10acc1184 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Fri, 26 Oct 2018 21:21:29 +0100 Subject: Remove obsolete nvidia304, add nvidia390. --- config/build.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/build.cfg b/config/build.cfg index e27aac9..ba5972f 100644 --- a/config/build.cfg +++ b/config/build.cfg @@ -144,8 +144,8 @@ my $config = { # nonfree 'dkms-broadcom-wl', - 'dkms-nvidia304', 'x11-driver-video-nvidia304', 'dkms-nvidia340', 'x11-driver-video-nvidia340', + 'dkms-nvidia390', 'x11-driver-video-nvidia390', 'dkms-nvidia-current', 'x11-driver-video-nvidia-current', ], -- cgit v1.2.1 From 973bc4a7b067844b538a2ee526dc51b4123f063a Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Fri, 26 Oct 2018 21:24:25 +0100 Subject: Remove modification of /etc/inittab - it no longer exists. --- config/build.cfg | 3 --- 1 file changed, 3 deletions(-) diff --git a/config/build.cfg b/config/build.cfg index ba5972f..c43d0c2 100644 --- a/config/build.cfg +++ b/config/build.cfg @@ -154,9 +154,6 @@ my $config = { 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", ), disable_services => [ -- cgit v1.2.1 From fb2d58c4915e059e7bdbabc2190641319274d57d Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sun, 28 Oct 2018 20:26:23 +0000 Subject: Add refind package to local repository. --- config/build.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/build.cfg b/config/build.cfg index c43d0c2..1acd5c8 100644 --- a/config/build.cfg +++ b/config/build.cfg @@ -137,7 +137,7 @@ my $config = { 'broadcom-bcma-config', 'broadcom-ssb-config', 'dkms', - 'efibootmgr', 'efivar', + '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'), -- cgit v1.2.1 From cff6741597a58f291b2321bdbe2d230c818a4701 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sun, 28 Oct 2018 20:27:25 +0000 Subject: Fix permission on draklive-install.desktop for Xfce. Xfce now wants desktop files in ~/Desktop to have exec permission. --- config/build.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/config/build.cfg b/config/build.cfg index 1acd5c8..71ffa02 100644 --- a/config/build.cfg +++ b/config/build.cfg @@ -256,6 +256,7 @@ my $config = { # 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. -- cgit v1.2.1 From 4188ede639da7fbb198a56869283770b63db947d Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sun, 28 Oct 2018 20:29:07 +0000 Subject: Change default build to Mageia 7 (cauldron) and Xfce. --- config/settings.cfg | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/settings.cfg b/config/settings.cfg index a078fd3..cbe4e04 100644 --- a/config/settings.cfg +++ b/config/settings.cfg @@ -1,10 +1,10 @@ vendor=Mageia distro=Mageia product=Live -desktop=GNOME -version=6 +desktop=Xfce +version=7 arch=x86_64 region=all default_user=live -repository=/home/bcd/build_bcd/pieces/6 +repository=/home/bcd/build_bcd/pieces/cauldron workdir=/home/draklive/var-data -- cgit v1.2.1