Skip to content

Commit

Permalink
Ubuntu feb 2024 (#147)
Browse files Browse the repository at this point in the history
* Node 21, .net 8

* QT 6.5.3, 6.6.1, installer framework 4.6

* jdk 21

* golang 1.19.13, 1.20.14, 1.21.7

* LLVM 15, 16, 17

* rbenv and ruby 2.6.10, 2.7.8, 3.0.6, 3.1.4, 3.2.3

* replace install rvm

* replace rvm with rbenv and move step earlier

* restart shell

* try rbenv-installer

* don't restart shell

* try sourcing .bashrc

* source .bashrc within install_rbenv function

* cat .bashrc file

* skip check and source .bashrc again

* check path for shims

* add appveyor to path

* check existence of script

* add shims to path

* add .rbenv/bin to path as well

* try quoted path

* continue with rubies

* export path in main config

* check outputs

* add ruby buil plugin

* try ruby build clone again

* try ruby build in second function

* run init without eval

* no bare init call

* try without eval

* try without source

* cleanup and delay ruby install

* change qt mirror

* QT 6.6.2

* back to same qt mirror

* configure_mono_repository override

* add rvm wrapper to /usr/bin

* move rbenv earlier, use WORK_DIR

* move file copy to build config

* return ruby install position

* restore from previous commit

* use add2path function

* declare write_line function

* add to path suffix

* export path

* explicit home folder

* add add_line and replace_line function defs

* remove jdk 7, reinstate 9 and 10

* return nodejs 16 to default

* fix go install

* update pythons 3.9.18, 3.10.13, 3.11.8, 3.12.2

* update flutter 3.19.1

* try different qt mirror

* try berkley mirror

* bake ubuntu1804 and GCE images

* bionic postgres override

* skip 20.04 on GCE

* rabbitmq bionic override

* bionic configure_mono override

* mono bionic override

* fix python 312

* declare OS_ARCH

* fix python 3.12 patch number

* remove existing python 3.12 folders

* fix braces

* remove stray brace

* recursive removal

* install tk-devel and python3-tk packages

* tk-dev

* more packages and add -y flag

* upgrade setup tools

* activate virtual env

* add virtualenv python to path, check for version

* fix braces

* try ensurepip and upgrade virtualenv

* try ensurepip and upgrade virtualenv

* add .rbenv/bin to 18.04 and 20.04

* fix GCE images

* Ubuntu 22.04 images, jdk 21.0.2, 18.0.2

* fix jdk 18 link

* fix clang on 18.04 and 20.04

* call fix_clang as root

* fix clang on 22.04

* add gcc12

* try unset -f cd on 18.04

* write unset to profile

* fix remaining images

* cleanup
  • Loading branch information
OwenMcDonnell authored Mar 12, 2024
1 parent 6e94f7c commit 27594e5
Show file tree
Hide file tree
Showing 11 changed files with 394 additions and 112 deletions.
2 changes: 2 additions & 0 deletions appveyor-build-linux-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ clone_script:

build_script:
- cd $BASE_DIR && pwd
- sudo cp ./rvm_wrapper.sh /usr/bin/rvm
- sudo chmod +x /usr/bin/rvm
- sudo -E ./basicconfig.sh
- appveyor PushArtifact versions.log

Expand Down
22 changes: 15 additions & 7 deletions appveyor-fix-linux-images.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
environment:
matrix:
- job_name: Ubuntu 22.04 on Hyper-V
APPVEYOR_BUILD_WORKER_IMAGE: ubuntu2204-master
APPVEYOR_BAKE_IMAGE: ubuntu2204-master

- job_name: Ubuntu 20.04 on Hyper-V
APPVEYOR_BUILD_WORKER_IMAGE: ubuntu2004-master
APPVEYOR_BAKE_IMAGE: ubuntu2004-master
Expand All @@ -12,13 +16,17 @@ environment:
# APPVEYOR_BUILD_WORKER_IMAGE: ubuntu1604-master
# APPVEYOR_BAKE_IMAGE: ubuntu1604-master

# - job_name: Ubuntu 20.04 on GCE us-central1
# APPVEYOR_BUILD_WORKER_IMAGE: ubuntu2004-master-gce-us-central1
# APPVEYOR_BAKE_IMAGE: ubuntu2004-master-gce-us-central1
- job_name: Ubuntu 22.04 on GCE us-central1
APPVEYOR_BUILD_WORKER_IMAGE: ubuntu2204-master-gce-us-central1
APPVEYOR_BAKE_IMAGE: ubuntu2204-master-gce-us-central1

- job_name: Ubuntu 20.04 on GCE us-central1
APPVEYOR_BUILD_WORKER_IMAGE: ubuntu2004-master-gce-us-central1
APPVEYOR_BAKE_IMAGE: ubuntu2004-master-gce-us-central1

# - job_name: Ubuntu 18.04 on GCE us-central1
# APPVEYOR_BUILD_WORKER_IMAGE: ubuntu1804-master-gce-us-central1
# APPVEYOR_BAKE_IMAGE: ubuntu1804-master-gce-us-central1
- job_name: Ubuntu 18.04 on GCE us-central1
APPVEYOR_BUILD_WORKER_IMAGE: ubuntu1804-master-gce-us-central1
APPVEYOR_BAKE_IMAGE: ubuntu1804-master-gce-us-central1

# - job_name: Ubuntu 16.04 on GCE us-central1
# APPVEYOR_BUILD_WORKER_IMAGE: ubuntu1604-master-gce-us-central1
Expand All @@ -41,7 +49,7 @@ clone_script:
build_script:
- cd $BASE_DIR && pwd
- sudo -E ./fixconfig.sh
- sudo cp /opt/octopus/octo /usr/bin
#- sudo cp /opt/octopus/octo /usr/bin
- appveyor PushArtifact versions.log

test: off
Expand Down
37 changes: 30 additions & 7 deletions scripts/Ubuntu/basicconfig.sh
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,8 @@ su -l ${USER_NAME} -c "
$(declare -f configure_nuget)
configure_nuget" ||
_abort $?


install_cvs ||
_abort $?
su -l ${USER_NAME} -c "
Expand Down Expand Up @@ -393,22 +395,43 @@ su -l ${USER_NAME} -c "
install_golangs" ||
_abort $?

# Ruby
# Ruby via rvm
# su -l ${USER_NAME} -c "
# USER_NAME=${USER_NAME}
# OS_ARCH=${OS_ARCH}
# $(declare -f install_rvm)
# install_rvm" ||
# _abort $?
# su -l ${USER_NAME} -c "
# USER_NAME=${USER_NAME}
# OS_ARCH=${OS_ARCH}
# [[ -s \"${HOME}/.rvm/scripts/rvm\" ]] && source \"${HOME}/.rvm/scripts/rvm\"
# $(declare -f log_version)
# $(declare -f install_rubies)
# install_rubies" ||
# _abort $?

# Ruby via rbenv
su -l ${USER_NAME} -c "
USER_NAME=${USER_NAME}
OS_ARCH=${OS_ARCH}
$(declare -f install_rvm)
install_rvm" ||
$(declare -f install_rbenv)
$(declare -f write_line)
$(declare -f add_line)
$(declare -f replace_line)
install_rbenv" ||
_abort $?
#export PATH="/home/appveyor/.rbenv/shims:/home/appveyor/.rbenv/bin:${PATH}"
su -l ${USER_NAME} -c "
USER_NAME=${USER_NAME}
OS_ARCH=${OS_ARCH}
[[ -s \"${HOME}/.rvm/scripts/rvm\" ]] && source \"${HOME}/.rvm/scripts/rvm\"
$(declare -f write_line)
$(declare -f add_line)
$(declare -f replace_line)
$(declare -f log_version)
$(declare -f install_rubies)
install_rubies" ||
$(declare -f install_rbenv_rubies)
install_rbenv_rubies" ||
_abort $?

if [[ $OS_ARCH == "amd64" ]]; then
install_mono ||
_abort $?
Expand Down
88 changes: 87 additions & 1 deletion scripts/Ubuntu/bionic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function install_outdated_dotnets() {

function prepare_dotnet_packages() {

SDK_VERSIONS=( "2.1" "2.2" "3.0" "3.1" "5.0" "6.0" "7.0" )
SDK_VERSIONS=( "2.1" "2.2" "3.0" "3.1" "5.0" "6.0" "7.0" "8.0" )
dotnet_packages "dotnet-sdk-" SDK_VERSIONS[@]

declare RUNTIME_VERSIONS=( "2.1" "2.2" )
Expand Down Expand Up @@ -90,4 +90,90 @@ function install_google_chrome() {
curl -fsSL -O https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/${DEBNAME}
dpkg -i ${DEBNAME}
[ -f "${DEBNAME}" ] && rm -f "${DEBNAME}" || true
}

function install_postgresql() {
echo "[INFO] Running install_postgresql..."
if [[ -z "${POSTGRES_ROOT_PASSWORD-}" || "${#POSTGRES_ROOT_PASSWORD}" = "0" ]]; then POSTGRES_ROOT_PASSWORD="Password12!"; fi
curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - &&
add-apt-repository "deb https://apt-archive.postgresql.org/pub/repos/apt ${OS_CODENAME}-pgdg main" ||
{ echo "[ERROR] Cannot add postgresql repository to APT sources." 1>&2; return 10; }
apt-get -y -qq update &&
apt-get -y -q install postgresql ||
{ echo "[ERROR] Cannot install postgresql." 1>&2; return 20; }
systemctl start postgresql
systemctl disable postgresql
log_version dpkg -l postgresql

sudo -u postgres createuser ${USER_NAME}
sudo -u postgres psql -c "alter user ${USER_NAME} with createdb" postgres
sudo -u postgres psql -c "ALTER USER postgres with password '${POSTGRES_ROOT_PASSWORD}';" postgres
replace_line '/etc/postgresql/11/main/pg_hba.conf' 'local all postgres trust' 'local\s+all\s+postgres\s+peer'
}


function install_rabbitmq() {
echo "[INFO] Running install_rabbitmq..."

sudo apt-get update -y

sudo apt-get install curl gnupg -y

curl -fsSL https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc | sudo apt-key add -

sudo apt-get install apt-transport-https

# sudo tee /etc/apt/sources.list.d/bintray.rabbitmq.list <<EOF
# deb https://dl.bintray.com/rabbitmq-erlang/debian bionic erlang
# deb https://dl.bintray.com/rabbitmq/debian bionic main
# EOF
sudo tee /etc/apt/sources.list.d/rabbitmq.list <<EOF
## Provides modern Erlang/OTP releases from a Cloudsmith mirror
##
deb [signed-by=/usr/share/keyrings/rabbitmq.E495BB49CC4BBE5B.gpg] https://ppa1.novemberain.com/rabbitmq/rabbitmq-erlang/deb/ubuntu $distribution main
deb-src [signed-by=/usr/share/keyrings/rabbitmq.E495BB49CC4BBE5B.gpg] https://ppa1.novemberain.com/rabbitmq/rabbitmq-erlang/deb/ubuntu $distribution main
# another mirror for redundancy
deb [signed-by=/usr/share/keyrings/rabbitmq.E495BB49CC4BBE5B.gpg] https://ppa2.novemberain.com/rabbitmq/rabbitmq-erlang/deb/ubuntu $distribution main
deb-src [signed-by=/usr/share/keyrings/rabbitmq.E495BB49CC4BBE5B.gpg] https://ppa2.novemberain.com/rabbitmq/rabbitmq-erlang/deb/ubuntu $distribution main
## Provides RabbitMQ from a Cloudsmith mirror
##
deb [signed-by=/usr/share/keyrings/rabbitmq.9F4587F226208342.gpg] https://ppa1.novemberain.com/rabbitmq/rabbitmq-server/deb/ubuntu $distribution main
deb-src [signed-by=/usr/share/keyrings/rabbitmq.9F4587F226208342.gpg] https://ppa1.novemberain.com/rabbitmq/rabbitmq-server/deb/ubuntu $distribution main
# another mirror for redundancy
deb [signed-by=/usr/share/keyrings/rabbitmq.9F4587F226208342.gpg] https://ppa2.novemberain.com/rabbitmq/rabbitmq-server/deb/ubuntu $distribution main
deb-src [signed-by=/usr/share/keyrings/rabbitmq.9F4587F226208342.gpg] https://ppa2.novemberain.com/rabbitmq/rabbitmq-server/deb/ubuntu $distribution main
EOF

sudo apt-get install -y erlang-base \
erlang-asn1 erlang-crypto erlang-eldap erlang-ftp erlang-inets \
erlang-mnesia erlang-os-mon erlang-parsetools erlang-public-key \
erlang-runtime-tools erlang-snmp erlang-ssl \
erlang-syntax-tools erlang-tftp erlang-tools erlang-xmerl
apt-get -y -qq update &&
apt-get -y install rabbitmq-server ||
{ echo "[ERROR] Cannot install rabbitmq." 1>&2; return 20; }

sed -ibak -E -e 's/#\s*ulimit/ulimit/' /etc/default/rabbitmq-server &&

systemctl start rabbitmq-server &&
systemctl status rabbitmq-server --no-pager &&
systemctl enable rabbitmq-server &&
systemctl disable rabbitmq-server ||
{ echo "[ERROR] Cannot configure rabbitmq." 1>&2; return 30; }

log_version dpkg -l rabbitmq-server
log_version erl -eval '{ok, Version} = file:read_file(filename:join([code:root_dir(), "releases", erlang:system_info(otp_release), "OTP_VERSION"])), io:fwrite(Version), halt().' -noshell
}

function configure_mono_repository () {
echo "[INFO] Running configure_mono_repository on Ubuntu 18.04..."

sudo apt-get install ca-certificates gnupg
sudo gpg --homedir /tmp --no-default-keyring --keyring /usr/share/keyrings/mono-official-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb [signed-by=/usr/share/keyrings/mono-official-archive-keyring.gpg] https://download.mono-project.com/repo/ubuntu stable-bionic main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt-get update

}
Loading

0 comments on commit 27594e5

Please sign in to comment.