[Starlingx-discuss] [Build][MultiOS] Use of current centOS spec files in Mock build system with repos
Victor Rodriguez
vm.rod25 at gmail.com
Wed May 8 19:44:44 UTC 2019
Hi team
A few weeks ago I had the curiosity to investigate if there was an rpm
repo in CENGN for starling X. Scott was very kind to point me about,
thanks a lot Scott. Why this is related to multi-os? RPM repositories
are warehouses of RPM package files that are easy to consume to build
with upstream tools like mock. mock is a tool for building RPM
packages. we can use mock to build packages for many different
versions of CentOS/Red Hat and Fedora.
After some experiments I was able to build basic packages from fault
management using the following methodology:
1) set up mock in my Linux distro ( in my case centos 7.6 )
2) use the following mock repositories config file to build:
https://github.com/starlingx-staging/stx-packaging/blob/master/configs/docker-centos-img/local-centos-7-x86_64.cfg
3) build as:
srpm :
mock -r $(MOCK_CONFIG) --buildsrpm --spec=$(SPEC) --sources=$(SOURCES)
--resultdir $(RES_DIR) --define="tis_patch_ver $(TIS_PATCH_VER)"
rpm :
mock -r $(MOCK_CONFIG) --rebuild $(SRPM) --resultdir $(RES_DIR)
--define="tis_patch_ver $(TIS_PATCH_VER)"
( the variables point to the location of my spec file and source
tar.gz files, the MOCK_CONFIG points to the path of my
local-centos-7-x86_64.cfg file )
In the end, it works pretty straight forward, proving the following
points from this experiment ( hopefully useful for someone else ) :
a) If we use the CENGN repos ( plus the centos repo ) is possible to
build an RPM w/o the need to download the mirror. Great job Scott and
build team!
b) Is possible to use alternative upstream tools to build a single RPM
w/o the need to rebuild the build dependencies.
Now a few questions came to me :
a ) Are these CENGN repos in active use, I mean, are they updated with
a new ISO or every time a developer merge a commit in master?
b) After trying to build all the packages in fault management I found that:
* the source files directories are not standard ( I know Erich is
working on this )
* there are missing BuildRequires in the current centos spec files (
they build due to the specific architecture that builds system has to
handle/install the build req in a parallel build )
In the aim of improving the project to some other members of the
community use different tools to build different layers of the OS. I
was wonder how valuable the community see the task of adding the
proper BuildRequires in all the flock spec files that have missing
ones. I create a launchpad and a patch for the missing build req I
found in fm-rest-api:
https://review.opendev.org/#/c/657869/
Any feedback from the community more than welcome
Regards
Victor Rodriguez
More information about the Starlingx-discuss
mailing list