goal
The goal is to build the following repository: https://buildlogs.centos.org/centos/7/cloud/ppc64le/openstack-pike/
Downloading the packages
Unfortunately, there is no corresponding SRPM directory to directly download the source packages. So I need to download all packages tagged with cloud7-openstack-pike-el7-build from CBS.
while read SRPM do echo "Downloading ${SRPM}" ((TRIES=5)) while ((TRIES > 0)) do cbs download-build --arch=src ${SRPM} if [ $? -eq 0 ] then break fi ((TRIES -= 1)) done; done < <(cbs list-tagged cloud7-openstack-pike-el7-build --rpms --arch=src --inherit --latest-n=1)
Building the packages
The simplest way (although not the fastest) is to build them all with mockchain.
mockchain -r epel-7-ppc64le --tmp_prefix=mockbuild --localrepo=mock-repo --log=mockchain.log --recurse *.src.rpm
Unfortunately, they all do not build:
[hamzy@pkvmci853 ~]$ (SUCCESS=$(find ~/mockchain.pike/ -name success | wc -l); FAIL=$(find ~/mockchain.pike/ -name fail | wc -l); echo "${SUCCESS} packages built successfully and ${FAIL} packages failed") 473 packages built successfully and 71 packages failed