Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 15 additions & 8 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,61 +1,68 @@
raft (0.9.1-2) unstable; urgency=medium

[ Brian J. Murrell ]
* Package the static lib, not the shared lib

-- Brian J. Murrell <brian.murrell@intel.com> Thu, 19 Jan 2023 12:03:53 -0500

raft (0.9.1-1) unstable; urgency=medium

[ Li Wei ]
* Fix membership changes
* Fix node ID initialization

-- Li Wei <wei.g.li@intel.com> Wed, Apr 06 2022 20:04:00 +0800
-- Li Wei <wei.g.li@intel.com> Wed, 06 Apr 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 <wei.g.li@intel.com> Wed, Jan 05 2022 14:51:00 +0800
-- Li Wei <wei.g.li@intel.com> Wed, 05 Jan 2022 14:51:00 +0800

raft (0.8.1-1) unstable; urgency=medium

[ Li Wei ]
* Optimize InstallSnapshot performance
* Update packaging

-- Li Wei <wei.g.li@intel.com> Mon, Aug 30 2021 17:47:00 +0800
-- Li Wei <wei.g.li@intel.com> Mon, 30 Aug 2021 17:47:00 +0800

raft (0.8.0-1) unstable; urgency=medium

[ Li Wei ]
* Add Pre-Vote

-- Li Wei <wei.g.li@intel.com> Mon, May 31 2021 17:25:00 +0800
-- Li Wei <wei.g.li@intel.com> Mon, 31 May 2021 17:25:00 +0800

raft (0.7.3-1) unstable; urgency=medium

[ Li Wei ]
* Fix disruptions from removed replicas

-- Li Wei <wei.g.li@intel.com> Wed, Feb 24 2021 11:53:00 +0800
-- Li Wei <wei.g.li@intel.com> Wed, 24 Feb 2021 11:53:00 +0800

raft (0.7.2-1) unstable; urgency=medium

[ Kenneth Cain ]
* Fix more Coverity issues in test_server

-- Kenneth Cain <kenneth.c.cain@intel.com> Tue, Feb 09 2021 15:20:00 +0800
-- Kenneth Cain <kenneth.c.cain@intel.com> Tue, 09 Feb 2021 15:20:00 +0800

raft (0.7.1-1) unstable; urgency=medium

[ Li Wei ]
* Fix Coverity issues

-- Li Wei <wei.g.li@intel.com> Wed, Dec 02 2020 11:30:00 +0800
-- Li Wei <wei.g.li@intel.com> Wed, 02 Dec 2020 11:30:00 +0800

raft (0.7.0-1) unstable; urgency=medium

[ Li Wei ]
* Use 63-bit log indices and terms

-- Li Wei <wei.g.li@intel.com> Tue, Nov 10 2020 10:12:37 +0800
-- Li Wei <wei.g.li@intel.com> Tue, 10 Nov 2020 10:12:37 +0800

raft (0.6.0-1) unstable; urgency=medium

