diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml new file mode 100644 index 00000000..098b958e --- /dev/null +++ b/.github/workflows/c-cpp.yml @@ -0,0 +1,17 @@ +name: C/C++ CI + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: make tests + run: make tests GCOV_CCFLAGS= diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index d8661f81..00000000 --- a/Jenkinsfile +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/groovy -/* Copyright (C) 2019-2023 Intel Corporation - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted for any purpose (including commercial purposes) - * provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions, and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions, and the following disclaimer in the - * documentation and/or materials provided with the distribution. - * - * 3. In addition, redistributions of modified forms of the source or binary - * code must carry prominent notices stating that the original code was - * changed and the date of the change. - * - * 4. All publications or advertising materials mentioning features or use of - * this software are asked, but not required, to acknowledge that it was - * developed by Intel Corporation and credit the contributors. - * - * 5. Neither the name of Intel Corporation, nor the name of any Contributor - * 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 HOLDER 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. - */ -// To use a test branch (i.e. PR) until it lands to master -// I.e. for testing library changes -//@Library(value="pipeline-lib@your_branch") _ - -/* groovylint-disable-next-line CompileStatic */ -packageBuildingPipelineDAOSTest(['make args': '-f Makefile-rpm.mk', - 'coverity': 'daos-stack/daos', - 'distros': ['el8', 'el9', 'leap15', 'ubuntu20.04'], - 'test-tag': 'pr,-hw']) diff --git a/Makefile-rpm.mk b/Makefile-rpm.mk deleted file mode 100644 index 811e2931..00000000 --- a/Makefile-rpm.mk +++ /dev/null @@ -1,16 +0,0 @@ -NAME := raft -SRC_EXT := gz - -GIT_SHA1 := $(shell git rev-parse HEAD) -GIT_SHORT := $(shell git rev-parse --short HEAD) -GIT_NUM_COMMITS := $(shell git rev-list HEAD --count) - -GIT_INFO := $(GIT_NUM_COMMITS).g$(GIT_SHORT) - -BUILD_DEFINES := --define "relval .$(GIT_INFO)" -RPM_BUILD_OPTIONS := $(BUILD_DEFINES) - -include packaging/Makefile_packaging.mk - -$(NAME)-$(VERSION).tar.gz: - git archive --format tar --prefix $(NAME)-$(VERSION)/ HEAD | gzip > $@ diff --git a/debian/changelog b/debian/changelog deleted file mode 100755 index 5561b2be..00000000 --- a/debian/changelog +++ /dev/null @@ -1,111 +0,0 @@ -raft (0.11.0-1) unstable; urgency=medium - - [ Li Wei ] - * Add raft_cbs_t.get_rand - * Introduce logging levels - - -- Li Wei Wed, 14 Feb 2024 15:43:00 +0900 - -raft (0.10.1-1) unstable; urgency=medium - - [ Li Wei ] - * Fix conflicts in a unit test - - -- Li Wei Wed, 07 Jun 2023 15:41:00 +0900 - -raft (0.10.0-1) unstable; urgency=medium - - [ Li Wei ] - * Add leadership lease - * Let leaders step down voluntarily when they can't maintain leases from majority - - -- Li Wei Mon, 05 Jun 2023 09:07:00 +0900 - -raft (0.9.2-1) unstable; urgency=medium - - [ Li Wei ] - * Fix assertion failures in raft_recv_requestvote - - -- Li Wei Mon, Feb 13 2023 10:14:00 +0800 - -raft (0.9.1-1) unstable; urgency=medium - - [ Li Wei ] - * Fix membership changes - * Fix node ID initialization - - -- Li Wei Wed, Apr 06 2022 20:04:00 +0800 - -raft (0.9.0-1) unstable; urgency=medium - - [ Li Wei ] - * Remove the upstream optimization that allows election-less leaders - * Update packaging - - -- Li Wei Wed, Jan 05 2022 14:51:00 +0800 - -raft (0.8.1-1) unstable; urgency=medium - - [ Li Wei ] - * Optimize InstallSnapshot performance - * Update packaging - - -- Li Wei Mon, Aug 30 2021 17:47:00 +0800 - -raft (0.8.0-1) unstable; urgency=medium - - [ Li Wei ] - * Add Pre-Vote - - -- Li Wei Mon, May 31 2021 17:25:00 +0800 - -raft (0.7.3-1) unstable; urgency=medium - - [ Li Wei ] - * Fix disruptions from removed replicas - - -- Li Wei Wed, Feb 24 2021 11:53:00 +0800 - -raft (0.7.2-1) unstable; urgency=medium - - [ Kenneth Cain ] - * Fix more Coverity issues in test_server - - -- Kenneth Cain Tue, Feb 09 2021 15:20:00 +0800 - -raft (0.7.1-1) unstable; urgency=medium - - [ Li Wei ] - * Fix Coverity issues - - -- Li Wei Wed, Dec 02 2020 11:30:00 +0800 - -raft (0.7.0-1) unstable; urgency=medium - - [ Li Wei ] - * Use 63-bit log indices and terms - - -- Li Wei Tue, Nov 10 2020 10:12:37 +0800 - -raft (0.6.0-1) unstable; urgency=medium - - [ Brian J. Murrell ] - * Update to 0.6.0 - - -- Brian J. Murrell Tue, 25 Aug 2020 15:31:48 -0400 - -raft (0.5.0-2) unstable; urgency=medium - - [ John Malmberg ] - * Packaging changes - * Experimental build for daos-stack project - - -- John Malmberg Mon, 07 Oct 2019 14:43:00 +0000 - -raft (0.5.0-1) unstable; urgency=medium - - [ John Malmberg ] - * Upstream release - * Experimental build for daos-stack project - - -- John Malmberg Wed, 03 Jul 2019 19:59:53 +0000 diff --git a/debian/compat b/debian/compat deleted file mode 100644 index b4de3947..00000000 --- a/debian/compat +++ /dev/null @@ -1 +0,0 @@ -11 diff --git a/debian/control b/debian/control deleted file mode 100644 index ed8c76a2..00000000 --- a/debian/control +++ /dev/null @@ -1,35 +0,0 @@ -Source: raft -Priority: optional -Maintainer: daos-stack -Build-Depends: debhelper (>= 11) -Standards-Version: 4.1.3 -Section: libs -Homepage: https://github.com/willemt/raft -Vcs-Browser: https://github.com/willemt/raft -Vcs-Git: https://github.com/willemt/raft.git - -Package: libraft-dev -Section: libdevel -Architecture: any -Multi-Arch: same -Depends: libraft0 (= ${binary:Version}), ${misc:Depends} -Description: C implementation of the Raft consensus protocol - Raft is a consensus algorithm that is designed to be easy to understand. - It's equivalent to Paxos in fault-tolerance and performance. The difference - is that it's decomposed into relatively independent subproblems, and it - cleanly addresses all major pieces needed for practical systems. - . - This package is needed to compile programs against raft. - It contains the header files and links needed for compiling. - -Package: libraft0 -Architecture: any -Multi-Arch: same -Depends: ${shlibs:Depends}, ${misc:Depends} -Description: C implementation of the Raft consensus protocol - Raft is a consensus algorithm that is designed to be easy to understand. - It's equivalent to Paxos in fault-tolerance and performance. The difference - is that it's decomposed into relatively independent subproblems, and it - cleanly addresses all major pieces needed for practical systems. - . - This package contains the shared libraries. diff --git a/debian/copyright b/debian/copyright deleted file mode 100644 index 0e251663..00000000 --- a/debian/copyright +++ /dev/null @@ -1,53 +0,0 @@ -Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: raft -Source: https://github.com/daos-stack/raft - -Files: * -Copyright: 2013, Willem-Hendrik Thiart -License: BSD-3-Clause - Copyright (c) 2013, Willem-Hendrik Thiart - All rights reserved. - . - 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. - * The names of its contributors may not 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 WILLEM-HENDRIK THIART 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. - -# If you want to use GPL v2 or later for the /debian/* files use -# the following clauses, or change it to suit. Delete these two lines -Files: debian/* -Copyright: 2019 Intel Corporation -License: GPL-2+ - This package is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - . - This package is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - . - You should have received a copy of the GNU General Public License - along with this program. If not, see - . - On Debian systems, the complete text of the GNU General - Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". - diff --git a/debian/libraft-dev.dirs b/debian/libraft-dev.dirs deleted file mode 100644 index 44188162..00000000 --- a/debian/libraft-dev.dirs +++ /dev/null @@ -1,2 +0,0 @@ -usr/lib -usr/include diff --git a/debian/libraft-dev.install b/debian/libraft-dev.install deleted file mode 100644 index 41a14144..00000000 --- a/debian/libraft-dev.install +++ /dev/null @@ -1 +0,0 @@ -usr/include/* diff --git a/debian/libraft0.dirs b/debian/libraft0.dirs deleted file mode 100644 index 68457717..00000000 --- a/debian/libraft0.dirs +++ /dev/null @@ -1 +0,0 @@ -usr/lib diff --git a/debian/libraft0.install b/debian/libraft0.install deleted file mode 100644 index 36662362..00000000 --- a/debian/libraft0.install +++ /dev/null @@ -1 +0,0 @@ -usr/lib/*/lib*.so diff --git a/debian/raft-docs.docs b/debian/raft-docs.docs deleted file mode 100644 index efea0a6a..00000000 --- a/debian/raft-docs.docs +++ /dev/null @@ -1,2 +0,0 @@ -README.Debian -README.source diff --git a/debian/rules b/debian/rules deleted file mode 100755 index 7ac90707..00000000 --- a/debian/rules +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/make -f -# See debhelper(7) (uncomment to enable) -# output every command that modifies files on the build system. -#export DH_VERBOSE = 1 - - -# see FEATURE AREAS in dpkg-buildflags(1) -#export DEB_BUILD_MAINT_OPTIONS = hardening=+all - -# see ENVIRONMENT in dpkg-buildflags(1) -# package maintainers to append CFLAGS -#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic -# package maintainers to append LDFLAGS -#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed - -name := raft -prefix := /usr -includedir := $(prefix)/include -libdir := $(prefix)/lib/$(DEB_BUILD_MULTIARCH) -buildroot := debian/tmp -install_includedir := $(buildroot)$(includedir) -install_libdir := $(buildroot)$(libdir) - - - -%: - dh $@ - -override_dh_auto_install: - mkdir -p $(install_libdir) - mkdir -p $(install_includedir) - cp libraft.so $(install_libdir) - cp include/* $(install_includedir) - diff --git a/debian/source/format b/debian/source/format deleted file mode 100644 index 163aaf8d..00000000 --- a/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (quilt) diff --git a/packaging/Dockerfile.centos.7 b/packaging/Dockerfile.centos.7 deleted file mode 100644 index 189ea1e4..00000000 --- a/packaging/Dockerfile.centos.7 +++ /dev/null @@ -1,56 +0,0 @@ -# -# Copyright 2018-2022, Intel Corporation -# -# 'recipe' for Docker to build an RPM -# - -# Pull base image -FROM centos:centos7 -LABEL maintainer="daos@daos.groups.io" - -# Use local repo server if present -ARG REPO_FILE_URL -RUN set -e; \ - if [ -n "$REPO_FILE_URL" ]; then \ - cd /etc/yum.repos.d/ && \ - curl -k -f -o daos_ci-centos7-artifactory.repo.tmp \ - "$REPO_FILE_URL"daos_ci-centos7-artifactory.repo && \ - for file in *.repo; do \ - true > $file; \ - done; \ - mv daos_ci-centos7-artifactory.repo{.tmp,}; \ - fi; \ - yum -y install dnf; \ - yum clean all; \ - dnf --disablerepo \*epel\* -y install epel-release \ - dnf-plugins-core; \ - if [ -n "$REPO_FILE_URL" ]; then \ - dnf -y --quiet config-manager --disable epel; \ - fi; \ - dnf -y update epel-release; \ - dnf -y clean all - -# use same UID as host and default value of 1000 if not specified -ARG UID=1000 - -# Update distribution -#Nothing to do for CentOS - -# Install basic tools -RUN dnf install -y epel-release -RUN dnf install -y mock make rpm-build curl createrepo rpmlint redhat-lsb-core \ - git python-srpm-macros dnf && dnf -y clean all - -# Add build user (to keep rpmbuild happy) -ENV USER build -ENV PASSWD build -RUN useradd -u $UID -ms /bin/bash $USER -RUN echo "$USER:$PASSWD" | chpasswd -# add the user to the mock group so it can run mock -RUN usermod -a -G mock $USER - -# mock in Docker needs to use the old-chroot option -RUN grep use_nspawn /etc/mock/site-defaults.cfg || \ - echo "config_opts['use_nspawn'] = False" >> /etc/mock/site-defaults.cfg - -RUN chmod g+w /etc/mock/default.cfg diff --git a/packaging/Dockerfile.coverity b/packaging/Dockerfile.coverity deleted file mode 100755 index 7eed2c35..00000000 --- a/packaging/Dockerfile.coverity +++ /dev/null @@ -1,32 +0,0 @@ -# -# Copyright 2018-2020, Intel Corporation -# -# 'recipe' for Docker to build for a Coverity scan. -# - -# Pull base image -FROM fedora:latest -MAINTAINER daos-stack - -# use same UID as host and default value of 1000 if not specified -ARG UID=1000 - -# Install basic tools -RUN dnf -y install mock make rpm-build curl createrepo rpmlint redhat-lsb-core \ - git python-srpm-macros rpmdevtools -RUN dnf -y makecache && dnf -y install gcc - -# Add build user (to keep rpmbuild happy) -ENV USER build -ENV PASSWD build -RUN useradd -u $UID -ms /bin/bash $USER -RUN echo "$USER:$PASSWD" | chpasswd -# add the user to the mock group so it can run mock -RUN usermod -a -G mock $USER - -# mock in Docker needs to use the old-chroot option -RUN grep use_nspawn || \ - echo "config_opts['use_nspawn'] = False" >> /etc/mock/site-defaults.cfg - -RUN chmod g+w /etc/mock/* - diff --git a/packaging/Dockerfile.mockbuild b/packaging/Dockerfile.mockbuild deleted file mode 100644 index 76a6e941..00000000 --- a/packaging/Dockerfile.mockbuild +++ /dev/null @@ -1,72 +0,0 @@ -# -# Copyright 2018-2024 Intel Corporation -# -# 'recipe' for Docker to build an RPM -# - -# Pull base image -ARG FVERSION=latest -FROM fedora:$FVERSION -# Needed for later use of FVERSION -ARG FVERSION -LABEL maintainer="daos@daos.groups.io" - -# Use local repo server if present -ARG REPO_FILE_URL -RUN if [ -n "$REPO_FILE_URL" ]; then \ - cd /etc/yum.repos.d/ && \ - curl -k -f -o daos_ci-fedora-artifactory.repo.tmp \ - "$REPO_FILE_URL"daos_ci-fedora-artifactory.repo && \ - for file in *.repo; do \ - true > $file; \ - done; \ - mv daos_ci-fedora-artifactory.repo{.tmp,}; \ - fi - -# Install basic tools -RUN dnf -y install mock make \ - rpm-build createrepo rpmlint redhat-lsb-core git \ - python-srpm-macros rpmdevtools && \ - dnf -y clean all - -# use same UID as host and default value of 1000 if not specified -ARG UID=1000 - -# Add build user (to keep rpmbuild happy) -ENV USER build -ENV PASSWD build -RUN useradd -u $UID -ms /bin/bash $USER -RUN echo "$USER:$PASSWD" | chpasswd -# add the user to the mock group so it can run mock -RUN usermod -a -G mock $USER - -ARG CB0 -RUN dnf -y upgrade && \ - dnf clean all - -# Monkey-patch rpmlint until a new release is made with -# https://github.com/rpm-software-management/rpmlint/pull/795 in it -# But make sure to patch after dnf upgrade so that an upgraded rpmlint -# RPM doesn't wipe out our patch -# Ditto for the patch to zero and display ccache stats -# https://github.com/rpm-software-management/mock/pull/1299 -ARG PACKAGINGDIR=packaging -COPY ${PACKAGINGDIR}/*.patch ./ -RUN (cd $(python3 -c 'import site; print(site.getsitepackages()[-1])') && \ - if ! grep -e --ignore-unused-rpmlintrc rpmlint/cli.py; then \ - if ! patch -p1 < $OLDPWD/rpmlint--ignore-unused-rpmlintrc.patch; then \ - exit 1; \ - fi; \ - rm -f rpmlint/__pycache__/{cli,lint}.*.pyc; \ - fi; \ - if ! grep _ccachePostBuildHook mockbuild/plugins/ccache.py; then \ - if ! patch -p3 < $OLDPWD/ccache-stats.patch; then \ - exit 1; \ - fi; \ - rm -f mockbuild/plugins/__pycache__/ccache.*.pyc; \ - fi); \ - rm -f rpmlint--ignore-unused-rpmlintrc.patch ccache-stats.patch - -# show the release that was built -ARG CACHEBUST -RUN cat /etc/os-release diff --git a/packaging/Dockerfile.ubuntu.20.04 b/packaging/Dockerfile.ubuntu.20.04 deleted file mode 100644 index ec76bfd1..00000000 --- a/packaging/Dockerfile.ubuntu.20.04 +++ /dev/null @@ -1,66 +0,0 @@ -# -# Copyright 2019-2021, Intel Corporation -# -# 'recipe' for Docker to build an Debian package -# -# Pull base image -FROM ubuntu:20.04 -LABEL org.opencontainers.image.authors="daos@daos.groups.io" - -RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ - curl gpg - -ARG REPO_FILE_URL -RUN if [ -n "$REPO_FILE_URL" ]; then \ - cd /etc/apt/sources.list.d && \ - curl -f -o daos_ci-ubuntu20.04-artifactory.list.tmp \ - "$REPO_FILE_URL"daos_ci-ubuntu20.04-artifactory.list && \ - true > ../sources.list && \ - mv daos_ci-ubuntu20.04-artifactory.list.tmp \ - daos_ci-ubuntu20.04-artifactory.list; \ - fi; \ - cd -; \ - curl -f -O "$REPO_FILE_URL"esad_repo.key; \ - gpg --no-default-keyring --keyring ./temp-keyring.gpg \ - --import esad_repo.key; \ - mkdir -p /usr/local/share/keyrings/; \ - gpg --no-default-keyring --keyring ./temp-keyring.gpg --export \ - --output /usr/local/share/keyrings/daos-stack-public.gpg; \ - rm ./temp-keyring.gpg; \ - url_prefix=https://downloads.linux.hpe.com/SDR/; \ - for url in hpPublicKey2048.pub \ - hpPublicKey2048_key1.pub \ - hpePublicKey2048_key1.pub; do \ - curl -f -O "$url_prefix$url"; \ - gpg --no-default-keyring --keyring ./temp-keyring.gpg \ - --import "$(basename $url)"; \ - done; \ - gpg --no-default-keyring --keyring ./temp-keyring.gpg --export \ - --output /usr/local/share/keyrings/hpe-sdr-public.gpg; \ - rm ./temp-keyring.gpg - -# Install basic tools -RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ - autoconf bash ca-certificates curl debhelper dh-make \ - dpkg-dev dh-python doxygen gcc git git-buildpackage \ - javahelper locales make patch pbuilder pkg-config \ - python3-dev python3-distro python3-distutils rpm scons wget \ - cmake valgrind rpmdevtools - -# use same UID as host and default value of 1000 if not specified -ARG UID=1000 - -# Add build user (to keep chrootbuild happy) -ENV USER build -RUN useradd -u $UID -ms /bin/bash $USER - -# need to run the build command as root, as it needs to chroot -RUN if ! grep "^#includedir /etc/sudoers.d" /etc/sudoers; then \ - echo "#includedir /etc/sudoers.d" >> /etc/sudoers; \ - fi; \ - echo "Defaults env_keep += \"DPKG_GENSYMBOLS_CHECK_LEVEL\"" > /etc/sudoers.d/build; \ - echo "build ALL=(ALL) NOPASSWD: /usr/bin/tee /root/.pbuilderrc" >> /etc/sudoers.d/build; \ - echo "build ALL=(ALL) NOPASSWD: /usr/sbin/pbuilder" >> /etc/sudoers.d/build; \ - chmod 0440 /etc/sudoers.d/build; \ - visudo -c; \ - sudo -l -U build diff --git a/packaging/Dockerfile.ubuntu.rolling b/packaging/Dockerfile.ubuntu.rolling deleted file mode 100644 index 02aca458..00000000 --- a/packaging/Dockerfile.ubuntu.rolling +++ /dev/null @@ -1,29 +0,0 @@ -# -# Copyright 2019, Intel Corporation -# -# 'recipe' for Docker to build an Debian package -# -# Pull base image -FROM ubuntu:rolling -Maintainer daos-stack - -# use same UID as host and default value of 1000 if not specified -ARG UID=1000 - -# Install basic tools -RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ - autoconf bash curl debhelper dh-make dpkg-dev doxygen gcc \ - git git-buildpackage locales make patch pbuilder rpm wget - -# Add build user (to keep chrootbuild happy) -ENV USER build -RUN useradd -u $UID -ms /bin/bash $USER - -# need to run the build command as root, as it needs to chroot -RUN if ! grep "^#includedir /etc/sudoers.d" /etc/sudoers; then \ - echo "#includedir /etc/sudoers.d" >> /etc/sudoers; \ - fi; \ - echo "build ALL=(ALL) NOPASSWD: /usr/sbin/pbuilder" > /etc/sudoers.d/build; \ - chmod 0440 /etc/sudoers.d/build; \ - visudo -c; \ - sudo -l -U build diff --git a/packaging/Makefile_distro_vars.mk b/packaging/Makefile_distro_vars.mk deleted file mode 100644 index 4e8a09dc..00000000 --- a/packaging/Makefile_distro_vars.mk +++ /dev/null @@ -1,153 +0,0 @@ -DOT := . - -DOCKER := docker - -# Find out what we are -ID_LIKE := $(shell . /etc/os-release; echo $$ID_LIKE) -# Of course that does not work for SLES-12 -ID := $(shell . /etc/os-release; echo $$ID) -VERSION_ID := $(shell . /etc/os-release; echo $$VERSION_ID) -VERSION_CODENAME := $(shell . /etc/os-release; echo $$VERSION_CODENAME) - -ifeq ($(ID_LIKE),debian) -SPECTOOL := spectool -UBUNTU_VERS := $(shell . /etc/os-release; echo $$VERSION) -DISTRO_ID_OPT := --distribution $(VERSION_CODENAME) -DISTRO_ID := ubuntu$(VERSION_ID) -VERSION_ID_STR := $(subst $(DOT),_,$(VERSION_ID)) -DISTRO_BASE := UBUNTU_$(VERSION_ID_STR) -endif -ifeq ($(ID),fedora) -DOCKER := podman -SPECTOOL := spectool -# a Fedora-based mock builder -# derive the the values of: -# VERSION_ID (i.e. 7) -# DISTRO_ID (i.e. el7) -# DISTRO_BASE (i.e. EL_7) -# from the CHROOT_NAME -ifeq ($(patsubst %epel-7-x86_64,,$(lastword $(subst +, ,$(CHROOT_NAME)))),) -DIST := $(shell rpm $(COMMON_RPM_ARGS) --eval %{?dist}) -VERSION_ID := 7 -DISTRO_ID := el7 -DISTRO_BASE := EL_7 -DISTRO_VERSION ?= $(VERSION_ID) -ORIG_TARGET_VER := 7 -SED_EXPR := 1s/$(DIST)//p -endif -ifeq ($(patsubst %epel-8-x86_64,,$(lastword $(subst +, ,$(CHROOT_NAME)))),) -DIST := $(shell rpm $(COMMON_RPM_ARGS) --eval %{?dist}) -VERSION_ID := 8 -DISTRO_ID := el8 -DISTRO_BASE := EL_8 -ifneq ($(DISTRO_VERSION_EL8),) -override DISTRO_VERSION := $(DISTRO_VERSION_EL8) -endif -DISTRO_VERSION ?= $(VERSION_ID) -ORIG_TARGET_VER := 8 -SED_EXPR := 1s/$(DIST)//p -endif -ifeq ($(patsubst %epel-9-x86_64,,$(lastword $(subst +, ,$(CHROOT_NAME)))),) -DIST := $(shell rpm $(COMMON_RPM_ARGS) --eval %{?dist}) -VERSION_ID := 9 -DISTRO_ID := el9 -DISTRO_BASE := EL_9 -ifneq ($(DISTRO_VERSION_EL9),) -override DISTRO_VERSION := $(DISTRO_VERSION_EL9) -endif -DISTRO_VERSION ?= $(VERSION_ID) -ORIG_TARGET_VER := 9 -SED_EXPR := 1s/$(DIST)//p -endif -ifeq ($(CHROOT_NAME),opensuse-leap-15.2-x86_64) -VERSION_ID := 15.2 -DISTRO_ID := sl15.2 -DISTRO_BASE := LEAP_15 -DISTRO_VERSION ?= $(VERSION_ID) -ORIG_TARGET_VER := 15.2 -SED_EXPR := 1p -endif -ifeq ($(CHROOT_NAME),opensuse-leap-15.3-x86_64) -VERSION_ID := 15.3 -DISTRO_ID := sl15.3 -DISTRO_BASE := LEAP_15 -DISTRO_VERSION ?= $(VERSION_ID) -ORIG_TARGET_VER := 15.3 -SED_EXPR := 1p -endif -ifeq ($(CHROOT_NAME),opensuse-leap-15.4-x86_64) -VERSION_ID := 15.4 -DISTRO_ID := sl15.4 -DISTRO_BASE := LEAP_15 -DISTRO_VERSION ?= $(VERSION_ID) -ORIG_TARGET_VER := 15.4 -SED_EXPR := 1p -endif -ifeq ($(CHROOT_NAME),opensuse-leap-15.5-x86_64) -VERSION_ID := 15.5 -DISTRO_ID := sl15.5 -DISTRO_BASE := LEAP_15 -DISTRO_VERSION ?= $(VERSION_ID) -ORIG_TARGET_VER := 15.5 -SED_EXPR := 1p -endif -endif -ifeq ($(ID),centos) -ID = el -endif -ifeq ($(ID),rocky) -ID = el -endif -ifeq ($(ID),almalinux) -ID = el -endif -ifeq ($(ID),rhel) -ID = el -endif -ifeq ($(ID),el) -DISTRO_ID := el$(VERSION_ID) -DISTRO_BASE := $(basename EL_$(VERSION_ID)) -DIST := $(shell rpm $(COMMON_RPM_ARGS) --eval %{?dist}) -SED_EXPR := 1s/$(DIST)//p -SPECTOOL := spectool -define install_repo - if yum-config-manager --add-repo=$(1); then \ - repo_file=$$(ls -tar /etc/yum.repos.d/*.repo | tail -1); \ - sed -i -e 1d -e '$$s/^/gpgcheck=False/' $$repo_file; \ - else \ - exit 1; \ - fi -endef -endif -ifeq ($(findstring opensuse,$(ID)),opensuse) -ID_LIKE := suse -DISTRO_ID := sl$(VERSION_ID) -DISTRO_BASE := $(basename LEAP_$(VERSION_ID)) -endif -ifeq ($(ID),sles) -# SLES-12 or 15 detected. -ID_LIKE := suse -DISTRO_ID := sle$(VERSION_ID) -DISTRO_BASE := $(basename SLES_$(VERSION_ID)) -endif -ifeq ($(ID_LIKE),suse) -SPECTOOL := rpmdev-spectool -define install_repo - zypper --non-interactive ar $(1) -endef -endif -ifeq ($(ID_LIKE),debian) -ifndef LANG -export LANG = C.UTF-8 -endif -ifndef LC_ALL -export LC_ALL = C.UTF-8 -endif -else -ifndef LANG -export LANG = C.utf8 -endif -ifndef LC_ALL -export LC_ALL = C.utf8 -endif -endif diff --git a/packaging/Makefile_packaging.mk b/packaging/Makefile_packaging.mk deleted file mode 100644 index 3201a227..00000000 --- a/packaging/Makefile_packaging.mk +++ /dev/null @@ -1,510 +0,0 @@ -# Common Makefile for including -# Needs the following variables set at a minimum: -# NAME := -# SRC_EXT := - -# force bash (looking at you Ubuntu) -SHELL=/bin/bash - -# Put site overrides (i.e. DAOS_STACK_*_LOCAL_REPO) in here --include Makefile.local - -# default to Leap 15 distro for chrootbuild -CHROOT_NAME ?= opensuse-leap-15.3-x86_64 -include packaging/Makefile_distro_vars.mk - -ifeq ($(DEB_NAME),) -DEB_NAME := $(NAME) -endif - -CALLING_MAKEFILE := $(word 1, $(MAKEFILE_LIST)) - -# this Makefile should always be executed from it's own dir -TOPDIR ?= $(abspath $(dir $(firstword $(MAKEFILE_LIST)))) - -BUILD_PREFIX ?= . - -DOT := . -RPM_BUILD_OPTIONS += $(EXTERNAL_RPM_BUILD_OPTIONS) - -# some defaults the caller can override -PACKAGING_CHECK_DIR ?= ../packaging -LOCAL_REPOS ?= true -TEST_PACKAGES ?= ${NAME} - -# unfortunately we cannot always name the repo the same as the project -REPO_NAME ?= $(NAME) - -PR_REPOS ?= $(shell git show -s --format=%B | sed -ne 's/^PR-repos: *\(.*\)/\1/p') -LEAP_15_PR_REPOS ?= $(shell git show -s --format=%B | sed -ne 's/^PR-repos-leap15: *\(.*\)/\1/p') -EL_7_PR_REPOS ?= $(shell git show -s --format=%B | sed -ne 's/^PR-repos-el7: *\(.*\)/\1/p') -EL_8_PR_REPOS ?= $(shell git show -s --format=%B | sed -ne 's/^PR-repos-el8: *\(.*\)/\1/p') -EL_9_PR_REPOS ?= $(shell git show -s --format=%B | sed -ne 's/^PR-repos-el9: *\(.*\)/\1/p') -UBUNTU_20_04_PR_REPOS ?= $(shell git show -s --format=%B | sed -ne 's/^PR-repos-ubuntu20: *\(.*\)/\1/p') -REPO_FILES_PR ?= $(shell git show -s --format=%B | sed -ne 's/^Repo-files-PR: *\(.*\)/\1/p') - -ifneq ($(PKG_GIT_COMMIT),) -ifeq ($(GITHUB_PROJECT),) -ifeq ($(GIT_PROJECT),) -$(error You must set either GITHUB_PROJECT or GIT_PROJECT if you set PKG_GIT_COMMIT) -endif -endif -BUILD_DEFINES := --define "commit $(PKG_GIT_COMMIT)" -RPM_BUILD_OPTIONS := $(BUILD_DEFINES) -GIT_DIFF_EXCLUDES := $(PATCH_EXCLUDE_FILES:%=':!%') -endif - -FVERSION ?= latest -COMMON_RPM_ARGS := --define "_topdir $$PWD/_topdir" $(BUILD_DEFINES) -SPEC := $(shell if [ -f $(NAME)-$(DISTRO_BASE).spec ]; then echo $(NAME)-$(DISTRO_BASE).spec; else echo $(NAME).spec; fi) -VERSION = $(eval VERSION := $(shell rpm $(COMMON_RPM_ARGS) --specfile --qf '%{version}\n' $(SPEC) | sed -n '1p'))$(VERSION) -DEB_RVERS := $(subst $(DOT),\$(DOT),$(VERSION)) -DEB_BVERS := $(basename $(subst ~rc,$(DOT)rc,$(VERSION))) -RELEASE = $(eval RELEASE := $(shell rpm $(COMMON_RPM_ARGS) --specfile --qf '%{release}\n' $(SPEC) | sed -n '$(SED_EXPR)'))$(RELEASE) -SRPM = _topdir/SRPMS/$(NAME)-$(VERSION)-$(RELEASE)$(DIST).src.rpm -RPMS = $(eval RPMS := $(addsuffix .rpm,$(addprefix _topdir/RPMS/x86_64/,$(shell rpm --specfile $(SPEC)))))$(RPMS) -DEB_TOP := _topdir/BUILD -DEB_BUILD := $(DEB_TOP)/$(NAME)-$(VERSION) -DEB_TARBASE := $(DEB_TOP)/$(DEB_NAME)_$(VERSION) -REAL_SOURCE ?= $(eval REAL_SOURCE := $(shell CHROOT_NAME=$(CHROOT_NAME) $(SPECTOOL) $(COMMON_RPM_ARGS) -S -l $(SPEC) | sed -e 2,\$$d -e 's/\#/\\\#/g' -e 's/Source.*: *//'))$(REAL_SOURCE) -ifeq ($(ID_LIKE),debian) -ifneq ($(DEB_SOURCE),) -SOURCE ?= $(DEB_SOURCE) -endif -endif -SOURCE ?= $(REAL_SOURCE) -PATCHES ?= $(eval PATCHES := $(shell CHROOT_NAME=$(CHROOT_NAME) $(SPECTOOL) $(COMMON_RPM_ARGS) -l $(SPEC) | sed -ne 1d -e '/already present/d' -e 's/.*: *//' -e 's/.*\///' -e '/\.patch/p'))$(PATCHES) -OTHER_SOURCES := $(eval OTHER_SOURCES := $(shell CHROOT_NAME=$(CHROOT_NAME) $(SPECTOOL) $(COMMON_RPM_ARGS) -l $(SPEC) | sed -ne 1d -e '/already present/d' -e '/^Patch.*:/d' -e 's/Source.*: *//' -e 's/.*\///' -e p))$(OTHER_SOURCES) -SOURCES := $(addprefix _topdir/SOURCES/,$(notdir $(SOURCE) $(OTHER_SOURCES)) $(PATCHES)) -ifeq ($(ID_LIKE),debian) -DEBS := $(addsuffix _$(VERSION)-1_amd64.deb,$(shell sed -n '/-udeb/b; s,^Package:[[:blank:]],$(DEB_TOP)/,p' $(TOPDIR)/debian/control)) -DEB_PREV_RELEASE := $(shell cd $(TOPDIR) && dpkg-parsechangelog -S version) -ifneq ($(GIT_SHORT),) -GIT_INFO ?= .$(GIT_NUM_COMMITS).g$(GIT_SHORT) -endif -DEB_DSC := $(DEB_NAME)_$(DEB_PREV_RELEASE)$(GIT_INFO).dsc -TARGETS := $(DEBS) -else -TARGETS := $(RPMS) $(SRPM) -endif - -define distro_map - case $(DISTRO_ID) in \ - el7) distro="centos7" \ - ;; \ - el*) distro="$(DISTRO_ID)" \ - ;; \ - sle12.3) distro="sles12.3" \ - ;; \ - sl42.3) distro="leap42.3" \ - ;; \ - sl15.*) distro="leap15" \ - ;; \ - ubuntu*) distro="$(DISTRO_ID)" \ - ;; \ - esac; -endef - -define install_repos - if [ "$(ID_LIKE)" = "debian" ]; then \ - IFS='|' read -ra BASES <<< "$($(DISTRO_BASE)_LOCAL_REPOS)"; \ - for baseurl in "$${BASES[@]}"; do \ - baseurl="$${baseurl# *}"; \ - $(call install_repo,$$baseurl) \ - done; \ - fi - for repo in $($(DISTRO_BASE)_PR_REPOS) \ - $(PR_REPOS) $(1); do \ - branch="master"; \ - build_number="lastSuccessfulBuild"; \ - if [[ $$repo = *@* ]]; then \ - branch="$${repo#*@}"; \ - repo="$${repo%@*}"; \ - if [[ $$branch = *:* ]]; then \ - build_number="$${branch#*:}"; \ - branch="$${branch%:*}"; \ - fi; \ - fi; \ - $(call distro_map) \ - baseurl=$${JENKINS_URL:-https://build.hpdd.intel.com/}job/daos-stack/job/$$repo/job/$$branch/; \ - baseurl+=$$build_number/artifact/artifacts/$$distro/; \ - $(call install_repo,$$baseurl) \ - done -endef - -all: $(TARGETS) - -%/: - mkdir -p $@ - -%.gz: % - rm -f $@ - gzip $< - -%.bz2: % - rm -f $@ - bzip2 $< - -%.xz: % - rm -f $@ - xz -z $< - -_topdir/SOURCES/%: % | _topdir/SOURCES/ - rm -f $@ - ln $< $@ - -# At least one spec file, SLURM (sles), has a different version for the -# download file than the version in the spec file. -ifeq ($(DL_VERSION),) -DL_VERSION = $(subst ~,,$(VERSION)) -endif -ifeq ($(DL_NAME),) -DL_NAME = $(NAME) -endif - -$(notdir $(SOURCE) $(OTHER_SOURCES) $(REAL_SOURCE)): $(SPEC) $(CALLING_MAKEFILE) - # TODO: need to clean up old ones - $(SPECTOOL) $(COMMON_RPM_ARGS) -g $(SPEC) - -$(DEB_TOP)/%: % | $(DEB_TOP)/ - -$(DEB_BUILD)/%: % | $(DEB_BUILD)/ - -$(DEB_BUILD).tar.$(SRC_EXT): $(notdir $(SOURCE)) | $(DEB_TOP)/ - ln -f $< $@ - -$(DEB_TARBASE).orig.tar.$(SRC_EXT): $(DEB_BUILD).tar.$(SRC_EXT) - rm -f $(DEB_TOP)/*.orig.tar.* - ln -f $< $@ - -deb_detar: $(notdir $(SOURCE)) $(DEB_TARBASE).orig.tar.$(SRC_EXT) - # Unpack tarball - rm -rf ./$(DEB_TOP)/.patched ./$(DEB_TOP)/.detar - rm -rf ./$(DEB_BUILD)/* ./$(DEB_BUILD)/.pc ./$(DEB_BUILD)/.libs - mkdir -p $(DEB_BUILD) - tar -C $(DEB_BUILD) --strip-components=1 -xpf $< - -# Extract patches for Debian -$(DEB_TOP)/.patched: $(PATCHES) check-env deb_detar | \ - $(DEB_BUILD)/debian/ - mkdir -p ${DEB_BUILD}/debian/patches - mkdir -p $(DEB_TOP)/patches - for f in $(PATCHES); do \ - rm -f $(DEB_TOP)/patches/*; \ - if git mailsplit -o$(DEB_TOP)/patches < "$$f"; then \ - fn=$$(basename "$$f"); \ - for f1 in $(DEB_TOP)/patches/*;do \ - [ -e "$$f1" ] || continue; \ - f1n=$$(basename "$$f1"); \ - echo "$${fn}_$${f1n}" >> $(DEB_BUILD)/debian/patches/series; \ - mv "$$f1" $(DEB_BUILD)/debian/patches/$${fn}_$${f1n}; \ - done; \ - else \ - fb=$$(basename "$$f"); \ - cp "$$f" $(DEB_BUILD)/debian/patches/; \ - echo "$$fb" >> $(DEB_BUILD)/debian/patches/series; \ - if ! grep -q "^Description:\|^Subject:" "$$f"; then \ - sed -i '1 iSubject: Auto added patch' \ - "$(DEB_BUILD)/debian/patches/$$fb"; \ - fi; \ - if ! grep -q "^Origin:\|^Author:\|^From:" "$$f"; then \ - sed -i '1 iOrigin: other' \ - "$(DEB_BUILD)/debian/patches/$$fb"; \ - fi; \ - fi; \ - done - touch $@ - - -# Move the debian files into the Debian directory. -ifeq ($(ID_LIKE),debian) -$(DEB_TOP)/.deb_files: $(shell find $(TOPDIR)/debian -type f) deb_detar | \ - $(DEB_BUILD)/debian/ - cd $(TOPDIR)/ && \ - find debian -maxdepth 1 -type f -exec cp '{}' '$(BUILD_PREFIX)/$(DEB_BUILD)/{}' ';' - if [ -e $(TOPDIR)/debian/source ]; then \ - cp -r $(TOPDIR)/debian/source $(DEB_BUILD)/debian; fi - if [ -e $(TOPDIR)/debian/local ]; then \ - cp -r $(TOPDIR)/debian/local $(DEB_BUILD)/debian; fi - if [ -e $(TOPDIR)/debian/examples ]; then \ - cp -r $(TOPDIR)/debian/examples $(DEB_BUILD)/debian; fi - if [ -e $(TOPDIR)/debian/upstream ]; then \ - cp -r $(TOPDIR)/debian/upstream $(DEB_BUILD)/debian; fi - if [ -e $(TOPDIR)/debian/tests ]; then \ - cp -r $(TOPDIR)/debian/tests $(DEB_BUILD)/debian; fi - rm -f $(DEB_BUILD)/debian/*.ex $(DEB_BUILD)/debian/*.EX - rm -f $(DEB_BUILD)/debian/*.orig -ifneq ($(GIT_INFO),) - cd $(DEB_BUILD); dch --distribution unstable \ - --newversion $(DEB_PREV_RELEASE)$(GIT_INFO) \ - "Git commit information" -endif - touch $@ -endif - -# see https://stackoverflow.com/questions/2973445/ for why we subst -# the "rpm" for "%" to effectively turn this into a multiple matching -# target pattern rule -$(subst rpm,%,$(RPMS)): $(SPEC) $(SOURCES) - rpmbuild -bb $(COMMON_RPM_ARGS) $(RPM_BUILD_OPTIONS) $(SPEC) - -$(subst deb,%,$(DEBS)): $(DEB_BUILD).tar.$(SRC_EXT) \ - deb_detar $(DEB_TOP)/.deb_files $(DEB_TOP)/.patched - rm -f $(DEB_TOP)/*.deb $(DEB_TOP)/*.ddeb $(DEB_TOP)/*.dsc \ - $(DEB_TOP)/*.dsc $(DEB_TOP)/*.build* $(DEB_TOP)/*.changes \ - $(DEB_TOP)/*.debian.tar.* - rm -rf $(DEB_TOP)/*-tmp - cd $(DEB_BUILD); debuild --no-lintian -b -us -uc - cd $(DEB_BUILD); debuild -- clean - git status - rm -rf $(DEB_TOP)/$(NAME)-tmp - lfile1=$(shell echo $(DEB_TOP)/$(NAME)[0-9]*_$(VERSION)-1_amd64.deb);\ - lfile=$$(ls $${lfile1}); \ - lfile2=$${lfile##*/}; lname=$${lfile2%%_*}; \ - dpkg-deb -R $${lfile} \ - $(DEB_TOP)/$(NAME)-tmp; \ - if [ -e $(DEB_TOP)/$(NAME)-tmp/DEBIAN/symbols ]; then \ - sed 's/$(DEB_RVERS)-1/$(DEB_BVERS)/' \ - $(DEB_TOP)/$(NAME)-tmp/DEBIAN/symbols \ - > $(DEB_BUILD)/debian/$${lname}.symbols; fi - cd $(DEB_BUILD); debuild -us -uc - rm $(DEB_BUILD).tar.$(SRC_EXT) - for f in $(DEB_TOP)/*.deb; do \ - echo $$f; dpkg -c $$f; done - -$(DEB_TOP)/$(DEB_DSC): $(CALLING_MAKEFILE) $(DEB_BUILD).tar.$(SRC_EXT) \ - deb_detar $(DEB_TOP)/.deb_files $(DEB_TOP)/.patched - rm -f $(DEB_TOP)/*.deb $(DEB_TOP)/*.ddeb $(DEB_TOP)/*.dsc \ - $(DEB_TOP)/*.dsc $(DEB_TOP)/*.build* $(DEB_TOP)/*.changes \ - $(DEB_TOP)/*.debian.tar.* - rm -rf $(DEB_TOP)/*-tmp - cd $(DEB_BUILD); dpkg-buildpackage -S --no-sign --no-check-builddeps - -$(SRPM): $(SPEC) $(SOURCES) - if [ -f bz-1955184_find-requires ]; then \ - chmod 755 bz-1955184_find-requires; \ - fi - rpmbuild -bs $(COMMON_RPM_ARGS) $(RPM_BUILD_OPTIONS) $(SPEC) - -srpm: $(SRPM) - -$(RPMS): $(SRPM) $(CALLING_MAKEFILE) - -rpms: $(RPMS) - -repo: rpms - rm -rf _topdir/RPMS/repodata/ - createrepo _topdir/RPMS/ - -$(DEBS): $(CALLING_MAKEFILE) - -debs: $(DEBS) - -ls: $(TARGETS) - ls -ld $^ - -ifneq ($(PKG_GIT_COMMIT),) -# This not really intended to run in CI. It's meant as a developer -# convenience to generate the needed patch and add it to the repo to -# be committed. -$(VERSION)..$(PKG_GIT_COMMIT).patch: -ifneq ($(GITHUB_PROJECT),) - # it really sucks that GitHub's "compare" returns such dirty patches - #curl -O 'https://github.com/$(GITHUB_PROJECT)/compare/$@' - git clone https://github.com/$(GITHUB_PROJECT).git -else - git clone $(GIT_PROJECT) -endif - set -x; pushd $(NAME) && \ - trap 'popd && rm -rf $(NAME)' EXIT; \ - echo git diff $(VERSION)..$(PKG_GIT_COMMIT) --stat -- \ - $(GIT_DIFF_EXCLUDES ); \ - git diff $(VERSION)..$(PKG_GIT_COMMIT) -- \ - $(GIT_DIFF_EXCLUDES) > ../$@; \ - popd; \ - trap 'rm -rf $(NAME)' EXIT; \ - git add $@ -patch: $(VERSION)..$(PKG_GIT_COMMIT).patch -else -patch: - echo "PKG_GIT_COMMIT is not defined" -endif - -ifeq ($(ID_LIKE),debian) -chrootbuild: $(DEB_TOP)/$(DEB_DSC) - $(call distro_map) \ - DISTRO="$$distro" \ - PR_REPOS="$(PR_REPOS)" \ - REPO_FILES_PR="$(REPO_FILES_PR)" \ - DISTRO_BASE_PR_REPOS="$($(DISTRO_BASE)_PR_REPOS)" \ - JENKINS_URL="$${JENKINS_URL}" \ - JOB_REPOS="$(JOB_REPOS)" \ - REPO_FILE_URL="$(REPO_FILE_URL)" \ - DISTRO_BASE_LOCAL_REPOS="$($(DISTRO_BASE)_LOCAL_REPOS)" \ - VERSION_CODENAME="$(VERSION_CODENAME)" \ - DEB_TOP="$(DEB_TOP)" \ - DEB_DSC="$(DEB_DSC)" \ - DISTRO_ID_OPT="$(DISTRO_ID_OPT)" \ - LOCAL_REPOS='$(LOCAL_REPOS)' \ - ARTIFACTORY_URL="$(ARTIFACTORY_URL)" \ - packaging/debian_chrootbuild -else -chrootbuild: $(SRPM) $(CALLING_MAKEFILE) - $(call distro_map) \ - DISTRO="$$distro" \ - CHROOT_NAME="$(CHROOT_NAME)" \ - PR_REPOS="$(PR_REPOS)" \ - REPO_FILES_PR="$(REPO_FILES_PR)" \ - DISTRO_BASE_PR_REPOS="$($(DISTRO_BASE)_PR_REPOS)" \ - JENKINS_URL="$${JENKINS_URL}" \ - JOB_REPOS="$(JOB_REPOS)" \ - REPO_FILE_URL="$(REPO_FILE_URL)" \ - MOCK_OPTIONS="$(MOCK_OPTIONS)" \ - RPM_BUILD_OPTIONS='$(RPM_BUILD_OPTIONS)' \ - LOCAL_REPOS='$(LOCAL_REPOS)' \ - ARTIFACTORY_URL="$(ARTIFACTORY_URL)" \ - DISTRO_VERSION="$(DISTRO_VERSION)" \ - PACKAGE="$(NAME)" \ - TARGET="$<" \ - packaging/rpm_chrootbuild -endif - -podman_chrootbuild: - if ! podman build --build-arg REPO_FILE_URL=$(REPO_FILE_URL) \ - --build-arg FVERSION=$(FVERSION) \ - -t $(subst +,-,$(CHROOT_NAME))-chrootbuild \ - -f packaging/Dockerfile.mockbuild .; then \ - echo "Container build failed"; \ - exit 1; \ - fi - rm -f /var/lib/mock/$(CHROOT_NAME)/result/{root,build}.log - if ! podman run --rm --privileged -w $(TOPDIR) -v=$(TOPDIR)/..:$(TOPDIR)/.. \ - -it $(subst +,-,$(CHROOT_NAME))-chrootbuild \ - bash -c 'if ! DISTRO_REPOS=false \ - REPO_FILE_URL=$(REPO_FILE_URL) \ - make REPO_FILES_PR=$(REPO_FILES_PR) \ - MOCK_OPTIONS=$(MOCK_OPTIONS) \ - CHROOT_NAME=$(CHROOT_NAME) -C $(CURDIR) chrootbuild; then \ - cat /var/lib/mock/$(CHROOT_NAME)/{result/{root,build},root/builddir/build/BUILD/*/config}.log; \ - exit 1; \ - fi; \ - rpmlint $$(ls /var/lib/mock/$(CHROOT_NAME)/result/*.rpm | \ - grep -v -e debuginfo -e debugsource -e src.rpm)'; then \ - exit 1; \ - fi - -docker_chrootbuild: - if ! $(DOCKER) build --build-arg UID=$$(id -u) -t chrootbuild \ - --build-arg REPO_FILE_URL=$(REPO_FILE_URL) \ - -f packaging/Dockerfile.mockbuild .; then \ - echo "Container build failed"; \ - exit 1; \ - fi - rm -f /var/lib/mock/$(CHROOT_NAME)/result/{root,build}.log - if ! $(DOCKER) run --user=$$(id -u) --privileged=true -w $(TOPDIR) \ - -v=$(TOPDIR):$(TOPDIR) \ - -it chrootbuild bash -c "make -C $(CURDIR) \ - CHROOT_NAME=$(CHROOT_NAME) chrootbuild"; then \ - cat /var/lib/mock/$(CHROOT_NAME)/result/{root,build}.log; \ - exit 1; \ - fi - -rpmlint: $(SPEC) - rpmlint --ignore-unused-rpmlintrc $< - -packaging_check: - if grep -e --repo $(CALLING_MAKEFILE); then \ - echo "SUSE repos in $(CALLING_MAKEFILE) don't need a \"--repo\" any more"; \ - exit 2; \ - fi - if ! diff --exclude \*.sw? \ - --exclude debian \ - --exclude .git \ - --exclude Jenkinsfile \ - --exclude libfabric.spec \ - --exclude Makefile \ - --exclude README.md \ - --exclude _topdir \ - --exclude \*.tar.\* \ - --exclude \*.code-workspace \ - --exclude install \ - --exclude packaging \ - --exclude utils \ - --exclude .vscode \ - -bur $(PACKAGING_CHECK_DIR)/ packaging/; then \ - exit 1; \ - fi - -check-env: -ifndef DEBEMAIL - $(error DEBEMAIL is undefined) -endif -ifndef DEBFULLNAME - $(error DEBFULLNAME is undefined) -endif - -test: - # Test the rpmbuild by installing the built RPM - $(call install_repos,$(REPO_NAME)@$(BRANCH_NAME):$(BUILD_NUMBER)) - dnf -y install $(TEST_PACKAGES) - -show_NAME: - @echo '$(NAME)' - -show_DISTRO_ID: - @echo '$(DISTRO_ID)' - -show_distro_map: - @$(call distro_map) echo "$$distro" - -show_spec: - @echo '$(SPEC)' - -show_build_defines: - @echo '$(BUILD_DEFINES)' - -show_common_rpm_args: - @echo '$(COMMON_RPM_ARGS)' - -show_version: - @echo '$(VERSION)' - -show_dl_version: - @echo '$(DL_VERSION)' - -show_release: - @echo '$(RELEASE)' - -show_rpms: - @echo '$(RPMS)' - -show_source: - @echo '$(SOURCE)' - -show_real_source: - @echo '$(REAL_SOURCE)' - -show_patches: - @echo '$(PATCHES)' - -show_sources: - @echo '$(SOURCES)' - -show_other_sources: - @echo '$(OTHER_SOURCES)' - -show_targets: - @echo '$(TARGETS)' - -show_makefiles: - @echo '$(MAKEFILE_LIST)' - -show_calling_makefile: - @echo '$(CALLING_MAKEFILE)' - -show_git_metadata: - @echo '$(GIT_SHA1):$(GIT_SHORT):$(GIT_NUM_COMMITS)' - -.PHONY: srpm rpms debs deb_detar ls chrootbuild rpmlint FORCE \ - show_version show_release show_rpms show_source show_sources \ - show_targets check-env show_git_metadata diff --git a/packaging/ccache-stats.patch b/packaging/ccache-stats.patch deleted file mode 100644 index 26d5eeb7..00000000 --- a/packaging/ccache-stats.patch +++ /dev/null @@ -1,66 +0,0 @@ -From e87d916d7f49ea4949973adf0f09e9e5bf891e03 Mon Sep 17 00:00:00 2001 -From: "Brian J. Murrell" -Date: Tue, 30 Jan 2024 11:03:12 -0500 -Subject: [PATCH 1/2] Show ccache stats at the end of the build - -Zero the ccache stats at the beginning of the build and then display the -ccache stats at the end of the build to see how effective ccache was. - -Signed-off-by: Brian J. Murrell ---- - mock/py/mockbuild/plugins/ccache.py | 11 +++++++++++ - 1 file changed, 11 insertions(+) - -diff --git a/mock/py/mockbuild/plugins/ccache.py b/mock/py/mockbuild/plugins/ccache.py -index 2666ad9fc..1080ffe68 100644 ---- a/mock/py/mockbuild/plugins/ccache.py -+++ b/mock/py/mockbuild/plugins/ccache.py -@@ -35,6 +35,7 @@ def __init__(self, plugins, conf, buildroot): - buildroot.preexisting_deps.append("ccache") - plugins.add_hook("prebuild", self._ccacheBuildHook) - plugins.add_hook("preinit", self._ccachePreInitHook) -+ plugins.add_hook("postbuild", self._ccachePostBuildHook) - buildroot.mounts.add( - BindMountPoint(srcpath=self.ccachePath, bindpath=buildroot.make_chroot_path("/var/tmp/ccache"))) - -@@ -47,6 +48,9 @@ def __init__(self, plugins, conf, buildroot): - @traceLog() - def _ccacheBuildHook(self): - self.buildroot.doChroot(["ccache", "-M", str(self.ccache_opts['max_cache_size'])], shell=False) -+ # zero ccache stats -+ getLog().info("Zero ccache stats:") -+ self.buildroot.doChroot(["ccache", "--zero-stats"], printOutput=True, shell=False) - - # set up the ccache dir. - # we also set a few variables used by ccache to find the shared cache. -@@ -61,3 +65,10 @@ def _ccachePreInitHook(self): - file_util.mkdirIfAbsent(self.buildroot.make_chroot_path('/var/tmp/ccache')) - file_util.mkdirIfAbsent(self.ccachePath) - self.buildroot.uid_manager.changeOwner(self.ccachePath, recursive=True) -+ -+ # get some cache stats -+ def _ccachePostBuildHook(self): -+ # show the cache hit stats -+ getLog().info("ccache stats:") -+ self.buildroot.doChroot(["ccache", "--show-stats"], printOutput=True, shell=False) -++ - -From bfd3a7e1bb47d28ee60a94cb5985c1f66476475f Mon Sep 17 00:00:00 2001 -From: "Brian J. Murrell" -Date: Tue, 30 Jan 2024 11:17:48 -0500 -Subject: [PATCH 2/2] Remove extraneous line - -Signed-off-by: Brian J. Murrell ---- - mock/py/mockbuild/plugins/ccache.py | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/mock/py/mockbuild/plugins/ccache.py b/mock/py/mockbuild/plugins/ccache.py -index 1080ffe68..1a20846d3 100644 ---- a/mock/py/mockbuild/plugins/ccache.py -+++ b/mock/py/mockbuild/plugins/ccache.py -@@ -71,4 +71,3 @@ def _ccachePostBuildHook(self): - # show the cache hit stats - getLog().info("ccache stats:") - self.buildroot.doChroot(["ccache", "--show-stats"], printOutput=True, shell=False) --+ diff --git a/packaging/debian_chrootbuild b/packaging/debian_chrootbuild deleted file mode 100755 index cc2cc96d..00000000 --- a/packaging/debian_chrootbuild +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/bash - -set -uex - -if [ -n "${ARTIFACTORY_URL:-}" ] && "$LOCAL_REPOS"; then - echo "MIRRORSITE=${ARTIFACTORY_URL}artifactory/ubuntu-proxy" | sudo tee /root/.pbuilderrc -fi - -# shellcheck disable=SC2086 -sudo pbuilder create \ - --extrapackages "gnupg ca-certificates" \ - $DISTRO_ID_OPT - -repo_args="" -repos_added=() -for repo in $DISTRO_BASE_PR_REPOS $PR_REPOS; do - branch="master" - build_number="lastSuccessfulBuild" - if [[ $repo = *@* ]]; then - branch="${repo#*@}" - repo="${repo%@*}" - if [[ $branch = *:* ]]; then - build_number="${branch#*:}" - branch="${branch%:*}" - fi - fi - if [[ " ${repos_added[*]} " = *\ ${repo}\ * ]]; then - # don't add duplicates, first found wins - continue - fi - repos_added+=("$repo") - repo_args="$repo_args|deb [trusted=yes] ${JENKINS_URL:-https://build.hpdd.intel.com/}job/daos-stack/job/$repo/job/$branch/$build_number/artifact/artifacts/$DISTRO/ ./" -done - -repo_args+="|$(curl -sSf "$REPO_FILE_URL"daos_ci-"$DISTRO"-artifactory.list | - sed -e 's/#.*//' -e '/ubuntu-proxy/d' -e '/^$/d' -e '/^$/d' \ - -e 's/signed-by=.*\.gpg/trusted=yes/' | - sed -e ':a; N; $!ba; s/\n/|/g')" -for repo in $JOB_REPOS; do - repo_name=${repo##*://} - repo_name=${repo_name//\//_} - if [[ " ${repos_added[*]} " = *\ ${repo_name}\ * ]]; then - # don't add duplicates, first found wins - continue - fi - repos_added+=("$repo_name") - repo_args+="|deb ${repo} $VERSION_CODENAME main" -done -# NB: This PPA is needed to support modern go toolchains on ubuntu 20.04. -# After the build is updated to use 22.04, which supports go >= 1.18, it -# should no longer be needed. -repo_args="$repo_args|deb [trusted=yes] https://ppa.launchpadcontent.net/longsleep/golang-backports/ubuntu $VERSION_CODENAME main" -echo "$repo_args" -if [ "$repo_args" = "|" ]; then - repo_args="" -else - #repo_args="--othermirror"${repo_args#|}\"" - repo_args="${repo_args#|}" -fi -cd "$DEB_TOP" -# shellcheck disable=SC2086 -sudo pbuilder update --override-config $DISTRO_ID_OPT ${repo_args:+--othermirror "$repo_args"} -# fail the build if the *.symbols file(s) need updating -sudo DPKG_GENSYMBOLS_CHECK_LEVEL="${DPKG_GENSYMBOLS_CHECK_LEVEL:-4}" pbuilder build "$DEB_DSC" diff --git a/packaging/get_base_branch b/packaging/get_base_branch deleted file mode 100644 index 27515a71..00000000 --- a/packaging/get_base_branch +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -# find the base branch of the current branch - -set -eux -o pipefail -IFS=' ' read -r -a add_bases <<< "${1:-}" -origin=origin -mapfile -t all_bases < <(echo "master" - git branch -r | sed -ne "/^ $origin\\/release\\/[0-9]/s/^ $origin\\///p") -all_bases+=("${add_bases[@]}") -TARGET="master" -min_diff=-1 -for base in "${all_bases[@]}"; do - git rev-parse --verify "$origin/$base" &> /dev/null || continue - commits_ahead=$(git log --oneline "$origin/$base..HEAD" | wc -l) - if [ "$min_diff" -eq -1 ] || [ "$min_diff" -gt "$commits_ahead" ]; then - TARGET="$base" - min_diff=$commits_ahead - fi -done -echo "$TARGET" -exit 0 diff --git a/packaging/rpm_chrootbuild b/packaging/rpm_chrootbuild deleted file mode 100755 index 4dcdaa4b..00000000 --- a/packaging/rpm_chrootbuild +++ /dev/null @@ -1,140 +0,0 @@ -#!/bin/bash - -set -uex - -cp /etc/mock/"$CHROOT_NAME".cfg mock.cfg - -# Enable mock ccache plugin -cat <> mock.cfg -config_opts['plugin_conf']['ccache_enable'] = True -config_opts['plugin_conf']['ccache_opts']['dir'] = "%(cache_topdir)s/%(root)s/ccache/" -EOF - - -if [[ $CHROOT_NAME == *epel-8-x86_64 ]]; then - cat <> mock.cfg -config_opts['module_setup_commands'] = [ - ('enable', 'javapackages-tools:201801'), - ('disable', 'go-toolset') -] -EOF -fi - -# Use dnf on CentOS 7 -if [[ $CHROOT_NAME == *epel-7-x86_64 ]]; then - MOCK_OPTIONS="--dnf --no-bootstrap-chroot${MOCK_OPTIONS:+ }$MOCK_OPTIONS" -fi - -# Allow BR: foo-devel < 1.2 to work when foo-devel-1.3 is actually available -cat <> mock.cfg -config_opts['dnf.conf'] += """ -[main] -best=0 -""" -EOF - -# shellcheck disable=SC2153 -repo_adds=() -repo_dels=() - -echo -e "config_opts['yum.conf'] += \"\"\"\n" >> mock.cfg - -if [ -n "${ARTIFACTORY_URL:-}" ] && "$LOCAL_REPOS"; then - repo_dels+=("--disablerepo=\*") - - if [ -n "${REPO_FILE_URL:-}" ]; then - if [ -n "$REPO_FILES_PR" ]; then - if [[ $REPO_FILES_PR = PR-* ]]; then - build_number="lastSuccessfulBuild" - branch="$REPO_FILES_PR" - if [[ $branch = *:* ]]; then - build_number="${branch#*:}" - branch="${branch%:*}" - fi - REPO_FILE_URL="${JENKINS_URL:-https://build.hpdd.intel.com/}job/daos-do/job/repo-files/job/$branch/$build_number/artifact/" - else - if [ ! -d "$REPO_FILES_PR" ]; then - echo "Could not find your specified directory \"$REPO_FILES_PR\" to read repo-files from" - exit 1 - fi - REPO_FILE_URL="file://$(readlink -e "$REPO_FILES_PR")/" - fi - fi - curl -sSf "$REPO_FILE_URL"daos_ci-"${CHROOT_NAME%-*}".repo >> mock.cfg - repo_adds+=("--enablerepo *-artifactory") - fi -fi - -repos_added=() -for repo in $DISTRO_BASE_PR_REPOS $PR_REPOS; do - branch="master" - build_number="lastSuccessfulBuild" - if [[ $repo = *@* ]]; then - branch="${repo#*@}" - repo="${repo%@*}" - if [[ $branch = *:* ]]; then - build_number="${branch#*:}" - branch="${branch%:*}" - fi - fi - if [[ " ${repos_added[*]} " = *\ ${repo}\ * ]]; then - # don't add duplicates, first found wins - continue - fi - repos_added+=("$repo") - repo_adds+=("--enablerepo $repo:${branch//[@\/]/_}:$build_number") - echo -e "[$repo:${branch//[@\/]/_}:$build_number]\n\ -name=$repo:${branch//[@\/]/_}:$build_number\n\ -baseurl=${ARTIFACTS_URL:-${JENKINS_URL:-https://build.hpdd.intel.com/}job/}daos-stack/job/$repo/job/${branch//\//%2F}/$build_number/artifact/artifacts/$DISTRO/\n\ -enabled=1\n\ -gpgcheck=False\n" >> mock.cfg -done -for repo in $JOB_REPOS; do - repo_name=${repo##*://} - repo_name=${repo_name//\//_} - if [[ " ${repos_added[*]} " = *\ ${repo_name}\ * ]]; then - # don't add duplicates, first found wins - continue - fi - repos_added+=("$repo_name") - repo_adds+=("--enablerepo $repo_name") - echo -e "[${repo_name//[@\/]/_}]\n\ -name=${repo_name}\n\ -baseurl=${repo//\//%2F}\n\ -enabled=1\n" >> mock.cfg -done -echo "\"\"\"" >> mock.cfg - -if [ -n "$DISTRO_VERSION" ]; then - releasever_opt=("--config-opts=releasever=$DISTRO_VERSION") -fi - -bs_dir=/scratch/mock/cache/"${CHROOT_NAME}"-bootstrap -if ls -l "$bs_dir"/root_cache/cache.tar.gz; then - mkdir -p "/var/cache/mock/${CHROOT_NAME}-bootstrap/" - flock "$bs_dir" -c "cp -a $bs_dir/root_cache /var/cache/mock/${CHROOT_NAME}-bootstrap" -fi -if ls -l "$bs_dir/ccache-$CHROOT_NAME-$PACKAGE".tar.gz; then - flock "$bs_dir" -c "tar -C / -xzf $bs_dir/ccache-$CHROOT_NAME-$PACKAGE.tar.gz" -fi - -rc=0 -# shellcheck disable=SC2086,SC2048 -if ! eval time mock -r mock.cfg ${repo_dels[*]} ${repo_adds[*]} --no-clean \ - --disablerepo=\*-debug* ${releasever_opt[*]} $MOCK_OPTIONS \ - $RPM_BUILD_OPTIONS "$TARGET"; then - rc=${PIPESTATUS[0]} -fi - -# Save the ccache -if [ -d /scratch/ ]; then - mkdir -p "$bs_dir"/ - flock "$bs_dir" -c "tar -czf $bs_dir/ccache-$CHROOT_NAME-$PACKAGE.tar.gz /var/cache/mock/${CHROOT_NAME}/ccache" - if ls -l /var/cache/mock/"${CHROOT_NAME}"-bootstrap/root_cache/cache.tar.gz; then - if ! cmp /var/cache/mock/"${CHROOT_NAME}"-bootstrap/root_cache/cache.tar.gz "$bs_dir"/root_cache/cache.tar.gz; then - flock "$bs_dir" -c "cp -a /var/cache/mock/${CHROOT_NAME}-bootstrap/root_cache $bs_dir/" - fi - fi -fi - -exit "$rc" diff --git a/packaging/rpmlint--ignore-unused-rpmlintrc.patch b/packaging/rpmlint--ignore-unused-rpmlintrc.patch deleted file mode 100644 index f24075ff..00000000 --- a/packaging/rpmlint--ignore-unused-rpmlintrc.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 060fbdd03d03b0b9835b861a72f9aeb25347277d Mon Sep 17 00:00:00 2001 -From: Martin Liska -Date: Tue, 25 Jan 2022 14:29:05 +0100 -Subject: [PATCH] Add new option --ignore-unused-rpmlintrc. - -The option skips reporting of unused-rpmlintrc-filter errors. - -Fixes: #794. ---- - rpmlint/cli.py | 2 ++ - rpmlint/lint.py | 3 ++- - test/test_lint.py | 3 ++- - 3 files changed, 6 insertions(+), 2 deletions(-) - -diff --git a/rpmlint/cli.py b/rpmlint/cli.py -index 81d5b92b..8a7bc09e 100644 ---- a/rpmlint/cli.py -+++ b/rpmlint/cli.py -@@ -82,6 +82,8 @@ def process_lint_args(argv): - parser.add_argument('-i', '--installed', nargs='+', default='', help='installed packages to be validated by rpmlint') - parser.add_argument('-t', '--time-report', action='store_true', help='print time report for run checks') - parser.add_argument('-T', '--profile', action='store_true', help='print cProfile report') -+ parser.add_argument('--ignore-unused-rpmlintrc', action='store_true', -+ help='Do not report "unused-rpmlintrc-filter" errors') - lint_modes_parser = parser.add_mutually_exclusive_group() - lint_modes_parser.add_argument('-s', '--strict', action='store_true', help='treat all messages as errors') - lint_modes_parser.add_argument('-P', '--permissive', action='store_true', help='treat individual errors as non-fatal') -diff --git a/rpmlint/lint.py b/rpmlint/lint.py -index a98d2c04..1d5e0050 100644 ---- a/rpmlint/lint.py -+++ b/rpmlint/lint.py -@@ -277,7 +277,8 @@ - - # validate used filters in rpmlintrc - if is_last: -- self.output.validate_filters(pkg) -+ if not self.options['ignore_unused_rpmlintrc']: -+ self.output.validate_filters(pkg) - - if spec_checks: - self.specfiles_checked += 1 diff --git a/raft.rpmlintrc b/raft.rpmlintrc deleted file mode 100644 index 60a6c2f4..00000000 --- a/raft.rpmlintrc +++ /dev/null @@ -1,9 +0,0 @@ -# This line is mandatory to access the configuration functions -from Config import * - -# we want the static lib in this case -addFilter('raft-devel.x86_64: E: static-library-without-debuginfo /usr/lib64/libraft.a') -addFilter('raft.x86_64: E: no-binary') -addFilter('name-repeated-in-summary Raft') -# https://github.com/rpm-software-management/rpmlint/issues/856 -addFilter('W: incoherent-version-in-changelog') \ No newline at end of file diff --git a/raft.spec b/raft.spec deleted file mode 100644 index e219b09f..00000000 --- a/raft.spec +++ /dev/null @@ -1,132 +0,0 @@ -# doesn't seem to work on sles 12.3: %%{!?make_build:%%define make_build %%{__make} %%{?_smp_mflags}} -# so... -%if 0%{?suse_version} <= 1320 -%define make_build %{__make} %{?_smp_mflags} -%endif - -%bcond_with use_release - -%global debug_package %{nil} - -Name: raft -Version: 0.11.0 -Release: 1%{?relval}%{?dist} - -Summary: C implementation of the Raft Consensus protocol, BSD licensed -Provides: daos-raft = %version-%release%{?dist} - -License: BSD -URL: https://github.com/daos-stack/%{name} -Source0: https://github.com/daos-stack/%{name}/releases/download/%{shortcommit0}/%{name}-%{version}.tar.gz - -%if 0%{?suse_version} >= 1315 -Group: Development/Libraries/C and C++ -%endif - -BuildRequires: make, gcc - -%description -Raft is a consensus algorithm that is designed to be easy to understand. -It's equivalent to Paxos in fault-tolerance and performance. The difference -is that it's decomposed into relatively independent subproblems, and it -cleanly addresses all major pieces needed for practical systems. - -%package devel -Summary: Development libs -Provides: daos-raft-devel = %version-%release - -%description devel -Development libs for Raft consensus protocol - -%prep -%setup -q - -%build -# only build the static lib -%make_build GCOV_CCFLAGS= static - -%install -mkdir -p %{buildroot}/%{_libdir} -cp -a libraft.a %{buildroot}/%{_libdir} -mkdir -p %{buildroot}/%{_includedir} -cp -a include/* %{buildroot}/%{_includedir} - -%files -%defattr(-,root,root,-) -%doc README.rst -%license LICENSE - -%files devel -%defattr(-,root,root,-) -%doc README.rst -%{_libdir}/* -%{_includedir}/* - - -%changelog -* Wed Feb 14 2024 Li Wei -0.11.0-1 -- Add raft_cbs_t.get_rand -- Introduce logging levels - -* Thu Jun 22 2023 Brian J. Murrell -0.10.1-2 -- Add BR: make, gcc - -* Wed Jun 07 2023 Li Wei -0.10.1-1 -- Fix conflicts in a unit test - -* Mon Jun 05 2023 Li Wei -0.10.0-1 -- Add leadership lease -- Let leaders step down voluntarily when they can't maintain leases from majority - -* Mon Feb 13 2023 Li Wei -0.9.2-1 -- Fix assertion failures in raft_recv_requestvote - -* Fri Nov 25 2022 Brian J. Murrell -0.9.1-2 -- Change BuildArchitectures: noarch - -* Wed Apr 06 2022 Li Wei -0.9.1-1 -- Fix membership changes -- Fix node ID initialization - -* Wed Jan 05 2022 Li Wei -0.9.0-1 -- Remove the upstream optimization that allows election-less leaders -- Update packaging - -* Mon Aug 30 2021 Li Wei -0.8.1-1 -- Optimize InstallSnapshot performance -- Update packaging - -* Mon May 31 2021 Li Wei -0.8.0-1 -- Add Pre-Vote -- Set version-release for daos-raft* packages - -* Mon Apr 26 2021 Brian J. Murrell -0.7.3-2 -- Provides daos-raft to avoid getting other raft packages -- disable debug{info,source} package builds - -* Wed Feb 24 2021 Li Wei -0.7.3-1 -- Fix disruptions from removed replicas - -* Tue Feb 09 2021 Kenneth Cain - 0.7.2-1 -- Fix more Coverity issues in test_server - -* Wed Dec 02 2020 Li Wei -0.7.1-1 -- Fix Coverity issues - -* Tue Nov 10 2020 Li Wei -0.7.0-1 -- Use 63-bit log indices and terms - -* Fri May 15 2020 Kenneth Cain -0.6.0-1 -- Expose raft_election_start function - -* Fri Apr 10 2020 Brian J. Murrell -0.5.0-4 -- Add GCOV_CCFLAGS= to static build - -* Thu Apr 09 2020 Brian J. Murrell -0.5.0-3 -- Only build the static library - -* Fri Oct 04 2019 John E. Malmberg -0.5.0-2 -- SUSE rpmlint fixups - -* Mon Apr 08 2019 Brian J. Murrell -0.5.0-1 -- initial package