[SERVER-54057] Mongodb-org-server el8 package has dependency on python2 Created: 26/Jan/21  Updated: 29/Oct/23  Resolved: 05/Mar/21

Status: Closed
Project: Core Server
Component/s: Packaging
Affects Version/s: None
Fix Version/s: 4.4.5, 4.2.14, 4.0.25

Type: Bug Priority: Minor - P4
Reporter: INVADE International Ltd Assignee: Ryan Egesdahl (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
is related to SERVER-69870 Test package installs on all supporte... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.4, v4.2, v4.0
Sprint: Dev Platform 2021-02-22, Dev Platform 2021-03-08
Participants:

 Description   

From https://developer.mongodb.com/community/forums/t/mongodb-org-server-el8-package-has-dependency-on-python2/14732:

I’ve just deployed MongoDB Community Edition to a CentOS 8 system using the repo detailed here:
https://docs.mongodb.com/manual/tutorial/install-mongodb-on-red-hat/ 1

I noticed that the installation prompted a number of Python 2 packages to be installed as a dependency.

Querying the mongodb-org-server package confirms the dependency:
rpm -qR mongodb-org-server | grep python
python2

As Python 2 was sunset at the beginning of last year:
https://www.python.org/doc/sunset-python-2/

CentOS 8 uses Python 3 by default.

I’m not sure what the dependency on Python 2 is but, are there any known plans to move to Python 3?



 Comments   
Comment by Githook User [ 07/May/21 ]

Author:

{'name': 'Ryan Egesdahl', 'email': 'ryan.egesdahl@mongodb.com', 'username': 'deriamis'}

Message: SERVER-54057 Move RPM python dependency to tools-extra package

This requirement should never have been on the server package once the
tools were moved to their own package. This change just moves the
requirement where it should be.

(cherry picked from commit 364c92daaa4666e6428b6e0b805d71a01edf395c)
(cherry picked from commit 8224fa0bd9cfac6b7855dabf438bb944846ab08c)
(cherry picked from commit ca2d0476ed41c24929d357021e74961d7c1d6ef7)
Branch: v4.0
https://github.com/mongodb/mongo/commit/bfcd6b8aa168f787c0244a06546b188ef7499e11

Comment by Githook User [ 05/Mar/21 ]

Author:

{'name': 'Ryan Egesdahl', 'email': 'ryan.egesdahl@mongodb.com', 'username': 'deriamis'}

Message: SERVER-54057 Move RPM python dependency to tools-extra package

This requirement should never have been on the server package once the
tools were moved to their own package. This change just moves the
requirement where it should be.

(cherry picked from commit 364c92daaa4666e6428b6e0b805d71a01edf395c)
(cherry picked from commit 8224fa0bd9cfac6b7855dabf438bb944846ab08c)
Branch: v4.2
https://github.com/mongodb/mongo/commit/ca2d0476ed41c24929d357021e74961d7c1d6ef7

Comment by Githook User [ 05/Mar/21 ]

Author:

{'name': 'Ryan Egesdahl', 'email': 'ryan.egesdahl@mongodb.com', 'username': 'deriamis'}

Message: SERVER-54057 Don't depend on python2 on RHEL 8 or Fedora >= 30

(cherry picked from commit 27723699479793778e7198f9e88483c72717c08e)
(cherry picked from commit 5ca884098ccbd9866ee670d2fee2a4a8ef2bd1da)
Branch: v4.2
https://github.com/mongodb/mongo/commit/7e58e9db2d3e9781b4295994ad322ec906abe78a

Comment by Githook User [ 05/Mar/21 ]

Author:

{'name': 'Ryan Egesdahl', 'email': 'ryan.egesdahl@mongodb.com', 'username': 'deriamis'}

Message: SERVER-54057 Move RPM python dependency to tools-extra package

This requirement should never have been on the server package once the
tools were moved to their own package. This change just moves the
requirement where it should be.

(cherry picked from commit 364c92daaa4666e6428b6e0b805d71a01edf395c)
Branch: v4.4
https://github.com/mongodb/mongo/commit/8224fa0bd9cfac6b7855dabf438bb944846ab08c

Comment by Githook User [ 05/Mar/21 ]

Author:

{'name': 'Ryan Egesdahl', 'email': 'ryan.egesdahl@mongodb.com', 'username': 'deriamis'}

Message: Revert "SERVER-54057 Move RPM python dependency to tools-extra package"

This reverts commit f695de2d08902dc69c45cb6795be9eae51265643.
Branch: v4.4
https://github.com/mongodb/mongo/commit/a9aa60257bc9a275cd23b862027b52022f59b350

Comment by Githook User [ 03/Mar/21 ]

Author:

{'name': 'Ryan Egesdahl', 'email': 'ryan.egesdahl@mongodb.com', 'username': 'deriamis'}

Message: SERVER-54057 Move RPM python dependency to tools-extra package

This requirement should never have been on the server package once the
tools were moved to their own package. This change just moves the
requirement where it should be.

(cherry picked from commit 364c92daaa4666e6428b6e0b805d71a01edf395c)
Branch: v4.4
https://github.com/mongodb/mongo/commit/f695de2d08902dc69c45cb6795be9eae51265643

Comment by Githook User [ 03/Mar/21 ]

Author:

{'name': 'Ryan Egesdahl', 'email': 'ryan.egesdahl@mongodb.com', 'username': 'deriamis'}

Message: SERVER-54057 Don't depend on python2 on RHEL 8 or Fedora >= 30

(cherry picked from commit 27723699479793778e7198f9e88483c72717c08e)
Branch: v4.4
https://github.com/mongodb/mongo/commit/5ca884098ccbd9866ee670d2fee2a4a8ef2bd1da

Comment by Githook User [ 25/Feb/21 ]

Author:

{'name': 'Ryan Egesdahl', 'email': 'ryan.egesdahl@mongodb.com', 'username': 'deriamis'}

Message: SERVER-54057 Move RPM python dependency to tools-extra package

This requirement should never have been on the server package once the
tools were moved to their own package. This change just moves the
requirement where it should be.
Branch: master
https://github.com/mongodb/mongo/commit/364c92daaa4666e6428b6e0b805d71a01edf395c

Comment by Githook User [ 16/Feb/21 ]

Author:

{'name': 'Ryan Egesdahl', 'email': 'ryan.egesdahl@mongodb.com', 'username': 'deriamis'}

Message: SERVER-54057 Don't depend on python2 on RHEL 8 or Fedora >= 30
Branch: master
https://github.com/mongodb/mongo/commit/27723699479793778e7198f9e88483c72717c08e

Comment by Chris Dellaway [ 02/Feb/21 ]

Both openssl and python are listed as explicit requires in the server spec ( the mongodb-org-shell also has an unneeded dependency on openssl).

Requires: openssl, %{timezone_pkg}, %{python_pkg}

https://github.com/mongodb/mongo/blob/d19b65732b32761da0587dc9784366155f559e1c/rpm/mongodb-org.spec#L56

 

None of the rpm scripts or package files seem to invoke these. Ignoring missing dependencies of openssl and python2 results in a perfectly functioning mongod:

 

cat /etc/redhat-release
CentOS Linux release 8.2.2004 (Core)

 

rpm -Uvh mongodb-org-server-4.4.3-1.el8.x86_64.rpm
warning: mongodb-org-server-4.4.3-1.el8.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID 90cfb1f5: NOKEY
error: Failed dependencies:
openssl is needed by mongodb-org-server-4.4.3-1.el8.x86_64
python2 is needed by mongodb-org-server-4.4.3-1.el8.x86_64

 

rpm -Uvh --nodeps mongodb-org-server-4.4.3-1.el8.x86_64.rpm
warning: mongodb-org-server-4.4.3-1.el8.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID 90cfb1f5: NOKEY
Verifying... ################################# [100%]
Preparing... ################################# [100%]
Updating / installing...
1:mongodb-org-server-4.4.3-1.el8 ################################# [100%]
Created symlink /etc/systemd/system/multi-user.target.wants/mongod.service → /usr/lib/systemd/system/mongod.service.

 

mongod --dbpath /var/lib/mongo/ --tlsCertificateKeyFile /src/us-mongo-combined.pem --tlsMode requireTLS --fork --logpath /var/log/mongodb/mongod.log

 

mongo 127.0.0.1 --tls --eval 'db.isMaster()'
MongoDB shell version v4.4.3
connecting to: mongodb://127.0.0.1:27017/test?compressors=disabled&gssapiServiceName=mongodb

{"t":\{"$date":"2021-02-02T13:32:07.786Z"}

,"s":"W", "c":"NETWORK", "id":23237, "ctx":"js","msg":"You have an IP Address in the DNS Name field on your certificate. This formulation is deprecated."}
Implicit session: session { "id" : UUID("d84c0d06-ceb1-48da-afd0-f716ae4efd09") }
MongoDB server version: 4.4.3
{
"ismaster" : true,
"topologyVersion" :

{ "processId" : ObjectId("601952db0ea85d750c21b77a"), "counter" : NumberLong(0) }

,
"maxBsonObjectSize" : 16777216,
"maxMessageSizeBytes" : 48000000,
"maxWriteBatchSize" : 100000,
"localTime" : ISODate("2021-02-02T13:32:07.790Z"),
"logicalSessionTimeoutMinutes" : 30,
"connectionId" : 6,
"minWireVersion" : 0,
"maxWireVersion" : 9,
"readOnly" : false,
"ok" : 1
}

 

 

 

Generated at Thu Feb 08 05:32:33 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.