From Fedora Project Wiki
No edit summary
No edit summary
Line 5: Line 5:
== Downloading the packages ==
== 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.
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.


<pre>
<pre>

Revision as of 13:46, 6 July 2017

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)