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 think 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
Some of the root packages needed are:
[hamzy@pkvmci853 ~]$ while read FAIL; do DIR=$(dirname ${FAIL}); grep --ignore-case --no-filename 'No Package found' ${DIR}/root.log | sed 's,^.*No Package found for ,,' | sort | uniq; done < <(find ~/mockchain.pike/ -name fail) nodejs etcd python3-devel python34-unittest2 python3-funcsigs python3-pbr python-oslo-i18n python-oslotest python-oslo-config python-oslotest
Pulling in other, already built repositories, and building again:
[hamzy@pkvmci853 ~]$ rm -rf ~/mockchain.pike/mock-repo/results/epel-7-ppc64le/ [hamzy@pkvmci853 ~]$ (export ADDREPO="--addrepo=https://cbs.centos.org/repos/cloud7-openstack-common-release/ppc64le/os/ --addrepo=https://cbs.centos.org/repos/cloud7-openstack-common-candidate/ppc64le/os/"; cd mockchain.pike/; time mockchain -r fast-epel-7-ppc64le --tmp_prefix=mockbuild --localrepo=mock-repo ${ADDREPO} --log=mockchain.log --recurse *.src.rpm) real 1135m20.712s user 1760m16.636s sys 163m49.094s [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") 510 packages built successfully and 31 packages failed
is a little better. The following packages fail to build:
[hamzy@pkvmci853 ~]$ while read FAIL; do A=$(dirname ${FAIL}); B=$(basename ${A}); echo ${B}; done < <(find ~/mockchain.pike/ -name fail) mozjs38-38.8.0-2.el7 mariadb-galera-5.5.40-3.el7 nodejs-6.10.2-1.el7 libunwind-1.1-3.el7 dibbler-1.0.1-0.RC1.2.el7 erlang-rebar-2.1.0-0.0.el7 mongodb-3.2.8-3.el7 gdal-1.11.4-1.el7 openstack-tripleo-ui-deps-7-5.el7 phantomjs-1.9.7-3.el7 python-cassandra-driver-3.7.1-4.el7 python-cradox-1.3.2-1.el7 python-etcd-0.4.3-5.el7 python-flake8-2.4.1-2.el7 python-flask-babel-0.9-1.el7 python-httplib2-0.9.2-1.el7 python-influxdb-4.0.0-1.el7.1 python-kubernetes-2.0.0-1.el7 python-mock-2.0.0-1.el7 python-murano-pkg-check-0.3.0-2.el7 python-nose-1.3.7-7.el7 python-openstackdocstheme-1.11.0-1.el7 python-pyasn1-0.1.9-6.el7.1 python-ryu-4.13-2.el7 python-sphinxcontrib-programoutput-0.8-6.el7 python-sphinxcontrib-websupport-1.0.1-1.el7 python-statsd-3.2.1-5.el7 python-tables-3.1.1-2.el7 python-tinyrpc-0.5-4.20170523git1f38ac.el7 python-tosca-parser-0.7.0-1.el7 python-urllib3-1.16-1.el7 qhull-2015.2-1.el7 qpid-dispatch-0.6.1-4.el7 subunit-1.0.0-1.el7 v8-3.14.5.10-14.el7
python-httplib2
python-httplib2 has hardcoded python3 dependencies in the spec file when CentOS uses python34. I honestly do not understand how this builds in CBS.
[hamzy@pkvmci853 ~]$ wget --quiet -O - 'http://cbs.centos.org/kojifiles/packages/python-httplib2/0.9.1/2.el7/src/python-httplib2-0.9.1-2.el7.src.rpm' | rpm2cpio | cpio --extract --to-stdout python-httplib2.spec 2>/dev/null | grep 'BuildRequires:' BuildRequires: python-setuptools BuildRequires: python-devel BuildRequires: python3-devel