summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Chen <john.chen@mongodb.com>2019-11-14 18:54:39 +0000
committerevergreen <evergreen@mongodb.com>2019-11-14 18:54:39 +0000
commit22872570d08fe017785ca84105d8fa94d3ca552a (patch)
tree8dab2051ae2c4079bc3738c7f6bb13ec8f592d73
parente75d261790ca1fdbe21afce043af16b552d9a293 (diff)
downloadmongo-22872570d08fe017785ca84105d8fa94d3ca552a.tar.gz
SERVER-37769 Platform Support: SUSE15
(cherry picked from commit 2bb9313de4c53d31051e30af49a1ead10535e5d2)
-rwxr-xr-xbuildscripts/packager.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/buildscripts/packager.py b/buildscripts/packager.py
index 5a753f6e1c1..f6600a4eaff 100755
--- a/buildscripts/packager.py
+++ b/buildscripts/packager.py
@@ -837,6 +837,20 @@ def make_rpm(distro, build_os, arch, spec, srcdir): # pylint: disable=too-many-
"-D", "dynamic_version " + spec.pversion(distro), "-D",
"dynamic_release " + spec.prelease(), "-D", "_topdir " + topdir
])
+
+ # Versions of RPM after 4.4 ignore our BuildRoot tag so we need to
+ # specify it on the command line args to rpmbuild
+ #
+ # Current versions of RHEL at the time of this writing (RHEL < 8) patch in
+ # the old behavior so that our BuildRoot tag still works on these versions.
+ #
+ # Probably need to add RHEL 8 to this when we start building for it
+ if distro.name() == "suse" and distro.repo_os_version(build_os) == "15":
+ flags.extend([
+ "--buildroot",
+ os.path.join(topdir, "BUILDROOT"),
+ ])
+
sysassert(["rpmbuild", "-ba", "--target", distro_arch] + flags +
["%s/SPECS/mongodb%s.spec" % (topdir, suffix)])
repo_dir = distro.repodir(arch, build_os, spec)