Unable to build from source mongodb-server-core - focal

Bug #1933378 reported by Heather Lemon
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
mongodb (Ubuntu)
Focal
Fix Released
High
Unassigned

Bug Description

root@focal:~/mongodb-3.6.9+really3.6.8+90~g8e540c0b6d# apt build-dep .
Note, using directory '.' to get the build dependencies
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 builddeps:. : Depends: python-requests but it is not installable
E: Unable to correct problems, you have held broken packages.

root@focal:~/mongodb-3.6.9+really3.6.8+90~g8e540c0b6d# apt-get install python-requests
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python-requests

------
Need to drop support for Python2 in mongodb-server-core focal [0]
[0] https://launchpad.net/ubuntu/+source/requests/2.22.0-2ubuntu1

installed version: 1:3.6.9+really3.6.8+90~g8e540c0b6d-0ubuntu5
series release: focal
container: LXD

Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Thanks for reporting.

I get the same error message when attempting to install build dependencies for mongodb on Ubuntu 20.04. It looks like the python2 package was dropped from requests shortly before the release of focal (https://launchpad.net/ubuntu/+source/requests/2.22.0-2ubuntu1), which means mongodb can no longer be rebuilt.

Changed in mongodb (Ubuntu):
status: New → Confirmed
tags: added: focal ftbfs unmetdeps
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in requests (Ubuntu):
status: New → Confirmed
Revision history for this message
Heather Lemon (hypothetical-lemon) wrote :

No worries.

If I drop python-requests from the /d/control. It seems to be building successfully.

ppa with fix: https://launchpad.net/~hypothetical-lemon/+archive/ubuntu/mongodb-server-core
1:3.6.9+really3.6.8+90~g8e540c0b6d-0ubuntu6

needs tested. It did pass building and unit tests etc.

Revision history for this message
Heather Lemon (hypothetical-lemon) wrote :

This ppa only removes python-requests from d/control.
I think we also need to remove python-requests from the requests package for focal too yes?

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Just to reinforce what was discussed, I can also confirm this bug.

@Heather, the requests package doesn't contain/depend on python-requests, so I don't think there's anything we should do there.

I'm left wondering whether other packages depend on python-requests to be built.

Either way, I see two possible solutions here:

- Remove the python-requests build-dependency from mongodb. A quick inspection (grep "import.*requests" -r) tells me that python-requests is only used inside the buildscripts/ and the pytest/ directories. I also did a full rebuild here and confirmed that everything passes, so I *think* it should be OK to just drop python-requests from B-D.

- Reintroduce python-requests to the archive. While this would guarantee that mongodb (and possibly other packages that B-D on python-requests) builds fine, it would also mean going through a more extensive SRU process, I think.

I'm leaning towards the first solution here.

Revision history for this message
Robie Basak (racb) wrote :

Please note that mongodb in Focal is in universe, so I don't expect Ubuntu Server developers to be working on it. However anyone who wants to volunteer a fix is welcome to do so.

Revision history for this message
Heather Lemon (hypothetical-lemon) wrote :

I can go ahead and pick this up.

I like @Sergio's first solution. Drop `python-requests` from build-dependencies.

Thanks,
Heather Lemon

Changed in mongodb (Ubuntu):
assignee: nobody → Heather Lemon (hypothetical-lemon)
importance: Undecided → High
Revision history for this message
Heather Lemon (hypothetical-lemon) wrote :

I'm not sure how to remove the requests package from the "affects" but I'll attach the debdiff with the removal of python-requests.

Revision history for this message
Heather Lemon (hypothetical-lemon) wrote :

removes python-requests from d/control, build-dependencies list.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "mongodb-server-core-focal-build-1933378-20210707.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Revision history for this message
Thomas Ward (teward) wrote :

Does mongodb still need the requests library, but in Python 3? If so the removal here without inclusion of the python3 requests library will break things.

Revision history for this message
Thomas Ward (teward) wrote :

Also verify whether Hirsute and later are also affected.

Revision history for this message
Heather Lemon (hypothetical-lemon) wrote :

Hirsute and Impish do not have a mongodb-server-core package available as of yet.

https://launchpad.net/ubuntu/impish/+source/mongodb
https://launchpad.net/ubuntu/hirsute/+source/mongodb

But I would assume that they would also be affected.

Dan Streetman (ddstreet)
no longer affects: requests (Ubuntu)
no longer affects: requests (Ubuntu Impish)
no longer affects: requests (Ubuntu Hirsute)
no longer affects: requests (Ubuntu Groovy)
Revision history for this message
Heather Lemon (hypothetical-lemon) wrote :

unfortunately mongo was dropped and hasn't had a successful build since Focal

https://launchpad.net/ubuntu/+source/mongodb/1:3.6.9+really3.6.8+90~g8e540c0b6d-0ubuntu6

Revision history for this message
Thomas Ward (teward) wrote :

Confirmed, removed from Groovy onwards, see https://bugs.launchpad.net/ubuntu/+source/mongodb/+bug/1879494

Removing the hirsute+ tasks because of license incompatibility blocks.

Changed in mongodb (Ubuntu Groovy):
status: New → Won't Fix
Changed in mongodb (Ubuntu Hirsute):
status: New → Won't Fix
Changed in mongodb (Ubuntu Impish):
status: Confirmed → Won't Fix
Changed in mongodb (Ubuntu Focal):
assignee: nobody → Heather Lemon (hypothetical-lemon)
Changed in mongodb (Ubuntu Impish):
assignee: Heather Lemon (hypothetical-lemon) → nobody
importance: High → Undecided
Changed in mongodb (Ubuntu Focal):
importance: Undecided → High
Revision history for this message
Heather Lemon (hypothetical-lemon) wrote :

I've reached out to Dimitri recently to get some more information about the build and run time dependencies.

I think there are a couple of options.

1. Pursue dropping python-requests from debian/control for build dependencies.
*Note I think just the testing would be broken, but at least mongodb would be usable and in a workable state. (quick fix/low effort)

2. Upgrade everything from Python2 to Python3. Which is probably the best option for long-term maintenance. (medium effort)

3. Sergio's 2nd option -
- Reintroduce python-requests to the archive. While this would guarantee that mongodb (and possibly other packages that B-D on python-requests) builds fine, it would also mean going through a more extensive SRU process, I think.
(I don't have a good estimate on how long this would take)

Thanks,
Heather Lemon

Mathew Hodson (mhodson)
no longer affects: mongodb (Ubuntu)
no longer affects: mongodb (Ubuntu Groovy)
no longer affects: mongodb (Ubuntu Hirsute)
no longer affects: mongodb (Ubuntu Impish)
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mongodb (Ubuntu Focal):
status: New → Confirmed
Changed in mongodb (Ubuntu Focal):
assignee: Heather Lemon (hypothetical-lemon) → nobody
Revision history for this message
Miriam España Acebal (mirespace) wrote :

Hi,

I see that this is fixed because the latest build in Focal happened on 2021-08-24. I'll going to mark it in that way.

Researching a bit, I found was fixed as part of another bug (#LP1934518)[https://bugs.launchpad.net/ubuntu/bionic/+source/mongodb/+bug/1934518] as we can read in the #10 and #11 comments.

The resolution was dropping python-request from B-D because is not longer in Focal (commit id:4f1c3e58517d7f70c8382b9d71c7c732e47b0758).

Changed in mongodb (Ubuntu Focal):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.