Expand Down
13 changes: 0 additions & 13 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ 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
Expand All @@ -21,15 +20,3 @@ Description: C implementation of the Raft consensus protocol
.
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.
1 change: 1 addition & 0 deletions debian/libraft-dev.dirs
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
usr/lib
usr/include
lib/x86_64-linux-gnu
1 change: 1 addition & 0 deletions debian/libraft-dev.install
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
usr/include/*
lib/x86_64-linux-gnu/libraft.a
1 change: 0 additions & 1 deletion debian/libraft0.dirs

This file was deleted.

1 change: 0 additions & 1 deletion debian/libraft0.install

This file was deleted.

8 changes: 5 additions & 3 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
name := raft
prefix := /usr
includedir := $(prefix)/include
libdir := $(prefix)/lib/$(DEB_BUILD_MULTIARCH)
libdir := /lib/$(DEB_BUILD_MULTIARCH)
buildroot := debian/tmp
install_includedir := $(buildroot)$(includedir)
install_libdir := $(buildroot)$(libdir)
Expand All @@ -26,9 +26,11 @@ install_libdir := $(buildroot)$(libdir)
%:
dh $@

override_dh_auto_build:
dh_auto_build -- GCOV_CCFLAGS= static

override_dh_auto_install:
mkdir -p $(install_libdir)
mkdir -p $(install_includedir)
cp libraft.so $(install_libdir)
cp libraft.a $(install_libdir)
cp include/* $(install_includedir)

20 changes: 13 additions & 7 deletions packaging/Dockerfile.mockbuild
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,24 @@ 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
COPY packaging/rpmlint--ignore-unused-rpmlintrc.patch .
RUN (cd $(python3 -c 'import site; print(site.getsitepackages()[-1])') && \
patch -p1 && \
rm -f rpmlint/__pycache__/{cli,lint}.*.pyc) < rpmlint--ignore-unused-rpmlintrc.patch && \
RUN (cd $(python3 -c 'import site; print(site.getsitepackages()[-1])') && \
if ! grep -e --ignore-unused-rpmlintrc rpmlint/cli.py; then \
if ! patch -p1; then \
exit 1; \
fi; \
rm -f rpmlint/__pycache__/{cli,lint}.*.pyc; \
fi) < rpmlint--ignore-unused-rpmlintrc.patch; \
rm -f rpmlint--ignore-unused-rpmlintrc.patch

ARG CB0
RUN dnf -y upgrade && \
dnf clean all

# show the release that was built
ARG CACHEBUST
RUN cat /etc/os-release
58 changes: 42 additions & 16 deletions packaging/Dockerfile.ubuntu.20.04
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,59 @@
FROM ubuntu:20.04
LABEL org.opencontainers.image.authors="daos@daos.groups.io"

# use same UID as host and default value of 1000 if not specified
ARG UID=1000
ARG REPO_URL=""
ARG REPO_UBUNTU_20_04=""
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 locales \
make patch pbuilder pkg-config python3-dev python3-distro \
python3-distutils rpm scons wget cmake valgrind
python3-distutils rpm scons wget cmake valgrind rpmdevtools

# rpmdevtools
RUN echo "deb [trusted=yes] ${REPO_URL}${REPO_UBUNTU_20_04} focal main" > /etc/apt/sources.list.d/daos-stack-ubuntu-stable-local.list
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
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/sbin/pbuilder" >> /etc/sudoers.d/build; \
chmod 0440 /etc/sudoers.d/build; \
visudo -c; \
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
18 changes: 3 additions & 15 deletions packaging/Makefile_packaging.mk
Original file line number Diff line number Diff line change
Expand Up @@ -317,20 +317,6 @@ patch:
echo "PKG_GIT_COMMIT is not defined"
endif

# *_LOCAL_* repos are locally built packages.
ifeq ($(LOCAL_REPOS),true)
ifneq ($(ARTIFACTORY_URL),)
ifneq ($(DAOS_STACK_$(DISTRO_BASE)_LOCAL_REPO),)
DISTRO_REPOS = disabled # any non-empty value here works and is not used beyond testing if the value is empty or not
# convert to artifactory url
DAOS_STACK_$(DISTRO_BASE)_LOCAL_REPO := $(subst reposi,artifac,$(DAOS_STACK_$(DISTRO_BASE)_LOCAL_REPO))
# $(DISTRO_BASE)_LOCAL_REPOS is a list separated by | because you cannot pass lists
# of values with spaces as environment variables
$(DISTRO_BASE)_LOCAL_REPOS := [trusted=yes] $(ARTIFACTORY_URL)$(subst stack,stack-daos,$(DAOS_STACK_$(DISTRO_BASE)_LOCAL_REPO))
$(DISTRO_BASE)_LOCAL_REPOS += |[trusted=yes] $(ARTIFACTORY_URL)$(subst stack,stack-deps,$(DAOS_STACK_$(DISTRO_BASE)_LOCAL_REPO))
endif #ifneq ($(DAOS_STACK_$(DISTRO_BASE)_LOCAL_REPO),)
endif # ifneq ($(ARTIFACTORY_URL),)
endif # ifeq ($(LOCAL_REPOS),true)
ifeq ($(ID_LIKE),debian)
chrootbuild: $(DEB_TOP)/$(DEB_DSC)
$(call distro_map) \
Expand All @@ -346,6 +332,8 @@ chrootbuild: $(DEB_TOP)/$(DEB_DSC)
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)
Expand All @@ -360,7 +348,7 @@ chrootbuild: $(SRPM) $(CALLING_MAKEFILE)
REPO_FILE_URL="$(REPO_FILE_URL)" \
MOCK_OPTIONS="$(MOCK_OPTIONS)" \
RPM_BUILD_OPTIONS='$(RPM_BUILD_OPTIONS)' \
DISTRO_REPOS='$(DISTRO_REPOS)' \
LOCAL_REPOS='$(LOCAL_REPOS)' \
ARTIFACTORY_URL="$(ARTIFACTORY_URL)" \
DISTRO_VERSION="$(DISTRO_VERSION)" \
TARGET="$<" \
Expand Down
22 changes: 13 additions & 9 deletions packaging/debian_chrootbuild
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@

set -uex

# shellcheck disable=SC2153
IFS=\| read -r -a distro_base_local_repos <<< "$DISTRO_BASE_LOCAL_REPOS"
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" \
--othermirror \
"deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ $VERSION_CODENAME universe|deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ $VERSION_CODENAME-updates main universe" \
sudo pbuilder create \
--extrapackages "gnupg ca-certificates" \
$DISTRO_ID_OPT

repo_args=""
Expand All @@ -26,13 +25,18 @@ for repo in $DISTRO_BASE_PR_REPOS $PR_REPOS; do
fi
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
for repo in $JOB_REPOS "${distro_base_local_repos[@]}"; do
repo_args="$repo_args|deb ${repo} $VERSION_CODENAME main"

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_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 focal main"
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=""
Expand Down
3 changes: 1 addition & 2 deletions packaging/rpm_chrootbuild
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ repo_dels=()

echo -e "config_opts['yum.conf'] += \"\"\"\n" >> "$cfg_file"

if [ -n "${ARTIFACTORY_URL:-}" ] &&
[ -n "$DISTRO_REPOS" ]; then
if [ -n "${ARTIFACTORY_URL:-}" ] && "$LOCAL_REPOS"; then
repo_dels+=("--disablerepo=\*")

if [ -n "${REPO_FILE_URL:-}" ]; then
Expand Down