Skip to content

Commit

Permalink
Add a script to resolve RPM dependencies
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Mohr <rmohr@redhat.com>
  • Loading branch information
rmohr committed Dec 22, 2020
1 parent cd10bb8 commit dfb4a3b
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ deps-update-patch:
deps-update:
SYNC_VENDOR=true hack/dockerized " ./hack/dep-update.sh && ./hack/dep-prune.sh && ./hack/bazel-generate.sh"

rpm-deps:
SYNC_VENDOR=true hack/dockerized " ./hack/rpm-deps.sh"

build-verify:
hack/build-verify.sh

Expand Down
50 changes: 50 additions & 0 deletions hack/rpm-deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/usr/bin/env bash

set -ex

source hack/common.sh
source hack/config.sh

basesystem="glibc-langpack-en coreutils-single libcurl-minimal curl-minimal"

# get latest repo data from repo.yaml
bazel run \
--config=${ARCHITECTURE} \
//:bazeldnf -- fetch

# create a rpmtree for our test image with misc. tools.
bazel run \
--config=${ARCHITECTURE} \
//:bazeldnf -- rpmtree --public --name testimage_x86_64 \
$basesystem \
qemu-img \
qemu-guest-agent \
stress \
dmidecode \
virt-what \
which \
nginx \
scsi-target-utils \
procps-ng \
nmap-ncat \
iputils \
e2fsprogs

bazel run \
--config=${ARCHITECTURE} \
//:bazeldnf -- rpmtree --public --arch=ppc64le --name testimage_ppc64le \
$basesystem \
qemu-img \
qemu-guest-agent \
stress \
nginx \
scsi-target-utils \
procps-ng \
nmap-ncat \
iputils \
e2fsprogs

# remove all RPMs which are no longer referenced by a rpmtree
bazel run \
--config=${ARCHITECTURE} \
//:bazeldnf -- prune

0 comments on commit dfb4a3b

Please sign in to comment.