From 36a44e36dbe82da8d7870e914a389057359a22a9 Mon Sep 17 00:00:00 2001
From: Lars Bilke <lars.bilke@ufz.de>
Date: Thu, 11 Jan 2024 21:47:50 +0100
Subject: [PATCH] Update default base_image to ubuntu:23.04.

---
 ogscm/building_blocks/ogs_base.py |  5 ++++-
 ogscm/cli.py                      |  2 +-
 ogscm/recipes/compiler.py         |  8 +-------
 ogscm/recipes/ogs.py              | 12 ++++++++----
 4 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/ogscm/building_blocks/ogs_base.py b/ogscm/building_blocks/ogs_base.py
index c19faf3..8bf44f9 100644
--- a/ogscm/building_blocks/ogs_base.py
+++ b/ogscm/building_blocks/ogs_base.py
@@ -38,7 +38,10 @@ class ogs_base(bb_base):
         """String representation of the building block"""
         self += comment(__doc__, reformat=False)
         self += python(devel=True, python2=False)
-        self += pip(pip="pip3", packages=["virtualenv", "pre-commit", "cmake-format"])
+        self += packages(ospackages=["python3-pip", "python3-virtualenv"])
+        self += shell(
+            commands=["pip3 install --break-system-packages pre-commit cmake-format"]
+        )
         self += packages(ospackages=self.__ospackages, epel=True)
         self += shell(commands=self.__commands)
 
diff --git a/ogscm/cli.py b/ogscm/cli.py
index 33c055c..642447e 100644
--- a/ogscm/cli.py
+++ b/ogscm/cli.py
@@ -48,7 +48,7 @@ def main():  # pragma: no cover
     general_g.add_argument(
         "--base_image",
         type=str,
-        default="ubuntu:22.04",
+        default="ubuntu:23.04",
         help="The base image.",
     )
     general_g.add_argument(
diff --git a/ogscm/recipes/compiler.py b/ogscm/recipes/compiler.py
index 1bc4969..58c9a9c 100644
--- a/ogscm/recipes/compiler.py
+++ b/ogscm/recipes/compiler.py
@@ -33,13 +33,7 @@ parse_g.add_argument(
 local_args = parser.parse_known_args()[0]
 
 if local_args.compiler_version == "":
-    if local_args.compiler == "clang":
-        local_args.compiler_version = "11"
-    else:
-        if hpccm.config.g_linux_distro == linux_distro.CENTOS:
-            local_args.compiler_version = "10"  # required for std::filesystem
-        else:
-            local_args.compiler_version = None  # Use default
+    local_args.compiler_version = None  # Use default
 
 # set image file name
 compiler_version_string = local_args.compiler_version
diff --git a/ogscm/recipes/ogs.py b/ogscm/recipes/ogs.py
index 94af010..48925f9 100644
--- a/ogscm/recipes/ogs.py
+++ b/ogscm/recipes/ogs.py
@@ -371,7 +371,7 @@ if local_args.ogs != "clean":
                 bootstrap_opts=boost_bootsrap_opts,
                 ldconfig=True,
                 sourceforge=local_args.boost_sourceforge,
-                version="1.75.0",  # versions["minimum_version"]["boost"], # is too old for gcc 11
+                version="1.78.0",  # versions["minimum_version"]["boost"], # is too old for gcc 12
             )
             Stage0 += environment(variables={"BOOST_ROOT": "/usr/local/boost"})
         Stage0 += packages(
@@ -450,7 +450,9 @@ if local_args.ogs != "clean":
             qt_install_dir = "/opt/qt"
             qt_version = versions["minimum_version"]["qt"]
             qt_dir = f"{qt_install_dir}/{qt_version}/gcc_64"
-            Stage0 += pip(pip="pip3", packages=["aqtinstall==3.1.6"])
+            Stage0 += shell(
+                commands=["pip3 install --break-system-packages aqtinstall==3.1.6"]
+            )
             Stage0 += shell(
                 commands=[
                     f"aqt install-qt --outputdir {qt_install_dir} linux desktop {qt_version} gcc_64",
@@ -600,9 +602,11 @@ if local_args.docs:
         commands=[
             "wget https://www.doxygen.nl/files/doxygen-1.9.6.linux.bin.tar.gz",
             "tar xf doxygen-1.9.6.linux.bin.tar.gz -C /usr/local --strip-components=1",
+            "pip3 install --break-system-packages lizard",
         ],
     )
-    Stage0 += pip(pip="pip3", packages=["lizard", "pandas"])
+    Stage0 += packages(ospackages=["python3-pandas"])
+
     cpp_dep_commit = "17ea25894333813fa4798b40f82d381cefcad0b8"
     Stage0 += generic_cmake(
         directory=f"cpp-dependencies-{cpp_dep_commit}",
@@ -615,7 +619,7 @@ if local_args.docs:
         toolchain=toolchain,
     )
 if local_args.gcovr:
-    Stage0 += pip(pip="pip3", packages=["gcovr"])
+    Stage0 += shell(commands=["pip3 install --break-system-packages gcovr"])
 
 if local_args.dev:
     Stage0 += packages(
-- 
GitLab