Modularize Makefile.install

Bug #1190279 reported by Bill Erickson
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Wishlist
Unassigned

Bug Description

Adding new OS targets and modifying existing targets in Makefile.install can be dicey at times. A good example is adding a new OS which may be 95% the same as an existing OS, but requires tweaking some list of prereqs 5 install targets deep in the Makefile. (E.g. moving a CPAN module to a distro module). It's cumbersome and error-prone, particularly since not every contributor has knowledge of every OS.

As an experiment, I've created a branch where each install target gets its own sub-Makefile. Since each install target has a finite life span, I'm less concerned with long-term maintenance and lack of duplication (though some common variables and routines are also extracted out in the branch) and more concerned with ease of adding new targets and tweaking existing targets.

I've added Makefiles for Debian Wheezy (seems to work) and Squeeze (more testing needed). If we want to go this route, we'll need volunteers for the Ubuntu and Fedora targets. Also, I'm no Makefile expert, so suggestions appreciated.

The incantation has not changed, so no documentation changes are required.

working/collab/berick/per-distro-install-makefiles

Revision history for this message
Bill Erickson (berick) wrote :

FWIW, the impetus for this was https://bugs.launchpad.net/evergreen/+bug/1014724/comments/4 -- I went to make the suggested change and was annoyed that I had to give it more than 2 seconds of thought.

Revision history for this message
Bill Erickson (berick) wrote :

I just saw that this patch implements the first part of bug #1147028. Linking here for reference.

Revision history for this message
Bill Erickson (berick) wrote :

I've pushed a follow-up commit for addressing postgres server install. As it was, users had to request the postgres server install target directly from the sub-module. (Thanks for pointing that out, phasefx). The commit makes the postgres server install a top-level make target once again. Given the OS-specific nature of the make targets, though, (install_pgsql_server_debs_91, install_pgsql_server_backport_debs_91, etc) and how they will change over time, I took this opportunity to base the PG install targets on the OS instead of the files and versions that will be installed.

The new targets are:

    make -f Makefile.install postgres-server-debian-wheezy
    make -f Makefile.install postgres-server-debian-squeeze
    make -f Makefile.install postgres-server-ubuntu-lucid
    make -f Makefile.install postgres-server-ubuntu-precise
    make -f Makefile.install postgres-server-fedora

Changes are reflected in docs/installation/server_installation.txt

For module implementors, simply create a make target called install_postgres_server within your OS makefile.

Code still lives in working/collab/berick/per-distro-install-makefiles

Revision history for this message
Bill Erickson (berick) wrote :

Pushed commit to add "libtest-warn-perl" prereq for squeeze/wheezy in anticipation of bug #1190717

Ben Shum (bshum)
Changed in evergreen:
status: New → Confirmed
status: Confirmed → In Progress
tags: added: install makefile
Revision history for this message
Jason Etheridge (phasefx) wrote :

I've been using the wheezy part of this with great results. How are we doing with Ubuntu and Fedora? Saw some IRC chatter.

Revision history for this message
Chris Sharp (chrissharp123) wrote :

I have an incomplete branch at http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/csharp/ubuntu-per-distro-makefile

I lost steam when CPAN was breaking when installing 12.04 and I was unable to track down why. My working theory is that it matters to CPAN that certain dependencies are installed before it tries to install its modules, but that's as far as I've gotten.

Revision history for this message
Mike Rylander (mrylander) wrote :

If it's at all possible, I'd love to see this get in sooner rather than later. Any luck in further distro testing?

Revision history for this message
Bill Erickson (berick) wrote :

I've merged Chris' Ubuntu installers into a new combined branch @

working => collab/berick/per-distro-install-makefiles-plus-ubuntu

The CPAN problem Chris ran into was with Business::OnlinePayment::PayPal, which failed to install because the Soap::Lite install from CPAN was failing. I added libperl-soap-lite as a deb to all of the debian installers and that fixed the problem for -precise. I also made a few other small cleanup adjustments.

I realized after making my last commit, though, that libperl-soap-lite is not an available package in squeeze and likely not in lucid. Those will likely need to be force-installed via cpan for those two OSes, before the regular CPAN mods are installed.

Revision history for this message
Galen Charlton (gmc) wrote :

You mean libsoap-lite-perl, right? It is available in squeeze and lucid.

Revision history for this message
Bill Erickson (berick) wrote :

Thank you Galen... I'm a dummy. I put it in the Makefile correctly, but hopped on a squeeze box and typed it in wrong. So, we should be good to go on that front, then.

I didn't test lucid. Both ubuntu targets could really use a test by someone that's not me. I'm going to try squeeze now.

Also, before final sign-off's, etc., we may want to squash some of these commits.

Revision history for this message
Bill Erickson (berick) wrote :

Squeeze is good. I pushed a few fixes that will affect lucid as well. I'm pushing everything to the newer branch:

working => collab/berick/per-distro-install-makefiles-plus-ubuntu

Revision history for this message
Bill Erickson (berick) wrote :

I've pushed a new branch, containing all code up to now and a Fedora install target.

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/berick/lp1190279-per-distro-install-makefile

The branch is rebased to master and lightly squashed. Chris's Ubuntu commits (squashed into 1) are signed off.

Everything should be done. Needs final testing a sign-off, mainly for the ubuntu/fedora targets.

Bill Erickson (berick)
tags: added: pullrequest
Changed in evergreen:
milestone: none → 2.5.0-beta1
status: In Progress → New
status: New → Confirmed
Revision history for this message
Dan Scott (denials) wrote :

Testing working/user/dbs/modularize_makefile_fedora right now, which adds a commit to remove some of the from-source installs that haven't been necessary since Fedora 18 and which currently stomp on the packages.

Revision history for this message
Chris Sharp (chrissharp123) wrote :
Revision history for this message
Dan Scott (denials) wrote :

And I've signed off all of the commits that Chris and Bill signed off and and pushed my own branch to http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/dbs/lp1190279-per-distro-install-makefile - it just has my fedora fix commit at the tip waiting for signoff.

Revision history for this message
Bill Erickson (berick) wrote :

Thanks for all the testing and signoffs! Pushed to master.

Changed in evergreen:
status: Confirmed → Fix Committed
Dan Wells (dbw2)
Changed in evergreen:
milestone: 2.5.0-beta1 → 2.5.0-alpha2
Ben Shum (bshum)
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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