F one-infra#39: Add weak dependency support

New variable RECOMMENDS can be used as a weak dependency list on rpm and
deb based distros.

The package open-vm-tools is moved to RECOMMENDS on el7 and el8 due to
the absence of arm64 version of these packages in RH distros.

Signed-off-by: Petr Ospalý <pospaly@opennebula.io>
pull/255/head
Petr Ospalý 3 years ago
parent 72b895dcea
commit 6c1ff12d74
No known key found for this signature in database
GPG Key ID: 96B7C54C30DA9F72

@ -198,6 +198,8 @@ else
--rpm-os linux \ --rpm-os linux \
--rpm-summary "${SUMMARY}" \ --rpm-summary "${SUMMARY}" \
${DEPENDS:+ --depends ${DEPENDS// / --depends }} \ ${DEPENDS:+ --depends ${DEPENDS// / --depends }} \
${RECOMMENDS:+ --rpm-tag Recommends:${RECOMMENDS// / --rpm-tag Recommends:}} \
${RECOMMENDS:+ --deb-recommends ${RECOMMENDS// / --deb-recommends }} \
${REPLACES:+ --replaces ${REPLACES// / --replaces }} \ ${REPLACES:+ --replaces ${REPLACES// / --replaces }} \
${CONFLICTS:+ --conflicts ${CONFLICTS// / --conflicts }} \ ${CONFLICTS:+ --conflicts ${CONFLICTS// / --conflicts }} \
${PROVIDES:+ --provides ${PROVIDES// / --provides }} \ ${PROVIDES:+ --provides ${PROVIDES// / --provides }} \

@ -53,7 +53,8 @@ case "${TARGET}" in
RELSUFFIX=${RELSUFFIX:-.el7} RELSUFFIX=${RELSUFFIX:-.el7}
TYPE=${TYPE:-rpm} TYPE=${TYPE:-rpm}
TAGS=${TAGS:-linux rpm systemd one network-scripts} TAGS=${TAGS:-linux rpm systemd one network-scripts}
DEPENDS=${DEPENDS:-util-linux bash curl bind-utils cloud-utils-growpart parted ruby rubygem-json sudo shadow-utils openssh-server open-vm-tools qemu-guest-agent gawk virt-what} DEPENDS=${DEPENDS:-util-linux bash curl bind-utils cloud-utils-growpart parted ruby rubygem-json sudo shadow-utils openssh-server qemu-guest-agent gawk virt-what}
RECOMMENDS=${RECOMMENDS:-open-vm-tools}
PROVIDES=${PROVIDES:-} PROVIDES=${PROVIDES:-}
REPLACES=${REPLACES:-cloud-init} REPLACES=${REPLACES:-cloud-init}
CONFLICTS=${CONFLICTS:-${REPLACES} one-context-ec2} CONFLICTS=${CONFLICTS:-${REPLACES} one-context-ec2}
@ -68,7 +69,8 @@ case "${TARGET}" in
RELSUFFIX=${RELSUFFIX:-.el8} RELSUFFIX=${RELSUFFIX:-.el8}
TYPE=${TYPE:-rpm} TYPE=${TYPE:-rpm}
TAGS=${TAGS:-linux rpm systemd one network-scripts} TAGS=${TAGS:-linux rpm systemd one network-scripts}
DEPENDS=${DEPENDS:-util-linux bash curl bind-utils cloud-utils-growpart parted ruby rubygem-json sudo shadow-utils openssh-server open-vm-tools qemu-guest-agent network-scripts gawk virt-what} DEPENDS=${DEPENDS:-util-linux bash curl bind-utils cloud-utils-growpart parted ruby rubygem-json sudo shadow-utils openssh-server qemu-guest-agent network-scripts gawk virt-what}
RECOMMENDS=${RECOMMENDS:-open-vm-tools}
PROVIDES=${PROVIDES:-} PROVIDES=${PROVIDES:-}
REPLACES=${REPLACES:-cloud-init} REPLACES=${REPLACES:-cloud-init}
CONFLICTS=${CONFLICTS:-${REPLACES} one-context-ec2} CONFLICTS=${CONFLICTS:-${REPLACES} one-context-ec2}

Loading…
Cancel
Save