2a0922bfe0
As noted inline, there is a hidden missing dependency Change-Id: Ida30fc6094ff79f77c4b0cb24c32dda96d4215de
47 lines
1.5 KiB
YAML
47 lines
1.5 KiB
YAML
- hosts: all
|
|
tasks:
|
|
|
|
- name: Build CentOS 8 packages of OpenAFS
|
|
shell: |
|
|
set -eux
|
|
|
|
VERSION=1.8.4
|
|
SRC_VERSION=${VERSION}-1
|
|
SRC_RPM=openafs-${SRC_VERSION}.src.rpm
|
|
SRC_URL=https://www.openafs.org/dl/openafs/${VERSION}/${SRC_RPM}
|
|
|
|
UPSTREAM_BASE=https://tarballs.openstack.org/project-config/package-afs-centos8
|
|
UPSTREAM_CHECK=${UPSTREAM_BASE}/openafs-client-${SRC_VERSION}.el8.x86_64.rpm
|
|
if wget -O/dev/null -q $UPSTREAM_CHECK; then
|
|
echo "Found existing upstream RPM build, nothing to do"
|
|
# scp should just publish nothing
|
|
exit 0
|
|
fi
|
|
|
|
# some common prereqs
|
|
sudo dnf -y group install "Development Tools"
|
|
sudo dnf -y install rpm-build kernel-devel createrepo
|
|
|
|
wget $SRC_URL
|
|
# install the build dependencies for the package
|
|
sudo dnf builddep -y ./${SRC_RPM}
|
|
|
|
# for whatever reason (I think because it is in a macro
|
|
# check in the .spec) the above builddep misses this
|
|
# dependency
|
|
sudo dnf install -y elfutils-devel
|
|
|
|
# install source-rpm
|
|
# (this installs to ~/rpmbuild)
|
|
rpm -i ./${SRC_RPM}
|
|
|
|
# build everything
|
|
pushd ~/rpmbuild/SPECS/
|
|
rpmbuild -ba ./openafs.spec
|
|
popd
|
|
|
|
# create final repo for copying
|
|
createrepo ~/rpmbuild/RPMS/x86_64
|
|
args:
|
|
executable: /bin/bash
|