upgrade to ubuntu 22.04

This commit is contained in:
Rui Lopes 2022-12-03 11:10:03 +00:00
parent 0bd6dc86c5
commit 8010455501
6 changed files with 16 additions and 5 deletions

View File

@ -26,7 +26,7 @@ This will:
# Usage # Usage
Build and install the [Ubuntu 20.04 Base Box](https://github.com/rgl/ubuntu-vagrant). Build and install the [Ubuntu 22.04 Base Box](https://github.com/rgl/ubuntu-vagrant).
Build and install the [Windows 2022 Base Box](https://github.com/rgl/windows-vagrant). Build and install the [Windows 2022 Base Box](https://github.com/rgl/windows-vagrant).

2
Vagrantfile vendored
View File

@ -21,7 +21,7 @@ Vagrant.configure(2) do |config|
end end
config.vm.define :nexus do |config| config.vm.define :nexus do |config|
config.vm.box = 'ubuntu-20.04-amd64' config.vm.box = 'ubuntu-22.04-amd64'
config.vm.hostname = nexus_domain config.vm.hostname = nexus_domain
config.vm.network 'private_network', ip: nexus_ip config.vm.network 'private_network', ip: nexus_ip
config.vm.provider :libvirt do |lv, config| config.vm.provider :libvirt do |lv, config|

View File

@ -1,4 +1,4 @@
hello-world (1.0.0) focal; urgency=low hello-world (1.0.0) jammy; urgency=low
* Hello World. * Hello World.

View File

@ -1,6 +1,17 @@
#!/bin/bash #!/bin/bash
set -euxo pipefail set -euxo pipefail
# pin the microsoft apt repository above the distro.
# see apt-cache policy
# see apt-cache policy dotnet-sdk-6.0
# see apt-cache showpkg dotnet-sdk-6.0
# see http://manpages.ubuntu.com/manpages/jammy/en/man5/apt_preferences.5.html
cat >/etc/apt/preferences.d/packages.microsoft.com.pref <<'EOF'
Package: *
Pin: origin "packages.microsoft.com"
Pin-Priority: 999
EOF
# opt-out of telemetry. # opt-out of telemetry.
echo 'export DOTNET_CLI_TELEMETRY_OPTOUT=1' >/etc/profile.d/opt-out-dotnet-cli-telemetry.sh echo 'export DOTNET_CLI_TELEMETRY_OPTOUT=1' >/etc/profile.d/opt-out-dotnet-cli-telemetry.sh
source /etc/profile.d/opt-out-dotnet-cli-telemetry.sh source /etc/profile.d/opt-out-dotnet-cli-telemetry.sh

View File

@ -36,7 +36,7 @@ repository.createRawHosted("adhoc-package", "default", false, WritePolicy.ALLOW_
// create a apt repository backed by the default blob store. // create a apt repository backed by the default blob store.
// see https://help.sonatype.com/repomanager3/formats/apt-repositories // see https://help.sonatype.com/repomanager3/formats/apt-repositories
pgpPrivateKey = new File('/vagrant/shared/apt-hosted-private.key').getText('UTF-8') pgpPrivateKey = new File('/vagrant/shared/apt-hosted-private.key').getText('UTF-8')
repository.createAptHosted("apt-hosted", "focal", pgpPrivateKey, "abracadabra", "default", WritePolicy.ALLOW_ONCE, true) repository.createAptHosted("apt-hosted", "jammy", pgpPrivateKey, "abracadabra", "default", WritePolicy.ALLOW_ONCE, true)
// create a npm repository backed by the default blob store. // create a npm repository backed by the default blob store.

View File

@ -34,7 +34,7 @@ curl \
apt-key add /vagrant/shared/apt-hosted-public.key apt-key add /vagrant/shared/apt-hosted-public.key
# install the hello-world package. # install the hello-world package.
echo "deb [arch=amd64] https://$nexus_domain/repository/apt-hosted focal main" >/etc/apt/sources.list.d/nexus-apt-hosted.list echo "deb [arch=amd64] https://$nexus_domain/repository/apt-hosted jammy main" >/etc/apt/sources.list.d/nexus-apt-hosted.list
apt-get update apt-get update
apt-get install -y hello-world apt-get install -y hello-world
apt-cache show hello-world apt-cache show hello-world