From 4faebb49618102ef853ff8a8c3bafe8f36004793 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Stolarczuk?= Date: Wed, 9 Sep 2020 21:05:02 +0200 Subject: [PATCH 01/10] doc: fix project's version displayed in doxygen docs --- doc/libpmemobj++.Doxyfile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/libpmemobj++.Doxyfile.in b/doc/libpmemobj++.Doxyfile.in index cc4103f9cf..db51627e58 100644 --- a/doc/libpmemobj++.Doxyfile.in +++ b/doc/libpmemobj++.Doxyfile.in @@ -23,7 +23,7 @@ PROJECT_NAME = "PMDK C++ bindings" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = "1.2.0" +PROJECT_NUMBER = @VERSION@ # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a From 5da10ebec3e2b188ddfc385de8cfbaac136da8a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Stolarczuk?= Date: Wed, 9 Sep 2020 21:10:23 +0200 Subject: [PATCH 02/10] doc: set only one column in doxygen's class index view fixes #854 --- doc/libpmemobj++.Doxyfile.in | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/libpmemobj++.Doxyfile.in b/doc/libpmemobj++.Doxyfile.in index db51627e58..b64055eefa 100644 --- a/doc/libpmemobj++.Doxyfile.in +++ b/doc/libpmemobj++.Doxyfile.in @@ -75,6 +75,11 @@ HIDE_UNDOC_CLASSES = YES QUIET = YES +# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which the alphabetical index list will be split. + +COLS_IN_ALPHA_INDEX = 1 + #--------------------------------------------------------------------------- # Configuration options related to the input files #--------------------------------------------------------------------------- From 427c5f07f032ee3aa76d14cc02a5e68a7b9227a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Stolarczuk?= Date: Wed, 9 Sep 2020 21:13:55 +0200 Subject: [PATCH 03/10] doc: make doxygen generation verbose --- doc/libpmemobj++.Doxyfile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/libpmemobj++.Doxyfile.in b/doc/libpmemobj++.Doxyfile.in index b64055eefa..bb8de1d952 100644 --- a/doc/libpmemobj++.Doxyfile.in +++ b/doc/libpmemobj++.Doxyfile.in @@ -73,7 +73,7 @@ HIDE_UNDOC_CLASSES = YES # standard output by doxygen. If QUIET is set to YES this implies that the # messages are off. -QUIET = YES +QUIET = NO # The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which the alphabetical index list will be split. From 79b9c6312f6dbc8680f1dde11ac2dbe5618138dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Stolarczuk?= Date: Fri, 24 Jul 2020 16:17:18 +0200 Subject: [PATCH 04/10] bump Fedora docker image version (28 -> 32) and set clang-format to fixed version (6.0). --- travis.yml | 2 +- .../images/{Dockerfile.fedora-28 => Dockerfile.fedora-32} | 6 +++--- utils/docker/images/Dockerfile.ubuntu-18.04 | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) rename utils/docker/images/{Dockerfile.fedora-28 => Dockerfile.fedora-32} (97%) diff --git a/travis.yml b/travis.yml index 73209c5fb1..d78e5c1e44 100644 --- a/travis.yml +++ b/travis.yml @@ -10,7 +10,7 @@ services: env: matrix: - TYPE=normal OS=ubuntu OS_VER=18.04 PUSH_IMAGE=1 - - TYPE=normal OS=fedora OS_VER=28 PUSH_IMAGE=1 AUTO_DOC_UPDATE=1 + - TYPE=normal OS=fedora OS_VER=32 PUSH_IMAGE=1 AUTO_DOC_UPDATE=1 - TYPE=normal OS=ubuntu OS_VER=18.04 COVERAGE=1 - TYPE=coverity OS=ubuntu OS_VER=18.04 diff --git a/utils/docker/images/Dockerfile.fedora-28 b/utils/docker/images/Dockerfile.fedora-32 similarity index 97% rename from utils/docker/images/Dockerfile.fedora-28 rename to utils/docker/images/Dockerfile.fedora-32 index ff625c2d63..0d7702f372 100644 --- a/utils/docker/images/Dockerfile.fedora-28 +++ b/utils/docker/images/Dockerfile.fedora-32 @@ -1,5 +1,5 @@ # -# Copyright 2016-2018, Intel Corporation +# Copyright 2016-2020, Intel Corporation # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -35,7 +35,7 @@ # # Pull base image -FROM fedora:28 +FROM fedora:32 MAINTAINER marcin.slusarz@intel.com # Install basic tools @@ -97,7 +97,7 @@ USER $USER # Set required environment variables ENV OS fedora -ENV OS_VER 28 +ENV OS_VER 32 ENV PACKAGE_MANAGER rpm ENV NOTTY 1 diff --git a/utils/docker/images/Dockerfile.ubuntu-18.04 b/utils/docker/images/Dockerfile.ubuntu-18.04 index cd304f97ee..a6c2357803 100644 --- a/utils/docker/images/Dockerfile.ubuntu-18.04 +++ b/utils/docker/images/Dockerfile.ubuntu-18.04 @@ -1,5 +1,5 @@ # -# Copyright 2016-2018, Intel Corporation +# Copyright 2016-2020, Intel Corporation # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -46,7 +46,7 @@ RUN apt-get update \ tzdata \ autoconf \ clang \ - clang-format \ + clang-format-6.0 \ cmake \ curl \ debhelper \ From af0d12de655d3db72c490fd027f0424378effd40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Stolarczuk?= Date: Wed, 9 Sep 2020 13:21:09 +0200 Subject: [PATCH 05/10] use ndctl from packages, rather than from source --- utils/docker/images/Dockerfile.fedora-32 | 6 +- utils/docker/images/Dockerfile.ubuntu-18.04 | 6 +- utils/docker/images/install-libndctl.sh | 92 --------------------- 3 files changed, 4 insertions(+), 100 deletions(-) delete mode 100755 utils/docker/images/install-libndctl.sh diff --git a/utils/docker/images/Dockerfile.fedora-32 b/utils/docker/images/Dockerfile.fedora-32 index 0d7702f372..fd3827b014 100644 --- a/utils/docker/images/Dockerfile.fedora-32 +++ b/utils/docker/images/Dockerfile.fedora-32 @@ -45,6 +45,7 @@ RUN dnf update -y \ automake \ clang \ cmake \ + daxctl-devel \ doxygen \ gcc \ gdb \ @@ -54,6 +55,7 @@ RUN dnf update -y \ make \ man \ ncurses-devel \ + ndctl-devel \ open-sans-fonts \ passwd \ perl-Text-Diff \ @@ -75,10 +77,6 @@ RUN dnf update -y \ bash-completion \ && dnf clean all -# Install libndctl -COPY install-libndctl.sh install-libndctl.sh -RUN ./install-libndctl.sh fedora - # Install valgrind COPY install-valgrind.sh install-valgrind.sh RUN ./install-valgrind.sh diff --git a/utils/docker/images/Dockerfile.ubuntu-18.04 b/utils/docker/images/Dockerfile.ubuntu-18.04 index a6c2357803..536a206c89 100644 --- a/utils/docker/images/Dockerfile.ubuntu-18.04 +++ b/utils/docker/images/Dockerfile.ubuntu-18.04 @@ -57,6 +57,8 @@ RUN apt-get update \ gdb \ git \ graphviz \ + libdaxctl-dev \ + libndctl-dev \ libunwind8-dev \ libtext-diff-perl \ pkg-config \ @@ -73,10 +75,6 @@ RUN apt-get update \ libudev-dev \ && rm -rf /var/lib/apt/lists/* -# Install libndctl -COPY install-libndctl.sh install-libndctl.sh -RUN ./install-libndctl.sh - # Install valgrind COPY install-valgrind.sh install-valgrind.sh RUN ./install-valgrind.sh diff --git a/utils/docker/images/install-libndctl.sh b/utils/docker/images/install-libndctl.sh deleted file mode 100755 index d90cbd0586..0000000000 --- a/utils/docker/images/install-libndctl.sh +++ /dev/null @@ -1,92 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright 2018, Intel Corporation -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# -# * Neither the name of the copyright holder nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# -# install-libndctl.sh - installs libndctl -# - -set -e - -OS=$1 - -echo "==== clone ndctl repo ====" -git clone https://github.com/pmem/ndctl.git -cd ndctl -git checkout tags/v60.1 - -if [ "$OS" = "fedora" ]; then - -echo "==== setup rpmbuild tree ====" -rpmdev-setuptree - -RPMDIR=$HOME/rpmbuild/ -VERSION=$(./git-version) -SPEC=./rhel/ndctl.spec - -echo "==== create source tarball =====" -git archive --format=tar --prefix="ndctl-${VERSION}/" HEAD | gzip > "$RPMDIR/SOURCES/ndctl-${VERSION}.tar.gz" - -echo "==== build ndctl ====" -./autogen.sh -./configure -make - -echo "==== update ndctl.spec ====" -# XXX: pre-process ndctl.spec to remove dependency on libpmem -# To be removed once ndctl v60 is available. -sed -i -e "/pkgconfig(libpmem)/d" -e "s/--with-libpmem//g" $SPEC - -echo "==== build ndctl packages ====" -rpmbuild -ba $SPEC - -echo "==== install ndctl packages ====" -rpm -i $RPMDIR/RPMS/x86_64/*.rpm - -echo "==== cleanup ====" -rm -rf $RPMDIR - -else - -echo "==== build ndctl ====" -./autogen.sh -./configure -make - -echo "==== install ndctl ====" -make install - -echo "==== cleanup ====" - -fi - -cd .. -rm -rf ndctl From 644b004b049ec98f1bd190f42d1111a88f5bdbee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Stolarczuk?= Date: Wed, 9 Sep 2020 17:06:30 +0200 Subject: [PATCH 06/10] bump PMDK version in CI --- utils/docker/images/install-pmdk.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/docker/images/install-pmdk.sh b/utils/docker/images/install-pmdk.sh index 35f59afa57..295bcbd720 100755 --- a/utils/docker/images/install-pmdk.sh +++ b/utils/docker/images/install-pmdk.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# Copyright 2018, Intel Corporation +# Copyright 2018-2020, Intel Corporation # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -38,7 +38,7 @@ set -e git clone https://github.com/pmem/pmdk cd pmdk -git checkout 1.5.1 +git checkout 1.5.2 sudo make -j2 install prefix=/opt/pmdk From 7c9aa1197cb5b3c4b6351ac3270d95bacefd81bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Stolarczuk?= Date: Thu, 10 Sep 2020 12:34:18 +0200 Subject: [PATCH 07/10] bump valgrind version in CI --- utils/docker/images/install-valgrind.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/utils/docker/images/install-valgrind.sh b/utils/docker/images/install-valgrind.sh index d1b01fad3b..25aa6c38f9 100755 --- a/utils/docker/images/install-valgrind.sh +++ b/utils/docker/images/install-valgrind.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# Copyright 2016-2018, Intel Corporation +# Copyright 2016-2020, Intel Corporation # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -38,10 +38,12 @@ set -e git clone --recursive https://github.com/pmem/valgrind.git cd valgrind -git checkout pmem-3.13 +# pmem-3.15: Merge pull request #81 from marcinslusarz/pmem-3.15 +git checkout 09f75f69683d862f8456f75484fcdc0dc5508900 + ./autogen.sh ./configure --prefix=/usr -make -make install +make -j$(nproc) +sudo make -j$(nproc) install cd .. rm -rf valgrind From 1dc946b81cf80c09a025419b091781dd48b857a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Stolarczuk?= Date: Thu, 17 Sep 2020 18:15:58 +0200 Subject: [PATCH 08/10] unset in CMake CLANG_FORMAT properly otherwise it will still use found (most likely, newer) clang-format. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9f8986fcf8..614ea2be15 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright 2018-2019, Intel Corporation +# Copyright 2018-2020, Intel Corporation # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -181,7 +181,7 @@ if(DEVELOPER_MODE) get_program_version(${CLANG_FORMAT} CLANG_FORMAT_VERSION) if(NOT (CLANG_FORMAT_VERSION VERSION_EQUAL CLANG_FORMAT_REQUIRED)) message(WARNING "required clang-format version is ${CLANG_FORMAT_REQUIRED}") - unset(CLANG_FORMAT) + unset(CLANG_FORMAT CACHE) endif() else() message(WARNING "clang-format not found - C++ sources will not be checked (needed version: ${CLANG_FORMAT_REQUIRED})") From f7c2314fffa84302b487c3cfbc9b98a136bb401f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Stolarczuk?= Date: Thu, 17 Sep 2020 19:29:28 +0200 Subject: [PATCH 09/10] docker: make build- and push-image scripts more verbose --- utils/docker/images/build-image.sh | 8 ++++---- utils/docker/images/push-image.sh | 13 +++++++------ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/utils/docker/images/build-image.sh b/utils/docker/images/build-image.sh index 21c1710176..4638d9a96f 100755 --- a/utils/docker/images/build-image.sh +++ b/utils/docker/images/build-image.sh @@ -49,20 +49,20 @@ function usage { "current directory." } -# Check if the first and second argument is nonempty -if [[ -z "$1" || -z "$2" ]]; then +echo "Check if the first and second argument are nonempty: \"${1}\", \"${2}\"" +if [[ -z "${1}" || -z "${2}" ]]; then usage exit 1 fi -# Check if the file Dockerfile.OS-VER exists +echo "Check if the file Dockerfile.${1}-${2} exists" if [[ ! -f "Dockerfile.$2" ]]; then echo "ERROR: wrong argument." usage exit 1 fi -# Build a Docker image tagged with ${DOCKERHUB_REPO}:1.6-OS-VER +echo "Build a Docker image tagged with ${DOCKERHUB_REPO}:1.6-${1}-${2}" docker build -t $1:1.6-$2 \ --build-arg http_proxy=$http_proxy \ --build-arg https_proxy=$https_proxy \ diff --git a/utils/docker/images/push-image.sh b/utils/docker/images/push-image.sh index 441eee170f..ba103c6ec1 100755 --- a/utils/docker/images/push-image.sh +++ b/utils/docker/images/push-image.sh @@ -49,14 +49,15 @@ function usage { "locally." } -# Check if the first argument is nonempty -if [[ -z "$1" ]]; then +OS__OS_VER=${1} +echo "Check if the first argument (OS-VER) is nonempty: \"${OS__OS_VER}\"" +if [[ -z "${OS__OS_VER}" ]]; then usage exit 1 fi -# Check if the image tagged with ${DOCKERHUB_REPO}:1.6-OS-VER exists locally -if [[ ! $(docker images -a | awk -v pattern="^${DOCKERHUB_REPO}:1.6-$1\$" \ +echo "Check if the image tagged with ${DOCKERHUB_REPO}:1.6-${OS__OS_VER} exists locally" +if [[ ! $(docker images -a | awk -v pattern="^${DOCKERHUB_REPO}:1.6-${OS__OS_VER}\$" \ '$1":"$2 ~ pattern') ]] then echo "ERROR: wrong argument." @@ -64,8 +65,8 @@ then exit 1 fi -# Log in to the Docker Hub +echo "Log in to the Docker Hub" docker login -u="$DOCKERHUB_USER" -p="$DOCKERHUB_PASSWORD" -# Push the image to the repository +echo "Push the image to the repository" docker push ${DOCKERHUB_REPO}:1.6-$1 From 4e29006c797bf5b8fe4fd6767468289dd9a6104e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Stolarczuk?= Date: Fri, 18 Sep 2020 11:10:10 +0200 Subject: [PATCH 10/10] docker: bump Ubuntu version to LTS (19.04 -> 20.04) --- travis.yml | 6 +++--- .../{Dockerfile.ubuntu-19.04 => Dockerfile.ubuntu-20.04} | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) rename utils/docker/images/{Dockerfile.ubuntu-19.04 => Dockerfile.ubuntu-20.04} (98%) diff --git a/travis.yml b/travis.yml index 1ccc9091ef..27b6d659b2 100644 --- a/travis.yml +++ b/travis.yml @@ -9,10 +9,10 @@ services: env: matrix: - - TYPE=normal OS=ubuntu OS_VER=19.04 PUSH_IMAGE=1 + - TYPE=normal OS=ubuntu OS_VER=20.04 PUSH_IMAGE=1 - TYPE=normal OS=fedora OS_VER=32 PUSH_IMAGE=1 AUTO_DOC_UPDATE=1 - - TYPE=normal OS=ubuntu OS_VER=19.04 COVERAGE=1 - - TYPE=coverity OS=ubuntu OS_VER=19.04 + - TYPE=normal OS=ubuntu OS_VER=20.04 COVERAGE=1 + - TYPE=coverity OS=ubuntu OS_VER=20.04 before_install: - echo $TRAVIS_COMMIT_RANGE diff --git a/utils/docker/images/Dockerfile.ubuntu-19.04 b/utils/docker/images/Dockerfile.ubuntu-20.04 similarity index 98% rename from utils/docker/images/Dockerfile.ubuntu-19.04 rename to utils/docker/images/Dockerfile.ubuntu-20.04 index 3b4a8b9331..2c12cf2a80 100644 --- a/utils/docker/images/Dockerfile.ubuntu-19.04 +++ b/utils/docker/images/Dockerfile.ubuntu-20.04 @@ -35,7 +35,7 @@ # # Pull base image -FROM ubuntu:19.04 +FROM ubuntu:20.04 MAINTAINER marcin.slusarz@intel.com # Additional parameters to build docker without building components @@ -96,6 +96,6 @@ USER $USER # Set required environment variables ENV OS ubuntu -ENV OS_VER 19.04 +ENV OS_VER 20.04 ENV PACKAGE_MANAGER deb ENV NOTTY 1