[SERVER-4693] RPM .spec files should build packages from source Created: 16/Jan/12  Updated: 06/Dec/22  Resolved: 05/May/22

Status: Closed
Project: Core Server
Component/s: Packaging
Affects Version/s: 2.0.2, 2.0.9, 2.2.5, 2.4.4, 2.5.0
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Jonas Courteau Assignee: Backlog - Build Team (Inactive)
Resolution: Done Votes: 0
Labels: build-later, build-needs-definition, centos, el5, packaging, rhel5, rpm, spec
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

CentOS 5.6, RedHat


Issue Links:
Related
is related to SERVER-2040 SPEC File %setup Closed
Assigned Teams:
Build
Participants:

 Description   

We should provide RPM spec files that will allow users to build their own packages. There are several reasons this won't work currently (the biggest being that our .spec files download binary archives and build RPM's with them instead of compiling source)

Comments on RHEL5 specifically:

RHEL 5 (and by extension, CentOS and others) doesn't provide Python 2.6 by default, so building/packaging the RPMs using the .spec file in the source distribution doesn't work without some modifications:

In the BuildRequires section, add:

%{?el5:BuildRequires: python26-devel}

In the %build, %install, and %clean sections, add:

%{?el5:alias scons='python26 `which --skip-alias scons`'}

There's probably a cleaner way to do this, but with these modifications (and SERVER-2040 - wrong package name and %setup macro, typo in the %files section), Mongo cleanly builds on CentOS 5.6.


Generated at Thu Feb 08 03:06:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.