autotools improvements for packaging

Bug #1068912 reported by Dan Scott
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Wishlist
Unassigned

Bug Description

For a long time we've been installing everything in /openils. But we don't need to! Running through an install today, I successfully installed all of OpenSRF and Evergreen under /usr/local, like the FHS intended. And this is also required if we ever want to get Evergreen packaged. So...

Please see the attached patch series which does the following:

1) Makes eg.conf / eg_vhost.conf / startup.pl configured files, rather than using hardcoded /openils/-ish paths. It also defaults them to using syslog instead of writing to a log file, to better support running Apache as a www-data user instead of opensrf. It also renames "startup.pl" to "eg_startup" to be less generic, and also installs the files under the $docdir directory.

2) Removes the default of /openils as the installation prefix.

3) Removes unused configuration options for Apache headers and Apache libraries. apxs gives us all that we need.

4) Removes hardcoded defaults for the OpenSRF headers and libraries and replaces them with a call to osrf_config to get the value.

5) Replaces the hack of a test for libopensrf with a real test for the OpenSRF library.

6) Removes the ".pl" suffix from eg_db_config, and installs it in the bin dir. (It can't be used from that directory, yet, until we install eg_config and also make the SQL schema creation scripts installed and available). TODO!

7) Installs eg_config in the bin dir.

I'm on the road at the moment without access to my normal SSH key, so patches will have to do for the time being...

Tags: pullrequest
Revision history for this message
Dan Scott (denials) wrote :
Revision history for this message
Dan Scott (denials) wrote :
Revision history for this message
Dan Scott (denials) wrote :
Revision history for this message
Dan Scott (denials) wrote :
Revision history for this message
Dan Scott (denials) wrote :

Ah, thanks to Thomas I have the ability to push again: thus see user/dbs/packaging_portably in working repository.

tags: added: pullrequest
Revision history for this message
Dan Scott (denials) wrote :

(Oh, and it's the last four commits).

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

Added another commit to reflect the updated script names in the documentation.

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

To keep the commits sensible, I squashed the doc changes into the related commit and force-pushed the lot.

Changed in evergreen:
importance: Undecided → Wishlist
status: New → Triaged
Changed in evergreen:
status: Triaged → In Progress
assignee: nobody → Jason Stephenson (jstephenson)
Revision history for this message
Dan Scott (denials) wrote :

I've rebased this to current master and force-pushed the branch to http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/dbs/packaging_portably

Also going to remove the assignee for now, as that seems a bit stale.

Changed in evergreen:
assignee: Jason Stephenson (jstephenson) → nobody
milestone: none → 2.4.0-alpha
status: In Progress → Confirmed
Revision history for this message
Dan Scott (denials) wrote :

(I believe Chris Sharp reported good results with this branch, specifically in testing installation into the FHS normal default prefix of /usr/local instead of /openils)

Revision history for this message
Pasi Kallinen (paxed) wrote :

I tried this, and apart from one conflict in docs, it applied cleanly.

After testing install to /openils/, everything worked just fine.
Testing install to /openils.20130204/ I had a problem with Patron Registration not working (Looked like the javascript portions did not run at all)

I'm not sure if I messed up installing it, or a problem with this patch.

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

Thanks Pasi! My first guess for the Patron Registration failure would be that Dojo wasn't where it was expected to be; either core Dojo was not installed under /openils.20130204 or something was still hardcoded to look for it in /openils/

And yeah, the doc conflicts are going to continue to be a problem. I should probably bust those back out separately to make it easier to merge this :/

Revision history for this message
Pasi Kallinen (paxed) wrote :

Tried again, with the same result, and everywhere I looked the dir was correct.
(Except for update_hard_due_dates.srfsh, action_trigger_runner.pl, clear_expired_circ_history.srfsh and offline-blocked-list.pl, but those aren't the cause of patron reg not working)

The error shown in console for the patron registration is:

Timestamp: 05.02.2013 10.56.28
Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE)" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: oils://remote/js/dojo/dojo/dojo.js :: <TOP_LEVEL> :: line 102" data: no]

Would that be my mistake?

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

I just went through the whole install process, with /openils removed and installing OpenSRF & Evergreen with --prefix=/opensore, and Patron Registration is working fine. Did you unpack the Dojo package from http://evergreen-ils.org/downloads/dojo.tgz in your web/opac/js/dojo/ directory? (My staff client wouldn't even register without that.)

I've updated http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/dbs/packaging_portably to address the docs conflict.

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

WFM ... Merge to master for great justice.

Changed in evergreen:
status: Confirmed → Fix Committed
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.

Other bug subscribers

Remote bug watches

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