Remove all repo files & install composer-cli from host repos
when testing downstream snapshots this makes sure that
lorax-composer and composer-cli are coming from the host OS.
We also make 100% sure that there are no other repositories inside
the VM other than what has been configured on the host!
Make it possible to override where repo files are copied from by
defining the REPOS_DIR variable. By default the value is
/etc/yum.repos.d
Cherry-picked from bd2f4925de
Related: rhbz#1770193
This commit is contained in:
parent
50aa59cec1
commit
b81e260c4d
12
Makefile
12
Makefile
@ -15,6 +15,10 @@ endif
|
||||
export TEST_OS
|
||||
VM_IMAGE=$(CURDIR)/test/images/$(TEST_OS)
|
||||
|
||||
ifeq ($(REPOS_DIR),)
|
||||
REPOS_DIR = /etc/yum.repos.d
|
||||
endif
|
||||
|
||||
default: all
|
||||
|
||||
src/composer/version.py:
|
||||
@ -133,8 +137,14 @@ vm: $(VM_IMAGE)
|
||||
# sure VM_IMAGE is as close as possible to the host!
|
||||
vm-local-repos: vm
|
||||
bots/image-customize -v \
|
||||
--upload /etc/yum.repos.d:/etc/yum.repos.d/ \
|
||||
--run-command "rm -rf /etc/yum.repos.d" \
|
||||
$(TEST_OS)
|
||||
bots/image-customize -v \
|
||||
--upload $(REPOS_DIR):/etc/yum.repos.d \
|
||||
--run-command "yum -y remove composer-cli lorax-composer" \
|
||||
--run-command "yum -y update" \
|
||||
--run-command "yum -y install composer-cli lorax-composer" \
|
||||
--run-command "systemctl enable lorax-composer" \
|
||||
$(TEST_OS)
|
||||
|
||||
vm-reset:
|
||||
|
@ -41,12 +41,13 @@ To delete the generated image, run
|
||||
Base images are stored in `bots/images`. Set `TEST_DATA` to override this
|
||||
directory.
|
||||
|
||||
Use
|
||||
To configure the image with all repositories found on the host system use
|
||||
|
||||
$ make vm-local-repos
|
||||
|
||||
to configure the image with all repositories found on the host system! This
|
||||
is mostly useful when running tests by hand on a downstream snapshot!
|
||||
You may also define `REPOS_DIR` variable to point to another directory
|
||||
containing yum .repo files. By default the value is `/etc/yum.repos.d`!
|
||||
This is mostly useful when running tests by hand on a downstream snapshot!
|
||||
|
||||
## Running tests
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user