[Starlingx-discuss] [multios][build] Build flock services with plan mock

Victor Rodriguez vm.rod25 at gmail.com
Wed Aug 14 18:24:42 UTC 2019


Hello team/Scott

Last week during the building meeting I took the AR to experiment and
if possible fix all the missing build requirements for the flock
services. Why am I interested in this? To enable the community to bein
able to build the core technology of starling x using the build system
for spec/srpms they prefer. The one that I used for this case is a
plain mock. As we know mock is a tool for building RPM packages. You
can use mock to build packages for many different versions of
CentOS/Red Hat and Fedora.

The main advantage of using mock to build RPMs instead of rpmbuild is
that mock builds RPMs in a cleanroom environment. mock does this by
creating a chroot and performing the RPM build in the chroot.

In my case, I don't have at home a really powerful workstation, so I
decided to create a solution for my HW limitations. Here is a simple
solution to build the SRPMS from the flock services using containers.

https://github.com/VictorRodriguez/stx-packaging/tree/build_w_docker_centos/configs/docker-centos-img

The docker image provided is a plain vanilla centos 7 w/ the necessary
packages for mock and rpmbuild. It also add local-centos-7-x86_64.cfg
which point to regular vanilla centos 7 yum repo[0] as well as the stx
yum input/output repos [1][2]

I am testing this on my regular laptop w/ docker and works fine. The
docker image builds one flock service at the time with the command
(using an example):

$ make upstream-pkg SRPM=mtce-1.0-154.tis.src.rpm
MOCK_CONFIG=local-centos-7-x86_64

Here an update of the flock services that I have tested so far and the
errors I have found.

https://docs.google.com/spreadsheets/d/1kWrV3A28tTc3xgKiYtbir3ymcI4pew3VosE0jfB9_Fo/edit?usp=sharing

Scott, I have one question, on the IRC channel I ask about why sometimes the
http://mirror.starlingx.cengn.ca/mirror/starlingx/master/centos/latest_build/outputs/RPMS/std/
link shows as forbidden or down. Is this because I catch it in the
middle of an image creation?

[0] http://mirror.centos.org/centos/7/extras/x86_64/
[1] http://mirror.starlingx.cengn.ca/mirror/starlingx/master/centos/latest_build/outputs/RPMS/std/
[2]http://mirror.starlingx.cengn.ca/mirror/starlingx/master/centos/latest_build/inputs/RPMS/

TODO:

Enable from Makefile to build the flock service if I provide not the
SRPM but the tarball and the spec file. The problem that I have is at
the handling of the Flock Package Version when I create the tarballs
by myself.

 I hope that this works for someone else.

Regards

Victor Rodriguez



More information about the Starlingx-discuss mailing list