From 3102e7fc292064b1dccea875fb6cc4e0aaf8d459 Mon Sep 17 00:00:00 2001 From: Sergey Kulanov Date: Tue, 12 Apr 2016 23:36:39 +0300 Subject: [PATCH] Allow to pass RPM repos to build-sandbox We need to have an abitily to pass some custom rpm repos into rpm build-sandbox Closes-bug: #1619309 Change-Id: Ie328e5b18c3a81f67b5d19ef0d3992594e7f58c6 --- config.mk | 4 ++++ sandbox.mk | 13 +++++++++++++ 2 files changed, 17 insertions(+) diff --git a/config.mk b/config.mk index 147361470..5f610da52 100644 --- a/config.mk +++ b/config.mk @@ -167,6 +167,10 @@ MIRROR_FUEL?=http://mirror.fuel-infra.org/mos-repos/centos/$(PRODUCT_NAME)$(PROD # Example: EXTRA_RPM_REPOS="lolo,http://my.cool.repo/rpm,priority bar,ftp://repo.foo,priority" EXTRA_RPM_REPOS?= +# define RPM repo which contains fuel rpm-build-dep packages, in format +# EXTRA_RPM_BUILDDEP_REPO=http://my.cool.repo/rpm +EXTRA_RPM_BUILDDEP_REPO?= + comma:=, # Path to yaml configuration file to build ISO ks.cfg diff --git a/sandbox.mk b/sandbox.mk index 0c386c366..9d34dc913 100644 --- a/sandbox.mk +++ b/sandbox.mk @@ -42,6 +42,16 @@ gpgcheck=0 priority=3 endef +ifdef EXTRA_RPM_BUILDDEP_REPO +define yum_extra_build_repo +[extra_build] +name=Extra Build +baseurl=$(EXTRA_RPM_BUILDDEP_REPO) +gpgcheck=0 +priority=2 +endef +endif + define sandbox_yum_conf [main] cachedir=/tmp/cache @@ -121,6 +131,7 @@ $(yum_upstream_repo) $(yum_epel_repo) $(yum_local_repo) $(yum_local_mos_repo) +$(yum_extra_build_repo) EOF echo $(SANDBOX_PACKAGES) | xargs -n1 | xargs -I_package sudo sh -c 'rm -vf $(SANDBOX)/etc/yum.repos.d/Cent*; chroot $(SANDBOX) yum -y --nogpgcheck install _package' # clean all repos except the MOS + upsream + our epel @@ -247,9 +258,11 @@ show-centos-sandbox-repos: export yum_upstream_repo_content:=$(yum_upstream_repo show-centos-sandbox-repos: export yum_epel_repo_content:=$(yum_epel_repo) show-centos-sandbox-repos: export yum_local_repo_content:=$(yum_local_repo) show-centos-sandbox-repos: export yum_local_mos_repo_content:=$(yum_local_mos_repo) +show-centos-sandbox-repos: export yum_extra_build_repo_content:=$(yum_extra_build_repo) show-centos-sandbox-repos: /bin/echo -e "$${sandbox_yum_conf_content}\n" /bin/echo -e "$${yum_upstream_repo_content}\n" /bin/echo -e "$${yum_epel_repo_content}\n" /bin/echo -e "$${yum_local_repo_content}\n" /bin/echo -e "$${yum_local_mos_repo_content}\n" + /bin/echo -e "$${yum_extra_build_repo_content}\n"