#!/bin/sh # This script completes an upgrade to Slint 14.2.1.1, adding # some packages and putting the system in the same state as if # Slint64-14.2.1.1 had been directly installed; # It should be run as root. [ ! "$(id -u)" = 0 ] && echo "Only root can run this script." && exit # Install packages added to Slint 14.2.1 not shipped in Slint 14.2. # If a package is already installed it will be skipped. Case occurring # it will be upgraded. echo " This script completes an upgrade to Slint 14.2.1.1, adding some packages, optionally removing packages no longer shipped and putting the system in the same state as if Slint64-14.2.1.1 had been directly installed. Warning displayed while installing packages are generally harmless. Installing or upgrading packages takes a lot of time, please be patient." read -p "Press Enter to start: " dummy sleep 5 slapt-get --add-keys slapt-get -u slapt-get -i \ BeautifulSoup \ accountsservice \ caja \ caja-extensions \ cmark \ compiz \ dotconf \ emacspeak \ emerald \ emerald-themes \ eom \ espeak \ espeak-ng \ espeakup \ gdm \ gnome-common \ gpicview \ grub-scripts \ gtksourceview3 \ inkscape \ isomaster \ json-py \ libcdr \ libgnomecanvas \ libgtop \ libgxps \ liblouis \ libmatekbd \ libmatemixer \ libmateweather \ libpeas \ libreoffice-extension-ancient-greek-dictionary \ libreoffice-extension-libregreek \ libunique \ libwnck3 \ lightdm \ lightdm-gtk-greeter \ lightdm-gtk-greeter-settings \ lxappearance \ lxde-common \ lxde-icon-theme \ lxinput \ lxlauncher \ lxmenu-data \ lxpanel \ lxrandr \ lxsession \ lxsession-edit \ lxshortcut \ lxtask \ lxterminal \ marco \ mate-applets \ mate-backgrounds \ mate-calc \ mate-colors-icon-theme \ mate-common \ mate-control-center \ mate-desktop \ mate-icon-theme \ mate-icon-theme-faenza \ mate-media \ mate-menus \ mate-notification-daemon \ mate-panel \ mate-power-manager \ mate-sensors-applet \ mate-session-manager \ mate-settings-daemon \ mate-system-monitor \ mate-terminal \ mate-themes \ mate-tweak \ mate-user-share \ mate-utils \ mozo \ murrine \ murrine-themes \ numpy \ orca \ pam \ parcellite \ pcre2 \ podofo \ portaudio \ potrace \ psutil \ py3cairo \ py3gobject \ py3xdg \ pyatspi \ python3 \ python3-distutils-extra \ python-lxml \ qtatspi \ setproctitle \ slint-misc \ speechd-el \ speech-dispatcher \ vala \ vlc \ vte3 \ yelp-tools \ yelp-xsl # # Apply setup that new in Slint64-14.2.1.1 # ======================================== # # gdm should belong to the audio group. usermod -a -G audio gdm # Allow users belonging to the group braille to review the screen read # by Orca on their braille device in a window manager or desktop. groupadd --system -f braille if [ ! -f /etc/brlapi.key ]; then chmod 755 /usr/sbin/brltty-genkey /usr/sbin/brltty-genkey /etc/brlapi.key /usr/bin/chgrp braille /etc/brlapi.key chmod 640 /etc/brlapi.key chown root:braille /etc/brlapi.key fi # The admin should add them to the braille group manually, for instance # with this command: # groupadd -G -a braille # The brltty daemon should be started upon booting. [ -f /etc/rc.d/rc.brltty ] && chmod 755 /etc/rc.d/rc.brltty # We don't want that the hplip applet be in the tray by default if [ -f etc/xdg/autostart/hplip-systray.desktop ]; then sed -i "/Hidden/d" etc/xdg/autostart/hplip-systray.desktop echo "Hidden=true" >> etc/xdg/autostart/hplip-systray.desktop fi # # Change if need be setup modified in Slint64-14.2.1.1 # ==================================================== # # Restore all files /etc/X11/xinit/xinitrc.* removing the code snippet # possibly inserted with the a11y stuff needed by orca (cd /etc/X11/xinit for initscript in $(ls xinitrc.*); do sed /startorca/,/^fi/d $initscript > ${initscript}.new mv ${initscript}.new $initscript done ) # Remove it is existed this code snippet: # If espeakup is running, give it enough time to finish speaking # if [ ! "`ps -C espeakup --noheaders|wc -l`" = "0" ]; then # sleep 5 # fi if [ -f /etc/rc.d/rc.4.new ]; then sed -i '/running/{N;N;N;d}' /etc/rc.d/rc.4.new elif [ -f /etc/rc.d/rc.4 ]; then sed -i '/running/{N;N;N;d}' /etc/rc.d/rc.4 fi # We don't want a login getty in runlevel 4 on tty1 sed -i '/c1/s,.*,c1:1235:respawn:/sbin/agetty --noclear 38400 tty1 linux,' /etc/inittab # Remove /usr/share/orca/orca.snip it it exists rm -f /usr/share/orca/orca.snip # Remove /etc/xdg/autostart/startorca.desktop if it exists rm -f /etc/xdg/autostart/startorca.desktop # Do not spawn pulse when an application relying on alsa starts if [ -f /etc/asound.conf ]; then sed -i ' /pcm.default/s/.*/# pcm.default pulse/ /ctl.default/s/.*/# ctl.default pulse/ ' /etc/asound.conf fi # In Slint, we want to share audio resources between speech apps that # rely on alsa and other apps that rely on pulseaudio. if [ -f /etc/pulse/default.pa ]; then (cd /etc/pulse if ! grep -q '^load-module module-alsa-sink device=' default.pa; then echo 'load-module module-alsa-sink device=dmix' >> \ default.pa fi if ! grep -q '^load-module module-alsa-source device=' default.pa; then echo 'load-module module-alsa-source device=dsnoop' >> \ default.pa fi ) fi # Edit the .desktop files to display relevant application menu entries # ==================================================================== ( cd /usr/share/applications if [ -f geany.desktop ];then sed -i '/Categories/d' geany.desktop echo 'Categories=Utility;TextEditor' >> geany.desktop fi if [ -f gvim.desktop ]; then sed -i '/Categories/d' gvim.desktop echo 'Categories=Utility;TextEditor' >> gvim.desktop fi for xfce in \ Thunar-bulk-rename.desktop \ Thunar-folder-handler.desktop \ Thunar.desktop \ thunar-settings.desktop \ thunar-volman-settings.desktop \ xfce4-power-manager-settings.desktop \ xfce4-taskmanager.desktop; do if [ -f $xfce ]; then sed -i '/OnlyShow/d' $xfce echo 'OnlyShowIn=XFCE;' >> $xfce fi done for lxde in \ lxappearance.desktop \ lxrandr.desktop \ lxsession-edit.desktop \ lxtask.desktop; do if [ -f $lxde ]; then sed -i '/OnlyShow/d' $lxde echo 'OnlyShowIn=LXDE;' >> $lxde fi done for mate in \ mate-disk-usage-analyzer.desktop \ mate-power-preferences.desktop; do if [ -f $mate ]; then sed -i '/OnlyShow/d' $mate echo 'OnlyShowIn=MATE;' >> $mate fi done for many in pcmanfm-desktop-pref.desktop pcmanfm.desktop; do if [ -f $many ]; then sed -i '/NotShow/d' $many echo 'NotShowIn=MATE;XFCE;KDE;' >> $many fi done for everywhere in \ exo-file-manager.desktop \ exo-mail-reader.desktop \ exo-terminal-emulator.desktop \ exo-web-browser.desktop; do if [ -f $everywhere ] && grep -q "OnlyShow" $everywhere; then sed -i '/OnlyShow/d' $everywhere fi done if [ -f nm-connection-editor.desktop ]; then sed -i '/NotShow/d' nm-connection-editor.desktop echo 'NotShowIn=KDE;' >> \ nm-connection-editor.desktop fi if [ -f nm-applet.desktop ]; then sed -i '/NotShow/d' nm-applet.desktop echo 'NotShowIn=KDE;' >> \ nm-applet.desktop fi # We' don't use pkexec in Slint64-4.2.1.1 if [ -f /usr/share/gdm/applications/gdmsetup.desktop ]; then sed -i "s,^Exec.*,Exec=ktsuss /usr/sbin/gdmsetup," \ /usr/share/gdm/applications/gdmsetup.desktop fi if [ -f /usr/share/applications/lightdm-gtk-greeter-settings.desktop ]; then sed -i "s/^Exec.*/Exec=ktsuss lightdm-gtk-greeter-settings/" \ /usr/share/applications/lightdm-gtk-greeter-settings.desktop fi # Add a MimeType to mozilla-thunderbird.desktop so it be proposed as # default application for links to mail if [ -f /usr/share/applications/mozilla-thunderbird.desktop ]; then if ! grep -wq MimeType /usr/share/applications/mozilla-thunderbird.desktop; then echo 'MimeType=x-scheme-handler/mailto;' >> \ /usr/share/applications/mozilla-thunderbird.desktop fi fi ) if [ -d /usr/share/applications/kde4 ]; then ( cd /usr/share/applications/kde4 # We want apps that need to start akonadi only shown in # KDE's application menu for kde_app in \ $(grep "\.desktop" ../../../../var/log/packages/kdepim* \ | grep applications \ | sed "s,.*/,,"); do if [ -f $kde_app ]; then sed -i '/OnlyShow/d' $kde_app echo 'OnlyShowIn=KDE;' >> $kde_app fi done # There is no point showing in other menus these KDE applications # that are shown in KDE's menus. for hide in kdeconnect.desktop kdesystemsettings.desktop; do if [ -f $hide ]; then sed -i '/Hidden/d' $hide echo 'Hidden=true' >> $hide fi done ) fi # This is done in aaa_base for Slackware64-14.2.1 but it is blacklisted # so this is needed in case of upgrade from Slackware64-14.2 cat <<-EOF > /etc/os-release NAME=Slint VERSION="14.2.1.1" ID=slint VERSION_ID=14.2.1.1 PRETTY_NAME="Slint 14.2.1.1" ANSI_COLOR="0;34" CPE_NAME="cpe:/o:slint:slint_linux:14.2.1.1" HOME_URL="http://slint.fr/" SUPPORT_URL="https://forum.salixos.org/viewforum.php?f=44/" BUG_REPORT_URL="https://forum.salixos.org/viewforum.php?f=44/" EOF echo "Slint 14.2.1.1" > /etc/slint-version echo "Slackware 14.2" > /etc/slackware-version zzz=$(find /var/log/packages -name "zzz-settings*"|sed 's,.*/,,') if [ ! "$zzz" = "" ]; then echo " We will now remove the obsolete package zzz-settings..." sleep 1.5 removepkg $zzz fi liste=$(for pkg in \ poedit \ webkitgtk \ wxGTK \ LucenePlusPlus \ cld2; do find /var/log/packages -name "${pkg}*"|sed 's,.*/,,' done) if [ ! "$liste" = "" ];then echo " Some packages included in the Slint64-14.2 ISO are not shipped in the Slint64-14.2.1.1 ISO. Two packages were removed because they should be frequently upgraded to provide security fixes: webkitgtk and wxGTK. This leads to also cease to ship poedit, that depends on wxGTK as well as LucenePlusPlus and cld2, other dependencies of poedit. List of installed packages in concern found in your system:" for pkg in $liste; do echo $pkg done printf \ "You may decide later what to do about these packages, or we can remove all of them now. To remove all theses packages now type R then press Enter, else just press Enter: " read answer echo $answer if [ "$answer" = "r" ] || [ "$answer" = "R" ]; then for pkg in $liste; do removepkg $pkg done fi fi echo "All done. IMPORTANT: now run dotnew or dotnew-gtk to replace the old configuration files by the new ones case occurring. Then, if not already done run as regular user upgrade_user_config. This has to be done by each user created before the upgrade and takes just a few seconds. "