Merge pull request #5601 from Security-Onion-Solutions/special

Ubuntu 20.04 Beta
This commit is contained in:
Mike Reeves
2021-10-04 08:51:01 -04:00
committed by GitHub
6 changed files with 32 additions and 5 deletions

View File

@@ -107,10 +107,17 @@ commonpkgs:
heldpackages:
pkg.installed:
- pkgs:
{% if grains['oscodename'] == 'bionic' %}
- containerd.io: 1.4.4-1
- docker-ce: 5:20.10.5~3-0~ubuntu-bionic
- docker-ce-cli: 5:20.10.5~3-0~ubuntu-bionic
- docker-ce-rootless-extras: 5:20.10.5~3-0~ubuntu-bionic
{% elif grains['oscodename'] == 'focal' %}
- containerd.io: 1.4.9-1
- docker-ce: 5:20.10.8~3-0~ubuntu-focal
- docker-ce-cli: 5:20.10.5~3-0~ubuntu-focal
- docker-ce-rootless-extras: 5:20.10.5~3-0~ubuntu-focal
{% endif %}
- hold: True
- update_holds: True

View File

@@ -22,7 +22,11 @@ mysqlpkgs:
- skip_suggestions: False
- pkgs:
{% if grains['os'] != 'CentOS' %}
- python-mysqldb
{% if grains['oscodename'] == 'bionic' %}
- python3-mysqldb
{% elif grains['oscodename'] == 'focal' %}
- python3-mysqldb
{% endif %}
{% else %}
- MySQL-python
{% endif %}

View File

@@ -2,8 +2,13 @@
saltpymodules:
pkg.installed:
- pkgs:
- python-docker
{% if grains['oscodename'] == 'bionic' %}
- python-m2crypto
- python-docker
{% elif grains['oscodename'] == 'focal' %}
- python3-m2crypto
- python3-docker
{% endif %}
{% endif %}
salt_bootstrap:

View File

@@ -3082,8 +3082,12 @@ install_ubuntu_git_deps() {
__PACKAGES="${__PACKAGES} python3-setuptools"
else
# There is no m2crypto package for Py3 at this time - only install for Py2
if [ $DISTRO_CODENAME == "focal" ]; then
__PACKAGES="${__PACKAGES} python3-m2crypto"
else
__PACKAGES="${__PACKAGES} python-m2crypto"
fi
fi
__PACKAGES="${__PACKAGES} python${PY_PKG_VER}-crypto python${PY_PKG_VER}-jinja2"
__PACKAGES="${__PACKAGES} python${PY_PKG_VER}-msgpack python${PY_PKG_VER}-requests"

View File

@@ -42,7 +42,11 @@ m2cryptopkgs:
pkg.installed:
- skip_suggestions: False
- pkgs:
{% if grains['oscodename'] == 'bionic' %}
- python-m2crypto
{% elif grains['oscodename'] == 'focal' %}
- python3-m2crypto
{% endif %}
{% endif %}
removefbcertdir:

View File

@@ -1104,8 +1104,8 @@ detect_os() {
OS=ubuntu
if grep -q "UBUNTU_CODENAME=bionic" /etc/os-release; then
OSVER=bionic
elif grep -q "UBUNTU_CODENAME=xenial" /etc/os-release; then
OSVER=xenial
elif grep -q "UBUNTU_CODENAME=focal" /etc/os-release; then
OSVER=focal
else
echo "We do not support your current version of Ubuntu."
exit 1
@@ -2159,9 +2159,12 @@ saltify() {
else
DEBIAN_FRONTEND=noninteractive retry 50 10 "apt-get -y -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confold\" upgrade" >> "$setup_log" 2>&1 || exit 1
if [ $OSVER != "xenial" ]; then
if [ $OSVER == "bionic" ]; then
# Switch to Python 3 as default if this is not xenial
update-alternatives --install /usr/bin/python python /usr/bin/python3.6 10 >> "$setup_log" 2>&1
elif [ $OSVER == "focal" ]; then
# Switch to Python 3 as default if this is not xenial
update-alternatives --install /usr/bin/python python /usr/bin/python3.8 10 >> "$setup_log" 2>&1
fi
local pkg_arr=(