diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5c1d7183b..9560ffe2f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,7 +8,7 @@ on: pull_request: branches: [ "main" ] -# Keep the following in sync with Documentation/gh-pages/source/compiling.rst ! +# Keep the following in sync with Documentation/gh-pages/source/setup_manual.rst ! jobs: ubuntu_20_04: strategy: @@ -51,20 +51,14 @@ jobs: source root/bin/thisroot.sh && source install/bin/kasperenv.sh && UnitTestKasper shell: bash - fedora_37: + fedora_40: strategy: matrix: use_clang: [false] # FIXME add "true" after solving https://github.com/KATRIN-Experiment/Kassiopeia/issues/87 runs-on: ubuntu-latest - container: fedora:37 + container: fedora:40 steps: - uses: actions/checkout@v3 - - name: Run workaround for log4cxx bug (no longer needed with Fedora 39) - run: | - dnf update -y - dnf install -y --setopt=install_weak_deps=False dnf-plugins-core - dnf clean all - dnf copr enable thofmann/log4xx-1.x -y - name: Install dependencies run: | dnf install -y \ diff --git a/Docker/packages.full b/Docker/packages.full index 07a1543c6..b3f4884c3 100644 --- a/Docker/packages.full +++ b/Docker/packages.full @@ -3,6 +3,8 @@ vim zsh zsh-syntax-highlighting htop +diffutils +paraview root root-notebook diff --git a/Dockerfile b/Dockerfile index 932c5545e..ee551fd03 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,8 +10,7 @@ ARG KASSIOPEIA_GIT_COMMIT="" ARG KASSIOPEIA_CPUS="" # --- runtime-base --- -# NOTE: For Fedora 39, remove marked lines below -FROM fedora:38 as runtime-base +FROM fedora:40 as runtime-base ARG KASSIOPEIA_UID ARG KASSIOPEIA_USER ARG KASSIOPEIA_GID @@ -19,13 +18,6 @@ ARG KASSIOPEIA_GROUP LABEL description="Runtime base container" -# TODO REMOVE FOR FEDORA 39 -RUN dnf update -y \ - && dnf install -y --setopt=install_weak_deps=False dnf-plugins-core \ - && dnf clean all -RUN dnf copr enable thofmann/log4xx-1.x -y -# END TODO - COPY Docker/packages.runtime packages RUN dnf update -y \ && dnf install -y --setopt=install_weak_deps=False $(cat packages) \ @@ -144,6 +136,7 @@ RUN pip3 install --no-cache-dir jupyterlab \ && pip3 install --no-cache-dir jupyter-server-proxy \ && pip3 install --no-cache-dir jupyterhub \ && pip3 install --no-cache-dir ipympl \ + && pip3 install --no-cache-dir uproot \ && pip3 install --no-cache-dir iminuit # Ensure if LDAP is used on a JupyterHub, user names are correctly resolved diff --git a/Documentation/gh-pages/source/setup_manual.rst b/Documentation/gh-pages/source/setup_manual.rst index b61169dad..b671c70d9 100644 --- a/Documentation/gh-pages/source/setup_manual.rst +++ b/Documentation/gh-pages/source/setup_manual.rst @@ -100,7 +100,7 @@ On a RedHat/Fedora Linux system, the packages can be installed through the comma boost-devel fftw-devel gsl-devel hdf5-devel libomp-devel liburing-devel libxml2-devel log4cxx-devel \ ocl-icd-devel openmpi-devel openssl-devel sqlite-devel vtk-devel zlib-devel -Tested on Fedora Linux 37. +Tested on Fedora Linux 40. Required dependencies ---------------------- diff --git a/Kassiopeia/Objects/Include/KSObject.h b/Kassiopeia/Objects/Include/KSObject.h index a4ba1a3ac..5f02dd2d0 100644 --- a/Kassiopeia/Objects/Include/KSObject.h +++ b/Kassiopeia/Objects/Include/KSObject.h @@ -3,6 +3,7 @@ #include "KSObjectsMessage.h" #include "KTagged.h" +#include namespace Kassiopeia { @@ -53,7 +54,7 @@ class KSObject : public katrin::KTagged XType* fObject; }; - mutable KSHolder* fHolder; + mutable std::unique_ptr fHolder; }; inline KSObject::KSHolder::KSHolder() = default; @@ -141,12 +142,8 @@ template<> inline const KSObject* KSObject::As() const template inline void KSObject::Set(XType* anObject) { - if (fHolder != nullptr) { - delete fHolder; - fHolder = nullptr; - } auto* tHolder = new KSHolderTemplate(anObject); - fHolder = tHolder; + fHolder = std::unique_ptr(tHolder); return; } diff --git a/Kassiopeia/Objects/Source/KSObject.cxx b/Kassiopeia/Objects/Source/KSObject.cxx index e33b0af8f..8660d414a 100644 --- a/Kassiopeia/Objects/Source/KSObject.cxx +++ b/Kassiopeia/Objects/Source/KSObject.cxx @@ -3,8 +3,8 @@ namespace Kassiopeia { -KSObject::KSObject() : KTagged(), fHolder(nullptr) {} -KSObject::KSObject(const KSObject& aCopy) : KTagged(aCopy), fHolder(nullptr) {} +KSObject::KSObject() : KTagged() {}; +KSObject::KSObject(const KSObject& aCopy) : KTagged(aCopy) {} KSObject::~KSObject() = default; } // namespace Kassiopeia diff --git a/kasperenv.sh.in b/kasperenv.sh.in index b77d87467..903ce438d 100755 --- a/kasperenv.sh.in +++ b/kasperenv.sh.in @@ -14,6 +14,7 @@ if [ -n "${KASPERSYS}" ] OLD_PKGCFGPATH=${OLD_KASPERSYS}/lib/pkgconfig: OLD_PYTHONPATH=${OLD_KASPERSYS}/lib/python: OLD_CMAKE_PREF=${OLD_KASPERSYS}: + OLD_ROOT_INCLUDE_PATH=${OLD_KASPERSYS}/include: fi if [ -n "${KASPER_INSTALL}" ] @@ -24,6 +25,7 @@ if [ -n "${KASPER_INSTALL}" ] OLD_PKGCFGPATH=${OLD_KASPER_INSTALL}/lib/pkgconfig: OLD_PYTHONPATH=${OLD_KASPER_INSTALL}/lib/python: OLD_CMAKE_PREF=${OLD_KASPER_INSTALL}: + OLD_ROOT_INCLUDE_PATH=${OLD_KASPER_INSTALL}/include: fi if [ -n "${KASPER_SOURCE}" ] @@ -36,6 +38,7 @@ export KASPER_INSTALL=@KASPER_INSTALL_DIR@ KASPER_INSTALL_BIN=@BIN_INSTALL_DIR@ KASPER_INSTALL_LIB=@LIB_INSTALL_DIR@ KASPER_INSTALL_CACHE=@CACHE_INSTALL_DIR@ +KASPER_INSTALL_INCLUDE=@INCLUDE_INSTALL_DIR@ printf "\033[32;1m** KASPER source directory set to ${KASPER_SOURCE}\033[0m\n" printf "\033[32;1m** KASPER install directory set to ${KASPER_INSTALL}\033[0m\n" @@ -67,10 +70,23 @@ fi export KEMFIELD_CACHE mkdir -p ${KEMFIELD_CACHE} -export PATH=${KASPER_INSTALL_BIN}:$(echo $PATH | sed 's/${OLD_PATH}//g') -export LD_LIBRARY_PATH=${KASPER_INSTALL_LIB}:$(echo $LD_LIBRARY_PATH | sed 's/${OLD_LDLIBPATH}//g') -export PKG_CONFIG_PATH=${KASPER_INSTALL_LIB}/pkgconfig:$(echo $PKG_CONFIG_PATH | sed 's/${OLD_PKGCFGPATH}//g') -export PYTHONPATH=${KASPER_INSTALL_LIB}/python:$(echo $PYTHONPATH | sed 's/${OLD_PYTHONPATH}//g') -export CMAKE_PREFIX_PATH=${KASPER_INSTALL}:$(echo $CMAKE_PREFIX_PATH | sed 's/${OLD_CMAKE_PREF}//g') + +[[ -n $OLD_PATH ]] && export PATH=$(echo $PATH | sed "s;${OLD_PATH};;g") +export PATH=${KASPER_INSTALL_BIN}:$PATH + +[[ -n $OLD_LDLIBPATH ]] && export LD_LIBRARY_PATH=$(echo $LD_LIBRARY_PATH | sed "s;${OLD_LDLIBPATH};;g") +export LD_LIBRARY_PATH=${KASPER_INSTALL_LIB}:$LD_LIBRARY_PATH + +[[ -n $OLD_PKGCFGPATH ]] && export PKG_CONFIG_PATH=$(echo $PKG_CONFIG_PATH | sed "s;${OLD_PKGCFGPATH};;g") +export PKG_CONFIG_PATH=${KASPER_INSTALL_LIB}/pkgconfig:$PKG_CONFIG_PATH + +[[ -n $OLD_PYTHONPATH ]] && export PYTHONPATH=$(echo $PYTHONPATH | sed "s;${OLD_PYTHONPATH};;g") +export PYTHONPATH=${KASPER_INSTALL_LIB}/python:$PYTHONPATH + +[[ -n $OLD_CMAKE_PREF ]] && export CMAKE_PREFIX_PATH=$(echo $CMAKE_PREFIX_PATH | sed "s;${OLD_CMAKE_PREF};;g") +export CMAKE_PREFIX_PATH=${KASPER_INSTALL}:$CMAKE_PREFIX_PATH + +[[ -n $OLD_ROOT_INCLUDE_PATH ]] && export ROOT_INCLUDE_PATH=$(echo $ROOT_INCLUDE_PATH | sed "s;${OLD_ROOT_INCLUDE_PATH};;g") +export ROOT_INCLUDE_PATH=${KASPER_INSTALL_INCLUDE}:$ROOT_INCLUDE_PATH return 0