Skip to content

Commit

Permalink
Make build basesystem configurable
Browse files Browse the repository at this point in the history
Signed-off-by: Janusz Marcinkiewicz <[email protected]>
  • Loading branch information
VirrageS committed May 10, 2023
1 parent 79cddc5 commit c2a187f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ deps-sync:
SYNC_VENDOR=true hack/dockerized " ./hack/dep-update.sh --sync-only && ./hack/dep-prune.sh && ./hack/bazel-generate.sh"

rpm-deps:
SYNC_VENDOR=true hack/dockerized "CUSTOM_REPO=${CUSTOM_REPO} SINGLE_ARCH=${SINGLE_ARCH} LIBVIRT_VERSION=${LIBVIRT_VERSION} QEMU_VERSION=${QEMU_VERSION} SEABIOS_VERSION=${SEABIOS_VERSION} EDK2_VERSION=${EDK2_VERSION} LIBGUESTFS_VERSION=${LIBGUESTFS_VERSION} GUESTFSTOOLS_VERSION=${GUESTFSTOOLS_VERSION} PASST_VERSION=${PASST_VERSION} VIRTIOFSD_VERSION=${VIRTIOFSD_VERSION} SWTPM_VERSION=${SWTPM_VERSION} ./hack/rpm-deps.sh"
SYNC_VENDOR=true hack/dockerized "CUSTOM_REPO=${CUSTOM_REPO} SINGLE_ARCH=${SINGLE_ARCH} BASESYSTEM=${BASESYSTEM} LIBVIRT_VERSION=${LIBVIRT_VERSION} QEMU_VERSION=${QEMU_VERSION} SEABIOS_VERSION=${SEABIOS_VERSION} EDK2_VERSION=${EDK2_VERSION} LIBGUESTFS_VERSION=${LIBGUESTFS_VERSION} GUESTFSTOOLS_VERSION=${GUESTFSTOOLS_VERSION} PASST_VERSION=${PASST_VERSION} VIRTIOFSD_VERSION=${VIRTIOFSD_VERSION} SWTPM_VERSION=${SWTPM_VERSION} ./hack/rpm-deps.sh"

bump-images:
hack/dockerized "./hack/rpm-deps.sh && ./hack/bump-distroless.sh"
Expand Down
31 changes: 16 additions & 15 deletions hack/rpm-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ PASST_VERSION=${PASST_VERSION:-0:0^20221110.g4129764-1.el9}
VIRTIOFSD_VERSION=${VIRTIOFSD_VERSION:-0:1.5.0-1.el9}
SWTPM_VERSION=${SWTPM_VERSION:-0:0.8.0-1.el9}
SINGLE_ARCH=${SINGLE_ARCH:-""}
BASESYSTEM=${BASESYSTEM:-"centos-stream-release"}

bazeldnf_repos="--repofile rpm/repo.yaml"
if [ "${CUSTOM_REPO}" ]; then
Expand Down Expand Up @@ -165,7 +166,7 @@ if [ -z "${SINGLE_ARCH}" ] || [ "${SINGLE_ARCH}" == "x86_64" ]; then
//:bazeldnf -- rpmtree \
--public --nobest \
--name testimage_x86_64 \
--basesystem centos-stream-release \
--basesystem ${BASESYSTEM} \
${bazeldnf_repos} \
$centos_main \
$centos_extra \
Expand All @@ -176,7 +177,7 @@ if [ -z "${SINGLE_ARCH}" ] || [ "${SINGLE_ARCH}" == "x86_64" ]; then
//:bazeldnf -- rpmtree \
--public --nobest \
--name libvirt-devel_x86_64 \
--basesystem centos-stream-release \
--basesystem ${BASESYSTEM} \
${bazeldnf_repos} \
$centos_main \
$centos_extra \
Expand All @@ -188,7 +189,7 @@ if [ -z "${SINGLE_ARCH}" ] || [ "${SINGLE_ARCH}" == "x86_64" ]; then
//:bazeldnf -- rpmtree \
--public --nobest \
--name sandboxroot_x86_64 \
--basesystem centos-stream-release \
--basesystem ${BASESYSTEM} \
${bazeldnf_repos} \
$centos_main \
$centos_extra \
Expand All @@ -199,7 +200,7 @@ if [ -z "${SINGLE_ARCH}" ] || [ "${SINGLE_ARCH}" == "x86_64" ]; then
//:bazeldnf -- rpmtree \
--public --nobest \
--name launcherbase_x86_64 \
--basesystem centos-stream-release \
--basesystem ${BASESYSTEM} \
--force-ignore-with-dependencies '^mozjs60' \
--force-ignore-with-dependencies 'python' \
${bazeldnf_repos} \
Expand All @@ -215,7 +216,7 @@ if [ -z "${SINGLE_ARCH}" ] || [ "${SINGLE_ARCH}" == "x86_64" ]; then
//:bazeldnf -- rpmtree \
--public --nobest \
--name handlerbase_x86_64 \
--basesystem centos-stream-release \
--basesystem ${BASESYSTEM} \
--force-ignore-with-dependencies 'python' \
${bazeldnf_repos} \
$centos_main \
Expand All @@ -227,7 +228,7 @@ if [ -z "${SINGLE_ARCH}" ] || [ "${SINGLE_ARCH}" == "x86_64" ]; then
//:bazeldnf -- rpmtree \
--public --nobest \
--name libguestfs-tools \
--basesystem centos-stream-release \
--basesystem ${BASESYSTEM} \
$centos_main \
$centos_extra \
$libguestfstools_main \
Expand All @@ -246,7 +247,7 @@ if [ -z "${SINGLE_ARCH}" ] || [ "${SINGLE_ARCH}" == "x86_64" ]; then
//:bazeldnf -- rpmtree \
--public --nobest \
--name exportserverbase_x86_64 \
--basesystem centos-stream-release \
--basesystem ${BASESYSTEM} \
${bazeldnf_repos} \
$centos_main \
$centos_extra \
Expand All @@ -257,7 +258,7 @@ if [ -z "${SINGLE_ARCH}" ] || [ "${SINGLE_ARCH}" == "x86_64" ]; then
//:bazeldnf -- rpmtree \
--public --nobest \
--name pr-helper_x86_64 \
--basesystem centos-stream-release \
--basesystem ${BASESYSTEM} \
${bazeldnf_repos} \
$pr_helper

