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
This commit is contained in:
Sergey Kulanov 2016-04-12 23:36:39 +03:00 committed by Valeriy Sakharov
parent 3b9baf4a74
commit 3102e7fc29
2 changed files with 17 additions and 0 deletions

View File

@ -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" # Example: EXTRA_RPM_REPOS="lolo,http://my.cool.repo/rpm,priority bar,ftp://repo.foo,priority"
EXTRA_RPM_REPOS?= 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:=, comma:=,
# Path to yaml configuration file to build ISO ks.cfg # Path to yaml configuration file to build ISO ks.cfg

View File

@ -42,6 +42,16 @@ gpgcheck=0
priority=3 priority=3
endef 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 define sandbox_yum_conf
[main] [main]
cachedir=/tmp/cache cachedir=/tmp/cache
@ -121,6 +131,7 @@ $(yum_upstream_repo)
$(yum_epel_repo) $(yum_epel_repo)
$(yum_local_repo) $(yum_local_repo)
$(yum_local_mos_repo) $(yum_local_mos_repo)
$(yum_extra_build_repo)
EOF 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' 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 # 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_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_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_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: show-centos-sandbox-repos:
/bin/echo -e "$${sandbox_yum_conf_content}\n" /bin/echo -e "$${sandbox_yum_conf_content}\n"
/bin/echo -e "$${yum_upstream_repo_content}\n" /bin/echo -e "$${yum_upstream_repo_content}\n"
/bin/echo -e "$${yum_epel_repo_content}\n" /bin/echo -e "$${yum_epel_repo_content}\n"
/bin/echo -e "$${yum_local_repo_content}\n" /bin/echo -e "$${yum_local_repo_content}\n"
/bin/echo -e "$${yum_local_mos_repo_content}\n" /bin/echo -e "$${yum_local_mos_repo_content}\n"
/bin/echo -e "$${yum_extra_build_repo_content}\n"