diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-01-06 19:27:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-06 19:27:03 +0100 |
commit | 2d8f1c8fda4d0a8b7c41addbc89f0b2f83908ec2 (patch) | |
tree | ed1a3d28f8018874564786c22b1537479464ce53 /contrib/build_rpm.sh | |
parent | 2e0157a2d50562cfbea1173791220aec4cbce233 (diff) | |
parent | 16b793a45aca4cee998ff65f37bebadcf51c7618 (diff) | |
download | podman-2d8f1c8fda4d0a8b7c41addbc89f0b2f83908ec2.tar.gz podman-2d8f1c8fda4d0a8b7c41addbc89f0b2f83908ec2.tar.bz2 podman-2d8f1c8fda4d0a8b7c41addbc89f0b2f83908ec2.zip |
Merge pull request #4762 from NevilleC/nc-issue4367
Generate binaries only if there are changes in src code.
Diffstat (limited to 'contrib/build_rpm.sh')
-rwxr-xr-x | contrib/build_rpm.sh | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/contrib/build_rpm.sh b/contrib/build_rpm.sh index 088d8b7a5..b64973f0d 100755 --- a/contrib/build_rpm.sh +++ b/contrib/build_rpm.sh @@ -30,22 +30,26 @@ declare -a PKGS=(device-mapper-devel \ ) if [[ $pkg_manager == *dnf ]]; then + # We need to enable PowerTools if we want to get + # install all the pkgs we define in PKGS + sudo dnf config-manager --set-enabled PowerTools + PKGS+=(python3-devel \ python3-varlink \ ) - # btrfs-progs-devel is not available in CentOS/RHEL-8 - if ! grep -i -q 'Red Hat\|CentOS' /etc/redhat-release; then - PKGS+=(btrfs-progs-devel) - fi - # disable doc until go-md2man rpm becomes available - # disable debug to avoid error: Empty %files file ~/rpmbuild/BUILD/libpod-.../debugsourcefiles.list - export extra_arg="--without doc --without debug" -else - if ! grep -i -q 'Red Hat\|CentOS' /etc/redhat-release; then - PKGS+=(golang-github-cpuguy83-go-md2man) - fi fi +# btrfs-progs-devel is not available in CentOS/RHEL-8 +if ! (grep -i 'Red Hat\|CentOS' /etc/redhat-release | grep " 8" ); then + PKGS+=(golang-github-cpuguy83-go-md2man \ + btrfs-progs-devel \ + ) +fi + +# disable doc until go-md2man rpm becomes available +# disable debug to avoid error: Empty %files file ~/rpmbuild/BUILD/libpod-.../debugsourcefiles.list +export extra_arg="--without doc --without debug" + echo ${PKGS[*]} sudo $pkg_manager install -y ${PKGS[*]} @@ -56,3 +60,6 @@ if [ -d ~/rpmbuild/BUILD ]; then fi rpmbuild --rebuild ${extra_arg:-} podman-*.src.rpm + +# clean up src.rpm as it's been built +sudo rm -f podman-*.src.rpm |