diff --git a/doc/INSTALL.md b/doc/INSTALL.md index 11bb8d9f10b..7f4969fe71a 100644 --- a/doc/INSTALL.md +++ b/doc/INSTALL.md @@ -12,13 +12,13 @@ For the following Linux distributions and package managers 0.9 packages are avai - [Arch Linux](https://aur.archlinux.org/packages/elektra/) - [Openwrt](https://github.com/openwrt/packages/tree/master/libs/elektra) -- [OpenSuse](https://software.opensuse.org/package/elektra) - [LinuxBrew](https://github.com/Linuxbrew/homebrew-core/blob/master/Formula/elektra.rb) ### Debian/Ubuntu We provide repositories for latest releases and latest builds from master (suite postfixed with `-unstable`) for following Debian-based distributions: +- Debian Bullseye - Debian Buster - Ubuntu Focal - Ubuntu Bionic @@ -58,12 +58,12 @@ To use our stable repositories with our latest releases, following steps need to ### Fedora -We provide repositories for latest releases and latest builds from master (suite postfixed with `-unstable`) for Fedora 33. +We provide repositories for latest releases and latest builds from master (suite postfixed with `-unstable`) for Fedora 33 and Fedora 34 For our stable repository with our latest releases: ```sh -wget https://rpms.libelektra.org/fedora-33/libelektra.repo -O libelektra.repo; +wget https://rpms.libelektra.org/fedora-34/libelektra.repo -O libelektra.repo; sudo mv libelektra.repo /etc/yum.repos.d/; sudo yum update ``` @@ -71,13 +71,13 @@ sudo yum update Or alternatively you can use dnf to add this repo: ```sh -sudo dnf config-manager --add-repo https://rpms.libelektra.org/fedora-33/libelektra.repo +sudo dnf config-manager --add-repo https://rpms.libelektra.org/fedora-34/libelektra.repo ``` For our latest builds from master append `-unstable` to the suite name: ```sh -wget https://rpms.libelektra.org/fedora-33-unstable/libelektra.repo -O libelektra.repo; +wget https://rpms.libelektra.org/fedora-34-unstable/libelektra.repo -O libelektra.repo; sudo mv libelektra.repo /etc/yum.repos.d/; sudo yum update ``` @@ -85,7 +85,27 @@ sudo yum update Or alternatively you can use dnf to add this repo: ```sh -sudo dnf config-manager --add-repo https://rpms.libelektra.org/fedora-33-unstable/libelektra.repo +sudo dnf config-manager --add-repo https://rpms.libelektra.org/fedora-34-unstable/libelektra.repo +``` + +### openSUSE + +We provide repositories for latest releases and latest builds from master (suite postfixed with `-unstable`) for openSUSE Leap 15.3 + +For our stable repository with our latest releases: + +> NOTE: stable packages will be available as of the `0.9.8` release. + +```sh +sudo zypper ar -f https://rpms.libelektra.org/opensuse-leap-15.3 libelektra +sudo zypper update +``` + +For our latest builds from master append `-unstable` to the suite name: + +```sh +sudo zypper ar -f https://rpms.libelektra.org/opensuse-leap-15.3-unstable libelektra-unstable +sudo zypper update ``` ### Install @@ -97,6 +117,8 @@ To get all packaged plugins, bindings and tools install: apt-get install libelektra5-all # For Fedora based distributions dnf install libelektra5-all +# For openSUSE +zypper install libelektra5-all ``` For a small installation with command-line tools available use: @@ -106,6 +128,8 @@ For a small installation with command-line tools available use: apt-get install elektra-bin # For Fedora based distributions dnf install elektra-bin +# For openSUSE +zypper install elektra-bin ``` To install all debugsym/debuginfo packages: @@ -115,6 +139,8 @@ To install all debugsym/debuginfo packages: apt-get install elektra-dbg # For Fedora based distributions dnf install elektra-dbg +# For openSUSE +zypper install elektra-dbg ``` If you want to install individual debugsym/debuginfo packages: @@ -124,6 +150,8 @@ If you want to install individual debugsym/debuginfo packages: apt-get install -dbgsym # e.g. apt-get install libelektra5-dbgsym # For Fedora based distributions dnf debuginfo-install # e.g. dnf debuginfo-install libelektra5 +# For openSUSE +zypper install -debuginfo # e.g. zypper install libelektra5-debuginfo ``` To build Debian/Ubuntu Packages from the source you might want to use: diff --git a/doc/news/_preparation_next_release.md b/doc/news/_preparation_next_release.md index 1db21768009..f9f6dc35897 100644 --- a/doc/news/_preparation_next_release.md +++ b/doc/news/_preparation_next_release.md @@ -243,7 +243,7 @@ _(Michael Tucek)_ ## Packaging -- <> +- Add packages for openSuse Leap 15.3. _(Robert Sowula)_ - <> - <> @@ -262,6 +262,7 @@ _(Michael Tucek)_ - Enable BuildKit features to leverage tmpfs to speed up `docker build` commands. _(Mihael Pranjić)_ - Bump Gradle to version 7.2. _(Mihael Pranjić)_ - Bump Debian Buster images to Bullseye and Stretch images to Buster. We still leave one Debian Stretch job due to upstream Debian LTS support until June 2022. _(Mihael Pranjić)_ +- Add Dockerfiles for openSUSE Leap 15.3 and CentOS Stream 8. _(Robert Sowula)_ - <> - Add docker image for OpenWrt package building. _(Robert Sowula)_ - Add files generated by docker when tutorial [run-all-tests-with-docker](https://www.libelektra.org/tutorials/run-all-tests-with-docker) is followed to .gitignore. _(Tobias Schubert @qwepoizt)_ @@ -278,6 +279,7 @@ _(Michael Tucek)_ - <> - <> - Move check stages that don't build the code to a dedicated stage, to avoid confusion when parallel builds are aborted. _(Robert Sowula)_ +- Add test stages for openSUSE and CentOS. _(Robert Sowula)_ - Use `tmpfs` in Docker to speed up the test suite. _(Mihael Pranjić)_ - Add OpenWrt package building stage to release pipeline. _(Robert Sowula)_ diff --git a/scripts/cmake/ElektraPackaging.cmake b/scripts/cmake/ElektraPackaging.cmake index 10cf9ba00fe..97976655321 100644 --- a/scripts/cmake/ElektraPackaging.cmake +++ b/scripts/cmake/ElektraPackaging.cmake @@ -132,6 +132,7 @@ if (UNIX) string (STRIP "${OS_PRETTY_NAME}" OS_PRETTY_NAME) endif (NOT APPLE) set (OS_DISTRIB "${OS_NAME}${OS_VERSION_ID}") + string (REPLACE " " "-" OS_DISTRIB "${OS_DISTRIB}") # replace spaces with dashes, since rpm-build can't handle paths with spaces if (NOT OS_DISTRIB) set (OS_DISTRIB "unix") endif (NOT OS_DISTRIB) @@ -357,7 +358,7 @@ if (UNIX) include (PackagingDebian) - elseif ("${OS_NAME}" MATCHES "Fedora|CentOS") + elseif ("${OS_NAME}" MATCHES "Fedora|CentOS|openSUSE") # no debuginfo for python3-elektra on fedora list (APPEND COMPONENTS_WITHOUT_DBGSYM "python3-elektra") set (FEDORA_DBG_PACKAGE_NAMES "") diff --git a/scripts/cmake/Modules/PackagingFedora.cmake b/scripts/cmake/Modules/PackagingFedora.cmake index 5573d4bd9cd..23c491337a2 100644 --- a/scripts/cmake/Modules/PackagingFedora.cmake +++ b/scripts/cmake/Modules/PackagingFedora.cmake @@ -66,6 +66,9 @@ set (CPACK_RPM_LIBELEKTRA${SO_VERSION}-EXPERIMENTAL_PACKAGE_DESCRIPTION "${PACKA set (CPACK_RPM_LIBELEKTRA${SO_VERSION}-EXPERIMENTAL_DEBUGINFO_PACKAGE "${PACKAGE_DEBUGINFO}") set (CPACK_RPM_LIBELEKTRA${SO_VERSION}-EXTRA_PACKAGE_NAME "${CPACK_COMPONENT_LIBELEKTRA${SO_VERSION}-EXTRA_DISPLAY_NAME}") +if ("${OS_NAME}" MATCHES "openSUSE") + set (CPACK_RPM_LIBELEKTRA${SO_VERSION}-EXTRA_PACKAGE_REQUIRES "glibc-locale") +endif () set (CPACK_RPM_LIBELEKTRA${SO_VERSION}-EXTRA_PACKAGE_SUGGESTS "elektra-doc, ${ALL_PLUGINS_STR}") set (CPACK_RPM_LIBELEKTRA${SO_VERSION}-EXTRA_PACKAGE_SUMMARY "${CPACK_COMPONENT_LIBELEKTRA${SO_VERSION}-EXTRA_DESCRIPTION}") set (CPACK_RPM_LIBELEKTRA${SO_VERSION}-EXTRA_PACKAGE_DESCRIPTION "${PACKAGE_DESCRIPTION}") @@ -82,6 +85,9 @@ set (CPACK_RPM_LIBELEKTRA-DEV_PACKAGE_SUMMARY "${CPACK_COMPONENT_LIBELEKTRA-DEV_ set (CPACK_RPM_LIBELEKTRA-DEV_PACKAGE_DESCRIPTION "${PACKAGE_DESCRIPTION}") set (CPACK_RPM_LIBELEKTRA${SO_VERSION}-AUGEAS_PACKAGE_NAME "${CPACK_COMPONENT_LIBELEKTRA${SO_VERSION}-AUGEAS_DISPLAY_NAME}") +if ("${OS_NAME}" MATCHES "openSUSE") + set (CPACK_RPM_LIBELEKTRA${SO_VERSION}-AUGEAS_PACKAGE_REQUIRES "augeas-lenses") +endif () set (CPACK_RPM_LIBELEKTRA${SO_VERSION}-AUGEAS_PACKAGE_SUMMARY "${CPACK_COMPONENT_LIBELEKTRA${SO_VERSION}-AUGEAS_DESCRIPTION}") set (CPACK_RPM_LIBELEKTRA${SO_VERSION}-AUGEAS_PACKAGE_DESCRIPTION "${PACKAGE_DESCRIPTION}") set (CPACK_RPM_LIBELEKTRA${SO_VERSION}-AUGEAS_DEBUGINFO_PACKAGE "${PACKAGE_DEBUGINFO}") @@ -142,7 +148,7 @@ set (CPACK_RPM_LIBELEKTRA${SO_VERSION}-LUA_PACKAGE_DESCRIPTION "${PACKAGE_DESCRI set (CPACK_RPM_LIBELEKTRA${SO_VERSION}-LUA_DEBUGINFO_PACKAGE "${PACKAGE_DEBUGINFO}") set (CPACK_RPM_LIBELEKTRA${SO_VERSION}-JAVA_PACKAGE_NAME "${CPACK_COMPONENT_LIBELEKTRA${SO_VERSION}-JAVA_DISPLAY_NAME}") -set (CPACK_RPM_LIBELEKTRA${SO_VERSION}-JAVA_PACKAGE_REQUIRES "java-1.8.0-openjdk-devel") +set (CPACK_RPM_LIBELEKTRA${SO_VERSION}-JAVA_PACKAGE_REQUIRES "java-11-openjdk-devel") set (CPACK_RPM_LIBELEKTRA${SO_VERSION}-JAVA_PACKAGE_SUMMARY "${CPACK_COMPONENT_LIBELEKTRA${SO_VERSION}-JAVA_DESCRIPTION}") set (CPACK_RPM_LIBELEKTRA${SO_VERSION}-JAVA_PACKAGE_DESCRIPTION "${PACKAGE_DESCRIPTION}") set (CPACK_RPM_LIBELEKTRA${SO_VERSION}-JAVA_DEBUGINFO_PACKAGE "${PACKAGE_DEBUGINFO}") @@ -154,7 +160,7 @@ set (CPACK_RPM_LIBELEKTRA${SO_VERSION}-FUSE_PACKAGE_DESCRIPTION "${PACKAGE_DESCR set (CPACK_RPM_LIBELEKTRA${SO_VERSION}-FUSE_DEBUGINFO_PACKAGE "OFF") set (CPACK_RPM_JAVA-ELEKTRA_PACKAGE_NAME "${CPACK_COMPONENT_JAVA-ELEKTRA_DISPLAY_NAME}") -set (CPACK_RPM_JAVA-ELEKTRA_PACKAGE_REQUIRES "java-1.8.0-openjdk-devel") +set (CPACK_RPM_JAVA-ELEKTRA_PACKAGE_REQUIRES "java-11-openjdk-devel") set (CPACK_RPM_JAVA-ELEKTRA_PACKAGE_SUMMARY "${CPACK_COMPONENT_JAVA-ELEKTRA_DESCRIPTION}") set (CPACK_RPM_JAVA-ELEKTRA_PACKAGE_DESCRIPTION "${PACKAGE_DESCRIPTION}") @@ -213,7 +219,11 @@ set (CPACK_RPM_ELEKTRA-BIN-EXTRA_PACKAGE_DESCRIPTION "${PACKAGE_DESCRIPTION}") set (CPACK_RPM_ELEKTRA-BIN-EXTRA_DEBUGINFO_PACKAGE "OFF") set (CPACK_RPM_ELEKTRA-QT-GUI_PACKAGE_NAME "${CPACK_COMPONENT_ELEKTRA-QT-GUI_DISPLAY_NAME}") -set (CPACK_RPM_ELEKTRA-QT-GUI_PACKAGE_REQUIRES "qt5-qtquickcontrols") +if ("${OS_NAME}" MATCHES "openSUSE") + set (CPACK_RPM_ELEKTRA-QT-GUI_PACKAGE_REQUIRES "libqt5-qtquickcontrols") +else () + set (CPACK_RPM_ELEKTRA-QT-GUI_PACKAGE_REQUIRES "qt5-qtquickcontrols") +endif () set (CPACK_RPM_ELEKTRA-QT-GUI_PACKAGE_SUMMARY "${CPACK_COMPONENT_ELEKTRA-QT-GUI_DESCRIPTION}") set (CPACK_RPM_ELEKTRA-QT-GUI_PACKAGE_DESCRIPTION "${PACKAGE_DESCRIPTION}") set (CPACK_RPM_ELEKTRA-QT-GUI_DEBUGINFO_PACKAGE "${PACKAGE_DEBUGINFO}") diff --git a/scripts/docker/centos/stream8/Dockerfile b/scripts/docker/centos/stream8/Dockerfile new file mode 100644 index 00000000000..9d0022a0033 --- /dev/null +++ b/scripts/docker/centos/stream8/Dockerfile @@ -0,0 +1,119 @@ +FROM quay.io/centos/centos:stream8 + +# Enable PowerTools repo +RUN dnf config-manager --set-enabled powertools +# Enable EPEL repo +RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm + +RUN dnf upgrade --refresh -y && dnf install -y \ + augeas-devel \ + bison \ + bison-devel \ + cmake \ + curl \ + dbus-devel \ + diffutils \ + dnf-plugins-core \ + file \ + findutils \ + flex \ + flex-devel \ + gcc-c++ \ + ghostscript \ + git \ + glib2 \ + gpgme-devel \ + graphviz \ + java-11-openjdk-devel \ + jna \ + libasan \ + libcurl-devel \ + libdrm-devel \ + libev-devel \ + libgcrypt-devel \ + libgit2-devel \ + libmarkdown-devel \ + libubsan \ + libuv-devel \ + libxml2-devel \ + llvm \ + lua-devel \ + make \ + ninja-build \ + openssl-devel \ + procps-ng \ + python3-devel \ + qt5-qtbase-devel \ + qt5-qtdeclarative-devel \ + qt5-qtsvg-devel \ + rpmdevtools \ + rpm-build \ + ruby-devel \ + rubygem-test-unit \ + strace \ + swig \ + systemd-devel \ + unzip \ + valgrind \ + wget \ + which \ + xerces-c-devel \ + yajl-devel \ + yaml-cpp-devel \ + zeromq-devel \ + zlib-devel \ + python3-pip \ + && dnf debuginfo-install -y \ + bison \ + flex \ + glib2 \ + glibc \ + gpgme \ + libgcrypt \ + ruby-libs \ + && dnf clean all -y + +# Build dependency for libelektra-fuse +RUN pip3 install wheel + +# Google Test +ENV GTEST_ROOT=/opt/gtest +ARG GTEST_VER=release-1.11.0 +RUN mkdir -p ${GTEST_ROOT} \ + && cd /tmp \ + && curl -o gtest.tar.gz \ + -L https://github.com/google/googletest/archive/${GTEST_VER}.tar.gz \ + && tar -zxvf gtest.tar.gz --strip-components=1 -C ${GTEST_ROOT} \ + && rm gtest.tar.gz + +# Create User:Group +# The id is important as jenkins docker agents use the same id that is running +# on the slaves to execute containers +ARG JENKINS_GROUPID +RUN groupadd \ + -g ${JENKINS_GROUPID} \ + -f \ + jenkins + +ARG JENKINS_USERID +RUN useradd \ + --create-home \ + --uid ${JENKINS_USERID} \ + --gid ${JENKINS_GROUPID} \ + --shell "/bin/bash" \ + jenkins + +# download and install gradle +RUN cd /tmp && wget https://services.gradle.org/distributions/gradle-7.2-bin.zip && unzip gradle-7.2-bin.zip && rm gradle-7.2-bin.zip && mv gradle-7.2 /opt/gradle +ENV PATH "${PATH}:/opt/gradle/bin" +ENV JAVA_HOME=/etc/alternatives/jre +RUN alternatives --auto java && alternatives --auto javac + +USER ${JENKINS_USERID} + +# extend PATH for user jenkins to include gradle +RUN echo "export PATH=${PATH}:/opt/gradle/bin" >> /home/jenkins/.bashrc + +# Set git config +RUN git config --global user.email 'Jenkins ' \ + && git config --global user.name 'Jenkins' diff --git a/scripts/docker/opensuse/15.3/Dockerfile b/scripts/docker/opensuse/15.3/Dockerfile new file mode 100644 index 00000000000..d40a5adbea4 --- /dev/null +++ b/scripts/docker/opensuse/15.3/Dockerfile @@ -0,0 +1,108 @@ +FROM opensuse/leap:15.3 + +RUN zypper update -y && zypper install -y \ + augeas-devel \ + augeas-lenses \ + bison \ + cmake \ + curl \ + dbus-1-devel \ + devscripts \ + diffutils \ + discount \ + dnf-plugins-core \ + file \ + findutils \ + flex \ + gcc-c++ \ + ghostscript \ + git \ + glib2 \ + glib2-devel \ + gzip \ + gpgme-devel \ + graphviz \ + graphviz-gd \ + java-11-openjdk-devel \ + lato-fonts \ + libcurl-devel \ + libdrm-devel \ + libev-devel \ + libgcrypt-devel \ + libgit2-devel \ + libmarkdown-devel \ + libqt5-qtbase-devel \ + libqt5-qtdeclarative-devel \ + libqt5-qtsvg-devel \ + libuv-devel \ + libxerces-c-devel \ + libxml2-devel \ + llvm \ + lua-devel \ + make \ + ninja \ + openssl-devel \ + procps \ + python3-devel \ + rpm-build \ + rpmdevtools \ + ruby-devel \ + strace \ + swig \ + systemd-devel \ + tar \ + unzip \ + valgrind \ + wget \ + which \ + xerces-c \ + libyajl-devel \ + yaml-cpp-devel \ + zeromq-devel \ + zlib-devel \ + python3-pip + +# Build dependency for libelektra-fuse +RUN pip3 install wheel + +# Google Test +ENV GTEST_ROOT=/opt/gtest +ARG GTEST_VER=release-1.11.0 +RUN mkdir -p ${GTEST_ROOT} \ + && cd /tmp \ + && curl -o gtest.tar.gz \ + -L https://github.com/google/googletest/archive/${GTEST_VER}.tar.gz \ + && tar -zxvf gtest.tar.gz --strip-components=1 -C ${GTEST_ROOT} \ + && rm gtest.tar.gz + +# Create User:Group +# The id is important as jenkins docker agents use the same id that is running +# on the slaves to execute containers +ARG JENKINS_GROUPID +RUN groupadd \ + -g ${JENKINS_GROUPID} \ + -f \ + jenkins + +ARG JENKINS_USERID +RUN useradd \ + --create-home \ + --uid ${JENKINS_USERID} \ + --gid ${JENKINS_GROUPID} \ + --shell "/bin/bash" \ + jenkins + +# download and install gradle +RUN cd /tmp && wget https://services.gradle.org/distributions/gradle-7.2-bin.zip && unzip gradle-7.2-bin.zip && rm gradle-7.2-bin.zip && mv gradle-7.2 /opt/gradle +ENV PATH "${PATH}:/opt/gradle/bin" +ENV JAVA_HOME=/etc/alternatives/jre +RUN alternatives --auto java && alternatives --auto javac + +USER ${JENKINS_USERID} + +# extend PATH for user jenkins to include gradle +RUN echo "export PATH=${PATH}:/opt/gradle/bin" >> /home/jenkins/.bashrc + +# Set git config +RUN git config --global user.email 'Jenkins ' \ + && git config --global user.name 'Jenkins' diff --git a/scripts/docker/opensuse/15.3/package.Dockerfile b/scripts/docker/opensuse/15.3/package.Dockerfile new file mode 100644 index 00000000000..01fe5550ec1 --- /dev/null +++ b/scripts/docker/opensuse/15.3/package.Dockerfile @@ -0,0 +1,40 @@ +FROM opensuse/leap:15.3 + +RUN zypper update -y \ + && zypper install -y \ + strace \ + tar \ + gzip \ + && zypper clean --all + +# Create User:Group +# The id is important as jenkins docker agents use the same id that is running +# on the slaves to execute containers +ARG JENKINS_GROUPID +RUN groupadd \ + -g ${JENKINS_GROUPID} \ + -f \ + jenkins + +ARG JENKINS_USERID +RUN useradd \ + --create-home \ + --uid ${JENKINS_USERID} \ + --gid ${JENKINS_GROUPID} \ + --shell "/bin/bash" \ + jenkins + +ENV ELEKTRA_ROOT=/opt/elektra/ +RUN mkdir -p ${ELEKTRA_ROOT} +COPY ./*.rpm ${ELEKTRA_ROOT} + +RUN zypper install -y --allow-unsigned-rpm ${ELEKTRA_ROOT}/* \ + && zypper clean --all + +RUN kdb mount-info \ + && mkdir -p `kdb sget system:/info/elektra/constants/cmake/KDB_DB_SPEC .` || true \ + && chown -R ${JENKINS_USERID} `kdb sget system:/info/elektra/constants/cmake/KDB_DB_SPEC .` \ + && chown -R ${JENKINS_USERID} `kdb sget system:/info/elektra/constants/cmake/KDB_DB_SYSTEM .` \ + && chown -R ${JENKINS_USERID} `kdb sget system:/info/elektra/constants/cmake/BUILTIN_DATA_FOLDER .` + +USER ${JENKINS_USERID} diff --git a/scripts/docker/opensuse/15.3/release.Dockerfile b/scripts/docker/opensuse/15.3/release.Dockerfile new file mode 100644 index 00000000000..3e716617d90 --- /dev/null +++ b/scripts/docker/opensuse/15.3/release.Dockerfile @@ -0,0 +1,42 @@ +FROM opensuse/leap:15.3 + +RUN zypper update -y \ + && zypper install -y \ + sudo \ + system-group-wheel \ + system-user-mail \ + vim \ + diffutils \ + && zypper clean --all + +ARG USERID=1000 +RUN useradd elektra --uid ${USERID} +RUN usermod -aG wheel elektra + +ENV ELEKTRA_ROOT=/opt/elektra/ +RUN mkdir -p ${ELEKTRA_ROOT} +COPY ./*.rpm ${ELEKTRA_ROOT} + +RUN zypper install -y --allow-unsigned-rpm ${ELEKTRA_ROOT}/* \ + && zypper clean --all + +RUN rm -rf ${ELEKTRA_ROOT} + +RUN kdb mount-info \ + && mkdir -p `kdb sget system:/info/elektra/constants/cmake/KDB_DB_SPEC .` || true \ + && chown -R ${USERID} `kdb sget system:/info/elektra/constants/cmake/KDB_DB_SPEC .` \ + && chown -R ${USERID} `kdb sget system:/info/elektra/constants/cmake/KDB_DB_SYSTEM .` \ + && chown -R ${USERID} `kdb sget system:/info/elektra/constants/cmake/BUILTIN_DATA_FOLDER .` + +RUN --mount=type=tmpfs,target=/tmp \ + --mount=type=tmpfs,target=/etc/kdb \ + --mount=type=tmpfs,target=/root/.cache/elektra \ + --mount=type=tmpfs,target=/root/.config \ + kdb run_all + +RUN echo "%wheel ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers + +USER ${USERID} +WORKDIR /home/elektra + +CMD ["/bin/bash","-l"] diff --git a/scripts/jenkins/Jenkinsfile b/scripts/jenkins/Jenkinsfile index 72cee1b79fc..8041be1e1d3 100644 --- a/scripts/jenkins/Jenkinsfile +++ b/scripts/jenkins/Jenkinsfile @@ -366,6 +366,20 @@ def dockerInit() { "./scripts/docker/fedora/34/Dockerfile" ) + /* openSUSE Leap 15.3 image*/ + DOCKER_IMAGES.opensuse_15_3 = dockerUtils.createDockerImageDesc( + "opensuse-15-3", dockerUtils.&idTesting, + "./scripts/docker/opensuse/15.3", + "./scripts/docker/opensuse/15.3/Dockerfile" + ) + + /* CentOS Stream 8 image*/ + DOCKER_IMAGES.centos_stream8 = dockerUtils.createDockerImageDesc( + "centos-stream-8", dockerUtils.&idTesting, + "./scripts/docker/centos/stream8", + "./scripts/docker/centos/stream8/Dockerfile" + ) + /* Image building the libelektra.org website */ DOCKER_IMAGES.website = dockerUtils.createDockerImageDesc( "website", dockerUtils.&idArtifact, @@ -446,6 +460,14 @@ def dockerInit() { false ) + /* openSuse Leap 15.3 image used to install previously built packages */ + DOCKER_IMAGES.opensuse_15_3_installed = dockerUtils.createDockerImageDesc( + "opensuse-15-3-installed", dockerUtils.&idTesting, + "./build/package", + "./scripts/docker/opensuse/15.3/release.Dockerfile", + false + ) + /* Image to build openwrt package */ DOCKER_IMAGES.openwrt_sdk = dockerUtils.createDockerImageDesc( 'openwrt-sdk', dockerUtils.&idTesting, @@ -543,6 +565,22 @@ def generateFullBuildStages() { CMAKE_FLAGS_BUILD_ALL ) + tasks << buildAndTest( + "opensuse-15-3", + DOCKER_IMAGES.opensuse_15_3, + CMAKE_FLAGS_BUILD_ALL+ + CMAKE_FLAGS_DEBUG, + [TEST.ALL, TEST.MEM, TEST.INSTALL] + ) + + tasks << buildAndTest( + "centos-stream-8", + DOCKER_IMAGES.centos_stream8, + CMAKE_FLAGS_BUILD_ALL+ + CMAKE_FLAGS_DEBUG, + [TEST.ALL, TEST.MEM, TEST.INSTALL] + ) + // Add a task that should build the whole project to catch all test errors // in a standard environment tasks << buildAndTest( @@ -1124,6 +1162,16 @@ def generateArtifactStages() { this.&updateFedoraChangelog, true ) + tasks << buildPackage( + "buildPackage/opensuse/leap/15.3", + DOCKER_IMAGES.opensuse_15_3, + "opensuse-leap-15.3", + "opensuse-leap-15.3", + DOCKER_IMAGES.opensuse_15_3_installed, + release.&publishRpmPackages, + this.&updateFedoraChangelog, + true + ) tasks << buildOpenwrtPackage(DOCKER_IMAGES.openwrt_sdk) diff --git a/scripts/jenkins/Jenkinsfile.release b/scripts/jenkins/Jenkinsfile.release index 69784b174e1..4d3e9e58155 100644 --- a/scripts/jenkins/Jenkinsfile.release +++ b/scripts/jenkins/Jenkinsfile.release @@ -209,6 +209,12 @@ def dockerInit() { './scripts/docker/fedora/34/Dockerfile' ) + DOCKER_IMAGES.opensuse_15_3 = dockerUtils.createDockerImageDesc( + "opensuse-15-3", dockerUtils.&idTesting, + "./scripts/docker/opensuse/15.3", + "./scripts/docker/opensuse/15.3/Dockerfile" + ) + /* Install and test the built packages with theses images. */ DOCKER_IMAGES.buster_installed = dockerUtils.createDockerImageDesc( 'debian-buster-installed', dockerUtils.&idArtifact, @@ -252,6 +258,13 @@ def dockerInit() { false ) + DOCKER_IMAGES.opensuse_15_3_installed = dockerUtils.createDockerImageDesc( + 'opensuse-15-3-installed', dockerUtils.&idArtifact, + './release-artifact/*/package/opensuse-leap15.3/', + './scripts/docker/opensuse/15.3/package.Dockerfile', + false + ) + /* Install packages for Docker image release */ DOCKER_IMAGES.buster_release = createDockerImageDescForRelease( 'elektra/elektra', @@ -295,6 +308,13 @@ def dockerInit() { false ) + DOCKER_IMAGES.opensuse_15_3_release = createDockerImageDescForRelease( + 'elektra/elektra', + './release-artifact/*/package/opensuse-leap15.3/', + './scripts/docker/opensuse/15.3/release.Dockerfile', + false + ) + /* Build Elektra's documentation with this image. * Also contains latex for pdf creation. */ @@ -388,6 +408,14 @@ def generateReleaseStages() { true // use placeholder dirs ) + tasks << buildRelease( + 'opensuse-15-3', + DOCKER_IMAGES.opensuse_15_3, + params.fedora_revision, + false, // do not bundle git repo + true // use placeholder dirs + ) + return tasks } @@ -420,6 +448,10 @@ def generateDockerBuildStagesWithPackagesInstalled() { DOCKER_IMAGES.bullseye_installed, 'debian-bullseye' ) + tasks << buildImageWithPackagesStage( + DOCKER_IMAGES.opensuse_15_3_installed, + 'opensuse-15-3' + ) // build website tasks << buildWebsite('debian-buster') @@ -466,6 +498,10 @@ def generateInstalledPackagesTestStages() { 'debian-bullseye-installed', DOCKER_IMAGES.bullseye_installed ) + tasks << testInstalledPackage( + 'opensuse-15-3-installed', + DOCKER_IMAGES.opensuse_15_3_installed + ) return tasks } @@ -572,6 +608,15 @@ def generatePublishStages() { params.fedora_revision ) + tasks << publish( + 'opensuse-15-3', + 'opensuse-leap15.3', + 'opensuse-leap-15.3', + 'opensuse-leap-15.3', + release.&publishRpmPackages, + params.fedora_revision + ) + tasks << buildDoc() // publish source package built in debian-buster stage @@ -646,6 +691,12 @@ def generateImageUploadStages() { debian_revision, 'bullseye' ) + tasks << publishImage( + DOCKER_IMAGES.opensuse_15_3_release, + 'opensuse-15-3', + fedora_revision, + 'opensuse-leap-15.3' + ) return tasks } @@ -694,7 +745,7 @@ def buildRelease(stageName, image, packageRevision='1', url: 'https://github.com/ElektraInitiative/ftp.git' } dir('prev-release-logs') { - sh "cp -R ../ftp/release-logs/${PREVIOUS_RELEASE_VERSION}/${stageName}/* ./" + sh "cp -R ../ftp/release-logs/${PREVIOUS_RELEASE_VERSION}/${stageName}/* ./ || touch installed_files" } sh "sh libelektra/scripts/release/release.sh ${packageRevision} ${PREVIOUS_RELEASE_VERSION}" sh "mv release.tar.gz ${stageName}-release.tar.gz" diff --git a/scripts/packaging/package.sh b/scripts/packaging/package.sh index 3eeb952e713..0e3ca97c644 100755 --- a/scripts/packaging/package.sh +++ b/scripts/packaging/package.sh @@ -42,7 +42,8 @@ CMAKE_ARGS_BASE="-DTARGET_PLUGIN_FOLDER='elektra5' \ -DTARGET_TEST_DATA_FOLDER=share/libelektra-test/test-data \ -DCPACK_PACKAGE_RELEASE=$PACKAGE_REVISION" -if [ "$DIST_NAME" = "Fedora" ]; then +# last disjunct matches all distribution names starting with openSUSE or CentOS +if [ "$DIST_NAME" = "Fedora" ] || case $DIST_NAME in "openSUSE"*) true ;; "CentOS"*) true ;; *) false ;; esac then CMAKE_ARGS_SPECIFIC="-DTARGET_LUA_CMOD_FOLDER=lib$LUA_LIB_SUFFIX/lua/$LUA_VERSION \ -DTARGET_LUA_LMOD_FOLDER=share/lua/$LUA_VERSION \ diff --git a/scripts/release/release.sh b/scripts/release/release.sh index ed234d769dd..846c301fe48 100755 --- a/scripts/release/release.sh +++ b/scripts/release/release.sh @@ -226,11 +226,11 @@ build_package() { } memcheck() { - # With ENABLE_DEBUG="OFF" testkdb_allplugins detects a memleak on buster, bullseye and bionic, + # With ENABLE_DEBUG="OFF" testkdb_allplugins detects a memleak on buster, bullseye, bionic and opensuse 15.3, # therefore the tests are disabled for theses distribitions. # discussed in: https://github.com/ElektraInitiative/libelektra/pull/3530 # see also: https://github.com/ElektraInitiative/libelektra/pull/3855 - if [ "$VERSION_CODENAME" = "buster" ] || [ "$VERSION_CODENAME" = "bullseye" ] || [ "$VERSION_CODENAME" = "bionic" ]; then + if [ "$VERSION_CODENAME" = "buster" ] || [ "$VERSION_CODENAME" = "bullseye" ] || [ "$VERSION_CODENAME" = "bionic" ] || [ "$VERSION_CODENAME" = "opensuse-leap15.3" ]; then cmemcheck 'testkdb_allplugins' else cmemcheck