summaryrefslogtreecommitdiff
path: root/buildscripts
diff options
context:
space:
mode:
authorRyan Egesdahl <ryan.egesdahl@mongodb.com>2021-03-18 09:50:42 -0700
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-07-20 17:44:53 +0000
commit47b693a6aeaa142bffcea57984b8e84f60204407 (patch)
tree003f0d4ff6ecd551007041eb9ff262a0e5e8c68a /buildscripts
parentaed22553124e994a54385f36c5d5ce1467b3cd92 (diff)
downloadmongo-47b693a6aeaa142bffcea57984b8e84f60204407.tar.gz
SERVER-54729 Add explicit dependencies to Debian packages
Some dependencies were not being captured automatically by the Debian package build system (namely, the Cyrus SASL modules required for Enterprise), which was causing failures for some users. The explicit dependencies declared in the RPM packages are mirrored in the Debian packaging now. (cherry picked from commit 829e4a097bdf3e54fab7097697242334c4a79154) (cherry picked from commit 7d3fe7a3f137a99fd7985133621cef82ccbe76ec)
Diffstat (limited to 'buildscripts')
-rw-r--r--buildscripts/package_test/recipes/install_mongodb.rb27
-rw-r--r--buildscripts/package_test/test/recipes/service/install_mongodb_spec.rb4
2 files changed, 18 insertions, 13 deletions
diff --git a/buildscripts/package_test/recipes/install_mongodb.rb b/buildscripts/package_test/recipes/install_mongodb.rb
index 805d9901c0f..8c3e7c03591 100644
--- a/buildscripts/package_test/recipes/install_mongodb.rb
+++ b/buildscripts/package_test/recipes/install_mongodb.rb
@@ -1,3 +1,6 @@
+# This Chef task installs MongoDB in a new EC2 instance spun up by Kitchen in
+# preparation for running some basic server functionality tests.
+
artifacts_tarball = 'artifacts.tgz'
user = node['current_user']
homedir = node['etc']['passwd'][user]['dir']
@@ -31,7 +34,7 @@ end
if platform_family? 'debian'
# SERVER-40491 Debian 8 sources.list need to point to archive url
- if node['platform_version'] == '8.1'
+ if node['platform'] == 'debian' and node['platform_version'] == '8.1'
cookbook_file '/etc/apt/sources.list' do
source 'sources.list.debian8'
owner 'root'
@@ -41,14 +44,21 @@ if platform_family? 'debian'
end
end
- execute 'apt-get update' do
- command 'apt-get update'
+ execute 'apt update' do
+ command 'apt update'
live_stream true
end
ENV['DEBIAN_FRONTEND'] = 'noninteractive'
package 'openssl'
+ # the ubuntu 16.04 image does not have some dependencies installed by default
+ # and it is required for the install_compass script
+ execute 'install dependencies' do
+ command 'apt-get install -y python libsasl2-modules-gssapi-mit'
+ live_stream true
+ end
+
# dpkg returns 1 if dependencies are not satisfied, which they will not be
# for enterprise builds. We install dependencies in the next block.
execute 'install mongod' do
@@ -69,15 +79,8 @@ if platform_family? 'debian'
# yum and zypper fetch dependencies automatically, but dpkg does not.
# Installing the dependencies explicitly is fragile, so we reply on apt-get
# to install dependencies after the fact.
- execute 'install dependencies' do
- command 'apt-get update && apt-get -y -f install'
- live_stream true
- end
-
- # the ubuntu 16.04 image does not have python installed by default
- # and it is required for the install_compass script
- execute 'install python' do
- command 'apt-get install -y python'
+ execute 'update and fix broken dependencies' do
+ command 'apt update && apt -y -f install'
live_stream true
end
diff --git a/buildscripts/package_test/test/recipes/service/install_mongodb_spec.rb b/buildscripts/package_test/test/recipes/service/install_mongodb_spec.rb
index aa097f99d4c..114efa9d9b3 100644
--- a/buildscripts/package_test/test/recipes/service/install_mongodb_spec.rb
+++ b/buildscripts/package_test/test/recipes/service/install_mongodb_spec.rb
@@ -1,5 +1,7 @@
############################################################
-# This section verifies start, stop, and restart.
+# This section verifies start, stop, and restart after
+# installation within a new EC2 instance spun up by Kitchen.
+#
# - stop mongod so that we begin testing from a stopped state
# - verify start, stop, and restart
############################################################