Update mininet version (#517)

* Support negative-valued action parameters
by converting them in the Python helper code into a positive value
whose bit pattern is the 2's complement representation of the negative
value.

* Update version of mininet installed to the latest available in 2023-Jun
This commit is contained in:
Andy Fingerhut 2023-06-24 12:15:29 -04:00 committed by GitHub
parent 30d6b4599d
commit aa58e1247d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 58 additions and 74 deletions

View File

@ -18,7 +18,7 @@ Vagrant.configure(2) do |config|
dev.vm.provision "shell", inline: "chmod 755 /home/vagrant/py3localpath.py"
dev.vm.provision "file", source: "patches/disable-Wno-error-and-other-small-changes.diff", destination: "/home/vagrant/patches/disable-Wno-error-and-other-small-changes.diff"
dev.vm.provision "file", source: "patches/behavioral-model-use-correct-libssl-pkg.patch", destination: "/home/vagrant/patches/behavioral-model-use-correct-libssl-pkg.patch"
dev.vm.provision "file", source: "patches/mininet-dont-install-python2-2022-apr.patch", destination: "/home/vagrant/patches/mininet-dont-install-python2-2022-apr.patch"
dev.vm.provision "file", source: "patches/mininet-patch-for-2023-jun.patch", destination: "/home/vagrant/patches/mininet-patch-for-2023-jun.patch"
dev.vm.provision "file", source: "clean.sh", destination: "/home/vagrant/clean.sh"
dev.vm.provision "shell", inline: "chmod 755 /home/vagrant/clean.sh"
dev.vm.provision "shell", path: "root-dev-bootstrap.sh"
@ -31,7 +31,7 @@ Vagrant.configure(2) do |config|
release.vm.provider "virtualbox" do |v|
v.name = "P4 Tutorial Release" + Time.now.strftime(" %Y-%m-%d")
end
release.vm.provision "file", source: "patches/mininet-dont-install-python2-2022-apr.patch", destination: "/home/vagrant/patches/mininet-dont-install-python2-2022-apr.patch"
release.vm.provision "file", source: "patches/mininet-patch-for-2023-jun.patch", destination: "/home/vagrant/patches/mininet-patch-for-2023-jun.patch"
release.vm.provision "shell", path: "root-release-bootstrap.sh"
release.vm.provision "shell", path: "root-common-bootstrap.sh"
release.vm.provision "shell", privileged: false, path: "user-common-bootstrap.sh"

View File

@ -1,36 +0,0 @@
diff --git a/util/install.sh b/util/install.sh
index fd584b8..5886199 100755
--- a/util/install.sh
+++ b/util/install.sh
@@ -5,6 +5,7 @@
# Fail on error
set -e
+set -x
# Fail on unset var usage
set -o nounset
@@ -175,9 +176,9 @@ function mn_deps {
else # Debian/Ubuntu
pf=pyflakes
pep8=pep8
- # Starting around 20.04, installing pyflakes instead of pyflakes3
+ # Starting around 18.04, installing pyflakes instead of pyflakes3
# causes Python 2 to be installed, which is exactly NOT what we want.
- if [ "$DIST" = "Ubuntu" -a `expr $RELEASE '>=' 20.04` = "1" ]; then
+ if [ "$DIST" = "Ubuntu" -a `expr $RELEASE '>=' 18.04` = "1" ]; then
pf=pyflakes3
fi
# Debian 11 "bullseye" renamed
@@ -189,9 +190,10 @@ function mn_deps {
fi
$install gcc make socat psmisc xterm ssh iperf telnet \
- ethtool help2man $pf pylint $pep8 \
+ ethtool help2man pylint3 \
net-tools \
${PYPKG}-pexpect ${PYPKG}-tk
+ $install --no-install-recommends $pf $pep8
# Install pip
$install ${PYPKG}-pip || $install ${PYPKG}-pip-whl
if ! ${PYTHON} -m pip -V; then

View File

@ -1,32 +0,0 @@
diff --git a/util/install.sh b/util/install.sh
index 0a67871..7076dbe 100755
--- a/util/install.sh
+++ b/util/install.sh
@@ -5,6 +5,7 @@
# Fail on error
set -e
+set -x
# Fail on unset var usage
set -o nounset
@@ -174,15 +175,16 @@ function mn_deps {
python-pep8 ${PYPKG}-pexpect ${PYPKG}-tk
else # Debian/Ubuntu
pf=pyflakes
- # Starting around 20.04, installing pyflakes instead of pyflakes3
+ # Starting around 18.04, installing pyflakes instead of pyflakes3
# causes Python 2 to be installed, which is exactly NOT what we want.
- if [ `expr $RELEASE '>=' 20.04` = "1" ]; then
+ if [ `expr $RELEASE '>=' 18.04` = "1" ]; then
pf=pyflakes3
fi
$install gcc make socat psmisc xterm ssh iperf telnet \
- ethtool help2man $pf pylint pep8 \
+ ethtool help2man pylint3 pep8 \
net-tools \
${PYPKG}-pexpect ${PYPKG}-tk
+ $install --no-install-recommends $pf
# Install pip
$install ${PYPKG}-pip || $install ${PYPKG}-pip-whl
if ! ${PYTHON} -m pip -V; then

View File

@ -0,0 +1,54 @@
diff --git a/util/install.sh b/util/install.sh
index 04f85b0..6cd4221 100755
--- a/util/install.sh
+++ b/util/install.sh
@@ -5,6 +5,7 @@
# Fail on error
set -e
+set -x
# Fail on unset var usage
set -o nounset
@@ -165,7 +166,7 @@ function mn_deps {
$install gcc make socat psmisc xterm openssh-clients iperf \
iproute telnet python-setuptools libcgroup-tools \
ethtool help2man net-tools
- $install ${PYPKG}-pyflakes pylint ${PYPKG}-pep8-naming
+ $install ${PYPKG}-pyflakes pylint ${PYPKG}-pep8-naming \
${PYPKG}-pexpect
elif [ "$DIST" = "SUSE LINUX" ]; then
$install gcc make socat psmisc xterm openssh iperf \
@@ -175,6 +176,7 @@ function mn_deps {
else # Debian/Ubuntu
pf=pyflakes
pep8=pep8
+ pylint=pylint
# Starting around 20.04, installing pyflakes instead of pyflakes3
# causes Python 2 to be installed, which is exactly NOT what we want.
if [ "$DIST" = "Ubuntu" -a `expr $RELEASE '>=' 20.04` = "1" ]; then
@@ -187,10 +189,14 @@ function mn_deps {
pf=pyflakes3
pep8=python3-pep8
fi
+ if [ "$DIST" = "Ubuntu" -a `expr $RELEASE '<=' 20.04` = "1" ]; then
+ pylint=pylint3
+ fi
$install gcc make socat psmisc xterm ssh iperf telnet \
- ethtool help2man $pf pylint $pep8 \
+ ethtool help2man $pylint \
net-tools ${PYPKG}-tk
+ $install --no-install-recommends $pf $pep8
# Install pip
$install ${PYPKG}-pip || $install ${PYPKG}-pip-whl
@@ -303,7 +309,7 @@ function install_wireshark {
if ! which wireshark; then
echo "Installing Wireshark"
if [ "$DIST" = "Fedora" -o "$DIST" = "RedHatEnterpriseServer" ]; then
- $install wireshark wireshark-gnome
+ $install wireshark
elif [ "$DIST" = "SUSE LINUX" ]; then
$install wireshark
else

View File

@ -4,15 +4,13 @@
set -xe
# --- Mininet --- #
MININET_COMMIT="aa0176fce6fb718a03474f8719261b07b670d30d" # 2022-Apr-02
MININET_COMMIT="5b1b376336e1c6330308e64ba41baac6976b6874" # 2023-May-28
git clone https://github.com/mininet/mininet mininet
cd mininet
git checkout ${MININET_COMMIT}
PATCH_DIR="${HOME}/patches"
patch -p1 < "${PATCH_DIR}/mininet-dont-install-python2-2022-apr.patch" || echo "Errors while attempting to patch mininet, but continuing anyway ..."
patch -p1 < "${PATCH_DIR}/mininet-patch-for-2023-jun.patch"
cd ..
# TBD: Try without installing openvswitch, i.e. no '-v' option, to see
# if everything still works well without it.
sudo ./mininet/util/install.sh -nw
find /usr/lib /usr/local $HOME/.local | sort > $HOME/usr-local-7-after-mininet-install.txt