From 15c53b85b149922ebd6a598584d1cef6f1fbd3c5 Mon Sep 17 00:00:00 2001 From: dpmatthews Date: Thu, 13 Jun 2024 13:10:32 +0100 Subject: [PATCH] Remove support for Fedora 28 --- Vagrantfile.fedora-28 | 25 ------------------------- install-base.sh | 31 ++++++++----------------------- install-desktop.sh | 2 +- 3 files changed, 9 insertions(+), 49 deletions(-) delete mode 100755 Vagrantfile.fedora-28 diff --git a/Vagrantfile.fedora-28 b/Vagrantfile.fedora-28 deleted file mode 100755 index 7301033..0000000 --- a/Vagrantfile.fedora-28 +++ /dev/null @@ -1,25 +0,0 @@ -# -*- mode: ruby -*- -# vi: set ft=ruby : - -VAGRANTFILE_API_VERSION = "2" -Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| - - config.vm.define "metomi-vm-fedora-28" - config.vm.box = "bento/fedora-28" - # Remove "desktop" from the args below if only accessing via SSH - # Remove "mosrs" from the args below if not accessing the Met Office Science Repository Service - config.vm.provision :shell, path: "install.sh", args: "redhat fedora28 desktop mosrs" - config.ssh.forward_x11 = true - - config.vm.provider "virtualbox" do |v| - v.name = "metomi-vm-fedora-28" - v.customize ["modifyvm", :id, "--vram", "32"] - v.customize ["modifyvm", :id, "--graphicscontroller", "vmsvga"] - # Comment out the line below if only accessing via SSH - v.gui = true - # Modify the line below if you need more than 1GB RAM - v.memory = 1024 - v.cpus = 2 - end - -end diff --git a/install-base.sh b/install-base.sh index 8c12c5d..d114740 100755 --- a/install-base.sh +++ b/install-base.sh @@ -23,12 +23,7 @@ if [[ $dist == ubuntu ]]; then elif [[ $dist == redhat ]]; then yum install -y gvim emacs || error # Set the default editor in .bash_profile - if [[ $release == fedora* ]]; then - yum install -y leafpad || error - echo "export EDITOR=leafpad" >>.bash_profile - else - echo "export EDITOR=emacs" >>.bash_profile - fi + echo "export EDITOR=emacs" >>.bash_profile fi #### Install FCM dependencies & configuration @@ -44,10 +39,7 @@ elif [[ $dist == redhat ]]; then fi yum install -y perl-Config-IniFiles subversion-perl || error yum install -y gcc-c++ || error # used by fcm test-battery - if [[ $release == fedora* ]]; then - yum install -y m4 perl-DBI || error - yum install -y tkcvs xxdiff || error - elif [[ $release == centos7 ]]; then + if [[ $release == centos7 ]]; then yum install -y tkcvs kdiff3 || error else yum install -y perl-DBI || error @@ -57,7 +49,7 @@ fi # Add the fcm wrapper script dos2unix -n /vagrant/usr/local/bin/fcm /usr/local/bin/fcm # Configure FCM diff and merge viewers -if [[ $dist == redhat && $release != fedora* ]]; then +if [[ $dist == redhat ]]; then mkdir -p /opt/metomi-site/etc/fcm dos2unix -n /vagrant/opt/metomi-site/etc/fcm/external.cfg /opt/metomi-site/etc/fcm/external.cfg fi @@ -90,13 +82,8 @@ if [[ $dist == ubuntu ]]; then elif [[ $dist == redhat ]]; then yum install -y graphviz at lsof || error service atd start || error - if [[ $release == fedora* ]]; then - yum install -y redhat-rpm-config sqlite || error - yum install -y ImageMagick || error - elif [[ $release == centos8 ]]; then - yum install -y sqlite || error - fi if [[ $release == centos8 ]]; then + yum install -y sqlite || error yum install -y python2-pip python2-jinja2 || error else yum install -y python-pip python-pep8 python-jinja2 || error @@ -151,7 +138,7 @@ elif [[ $dist == redhat ]]; then else yum install -y python-requests || error yum install -y pcre-tools || error - pip install mock pytest-tap || error # used by test-battery + #pip install mock pytest-tap || error # used by test-battery fi fi # Add the Rose wrapper scripts @@ -172,6 +159,9 @@ dos2unix -n /vagrant/opt/metomi-site/etc/rose/rose.conf /opt/metomi-site/etc/ros if [[ $dist == ubuntu ]]; then # Ensure curl is installed apt-get install -q -y curl || error +elif [[ $dist == redhat ]]; then + # Ensure wget is installed + yum install -y wget || error fi dos2unix -n /vagrant/usr/local/bin/install-fcm /usr/local/bin/install-fcm dos2unix -n /vagrant/usr/local/bin/install-cylc7 /usr/local/bin/install-cylc7 @@ -326,8 +316,3 @@ dos2unix -n /vagrant/usr/local/bin/install-um-data /usr/local/bin/install-um-dat dos2unix -n /vagrant/usr/local/bin/install-um-extras /usr/local/bin/install-um-extras dos2unix -n /vagrant/usr/local/bin/run-test-batteries /usr/local/bin/run-test-batteries dos2unix -n /vagrant/usr/local/bin/um-setup /usr/local/bin/um-setup - -if [[ $dist == redhat && $release == fedora* ]]; then - # Allow these commands to be found via sudo - echo "Defaults:vagrant secure_path = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin" >/etc/sudoers.d/vagrant-path -fi diff --git a/install-desktop.sh b/install-desktop.sh index a97c4ba..a641f53 100755 --- a/install-desktop.sh +++ b/install-desktop.sh @@ -37,7 +37,7 @@ sudo -u $(logname) dos2unix -n /vagrant/home/Desktop/docs.desktop /home/vagrant/ sudo -u $(logname) mkdir -p /home/vagrant/.config/autostart sudo -u $(logname) cp /usr/share/applications/lxterminal.desktop /home/vagrant/.config/autostart # Configure middle button emulation -if [[ ($dist == ubuntu && $release == 1804) || ($dist == redhat && $release == fedora*) ]]; then +if [[ $dist == ubuntu && $release == 1804 ]]; then sudo -u $(logname) bash -c 'echo "[Desktop Entry]" >/home/vagrant/.config/autostart/xinput.desktop' sudo -u $(logname) bash -c 'echo "Exec=xinput set-prop 11 \"libinput Middle Emulation Enabled\" 1" >>/home/vagrant/.config/autostart/xinput.desktop' fi