Expand All @@ -284,7 +285,7 @@ if [ -z "${SINGLE_ARCH}" ] || [ "${SINGLE_ARCH}" == "aarch64" ]; then
//:bazeldnf -- rpmtree \
--public --nobest \
--name testimage_aarch64 --arch aarch64 \
--basesystem centos-stream-release \
--basesystem ${BASESYSTEM} \
${bazeldnf_repos} \
$centos_main \
$centos_extra \
Expand All @@ -295,7 +296,7 @@ if [ -z "${SINGLE_ARCH}" ] || [ "${SINGLE_ARCH}" == "aarch64" ]; then
//:bazeldnf -- rpmtree \
--public --nobest \
--name libvirt-devel_aarch64 --arch aarch64 \
--basesystem centos-stream-release \
--basesystem ${BASESYSTEM} \
${bazeldnf_repos} \
$centos_main \
$centos_extra \
Expand All @@ -307,7 +308,7 @@ if [ -z "${SINGLE_ARCH}" ] || [ "${SINGLE_ARCH}" == "aarch64" ]; then
//:bazeldnf -- rpmtree \
--public --nobest \
--name sandboxroot_aarch64 --arch aarch64 \
--basesystem centos-stream-release \
--basesystem ${BASESYSTEM} \
${bazeldnf_repos} \
$centos_main \
$centos_extra \
Expand All @@ -318,7 +319,7 @@ if [ -z "${SINGLE_ARCH}" ] || [ "${SINGLE_ARCH}" == "aarch64" ]; then
//:bazeldnf -- rpmtree \
--public --nobest \
--name launcherbase_aarch64 --arch aarch64 \
--basesystem centos-stream-release \
--basesystem ${BASESYSTEM} \
--force-ignore-with-dependencies '^mozjs60' \
--force-ignore-with-dependencies 'python' \
${bazeldnf_repos} \
Expand All @@ -334,7 +335,7 @@ if [ -z "${SINGLE_ARCH}" ] || [ "${SINGLE_ARCH}" == "aarch64" ]; then
//:bazeldnf -- rpmtree \
--public --nobest \
--name handlerbase_aarch64 --arch aarch64 \
--basesystem centos-stream-release \
--basesystem ${BASESYSTEM} \
--force-ignore-with-dependencies 'python' \
${bazeldnf_repos} \
$centos_main \
Expand All @@ -347,7 +348,7 @@ if [ -z "${SINGLE_ARCH}" ] || [ "${SINGLE_ARCH}" == "aarch64" ]; then
//:bazeldnf -- rpmtree \
--public --nobest \
--name exportserverbase_aarch64 --arch aarch64 \
--basesystem centos-stream-release \
--basesystem ${BASESYSTEM} \
${bazeldnf_repos} \
$centos_main \
$centos_extra \
Expand All @@ -358,7 +359,7 @@ if [ -z "${SINGLE_ARCH}" ] || [ "${SINGLE_ARCH}" == "aarch64" ]; then
//:bazeldnf -- rpmtree \
--public --nobest \
--name pr-helper_aarch64 --arch aarch64 \
--basesystem centos-stream-release \
--basesystem ${BASESYSTEM} \
${bazeldnf_repos} \
$pr_helper

Expand Down

0 comments on commit c2a187f

Please sign in to comment.