Skip to content

Commit

Permalink
nightly-build: use the storage-gluster-common buildroot from CentOS CBS
Browse files Browse the repository at this point in the history
Using an EPEL buildroot for CentOS packages is not correct. This can
cause problems when packages are not matching in the EPEL and CentOS
repositories.

Use the Koji profile 'cbs' provided by the centos-packager RPM to fetch
the mock-config from the CentOS CBS. Use this config to rebuild the
src.rpm so the resulting packages have correct dependencies.

Updates: #22
Signed-off-by: Niels de Vos <[email protected]>
  • Loading branch information
nixpanic committed Mar 30, 2020
1 parent 28b4b04 commit 99f27de
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions jobs/scripts/nightly-builds/nightly-builds.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ artifact()
set -e

# install basic dependencies for building the tarball and srpm
yum -y install git autoconf automake gcc libtool bison flex make rpm-build mock createrepo_c
yum -y install git autoconf automake gcc libtool bison flex make rpm-build mock createrepo_c centos-packager
# gluster repositories contain additional -devel packages
yum -y install centos-release-storage-common centos-release-gluster
yum -y install python-devel libaio-devel librdmacm-devel libattr-devel libxml2-devel readline-devel openssl-devel libibverbs-devel fuse-devel glib2-devel userspace-rcu-devel libacl-devel sqlite-devel libuuid-devel
Expand Down Expand Up @@ -77,11 +77,17 @@ case "${CENTOS_VERSION}/${GIT_VERSION}" in
;;
esac

# fetch the mock buildroot configuration from the CBS
CBS_TAG="storage${CENTOS_VERSION}-gluster-common-el${CENTOS_VERSION}-build"
# the MOCK_ROOT should match config_opts['root'] from the mock-config
MOCK_ROOT="${CBS_TAG}-repo_latest"
koji -p cbs mock-config --latest --arch="${CENTOS_ARCH}" --tag="${CBS_TAG}" > /etc/mock/"${MOCK_ROOT}".cfg

# do the actual RPM build in mock
# TODO: use a CentOS Storage SIG buildroot
RESULTDIR=/srv/gluster/nightly/${GERRIT_BRANCH}/${CENTOS_VERSION}/${CENTOS_ARCH}
/usr/bin/mock \
--root epel-${CENTOS_VERSION}-${CENTOS_ARCH} \
--root "${MOCK_ROOT}" \
${MOCK_RPM_OPTS} \
--resultdir ${RESULTDIR} \
--rebuild ${SRPM}
Expand Down

0 comments on commit 99f27de

Please sign in to comment.