[sword-devel] More installmgr woes...

Greg Hellings greg.hellings at gmail.com
Thu Sep 3 12:37:34 MST 2009


Troy,

On Tue, Sep 1, 2009 at 8:38 PM, Greg Hellings<greg.hellings at gmail.com> wrote:
> Troy,
>
> You may not be thinking of me in particular, but I have brought that
> up before.  I thought about the SWORD_PATH issue after I ran diatheke
> the first time, and it failed.  So I set SWORD_PATH, and tried running
> installmgr again, and it continued the fail with the same error.  I
> also tried with and without sudo, and no such luck.  I've been away
> from the specific machine where the problem appeared since about 90
> seconds before your email arrived (Murphy's Law strikes again) but
> will test tomorrow and give you a report.
>
> --Greg
>
> On Tue, Sep 1, 2009 at 11:05 AM, Troy A. Griffitts<scribe at crosswire.org> wrote:
>> Dear Greg,
>>
>> Someone reported on IRC #sword to me (I thought it might have been you) that
>> SWORD 1.6.0 does not error out if it cannot determine your SWORD module
>> library path.
>>
>> This was your first problem: you set SWORD_PATH _after_ you ran installmgr.
>>
>> svn head should now error out if SWORD isn't configured correctly.
>>
>> I think installmgr from svn head still silently fails if it doesn't have
>> permission to write to the configured SWORD library path.  This is slated to
>> be fixed.  My guess is that this might be your second problem (write
>> permission to /usr/local/share/sword ?).
>>
>> Could you try something for me?  Try installing global modules to
>> /usr/local/share/sword by becoming root (this will give us a fresh ~/.sword
>> et. al.):
>>
>> su -
>> export SWORD_PATH=/usr/local/share/sword
>> ~greg/src/sword-svn/utilities/installmgr -init
>> ~greg/src/sword-svn/utilities/installmgr -sc
>> ~greg/src/sword-svn/utilities/installmgr -r CrossWire
>> ~greg/src/sword-svn/utilities/installmgr -ri CrossWire KJV

This now lists the KJV from within diatheke, both as user greg and as
user root.  Now some observations, then some additional facts,
followed by some assumptions:

I deleted the /home/greg/.sword directory, so installmgr would have
nothing to complain about and ran the exact commands that I ran as
root -- the module failed to install.
I ran the same commands again, this time using "sudo installmgr -ri
CrossWire KJV" -- the module STILL failed to install.

A few other important facts: I am not using /etc/sword.conf, so that
is not even entering the picture (usually I do the sudo make
install_config or whatever it is).  When installing as user "greg" I
am trying to install to /usr/local/share/sword -- but through sudo.

Now my assumptions of what is going on: user greg has the SWORD_PATH
value set to /usr/local/share/sword through .bashrc -- user root does
not.  As root I manually called an export command before the
installation.  To me that sounds like, when installing as greg with
the command "installmgr -ri CrossWire KJV," installmgr is properly
picking up SWORD_PATH and trying to write to /usr/local/share/sword.
This is cannot do, because greg does not have write permissions to
that directory.  When executing installmgr via sudo, (ONLY GUESSING)
installmgr is picking up a null value for SWORD_PATH, since user root
has no such environment variable defined.  Now I don't know if this is
an inherent limitation of the sudo environment (i.e. I don't know if
what I'm saying is true, and I also don't know if there's a way to
access greg's values from getenv when sudo'd) or is just an oversight
on the part of the installmgr tool.  Usually when I set up a new
machine, I either use the /etc/sword.conf method, or I put SWORD_PATH
into /etc/profile -- then it's picked up even in a sudo environment.
This machine, I opted out of doing that, trying to do the "proper"
thing by keeping my user settings on a per-user basis.

Am I way off the mark of how environment variables get overwritten, or
is this a reasonable interpretation of the events?  Either way, I now
have KJV installed and can get on with the proof-of-concept that I was
originally planning. :)

--Greg

>>
>> Let me know if it works.
>>
>>   -Troy.
>>
>>
>>
>>
>> Greg Hellings wrote:
>>>
>>> I just installed SWORD 1.6.0 from tarball onto another fresh system.
>>>
>>> I built as a regular user (greg), installed with sudo make install.
>>>
>>> I ran sudo installmgr -sc
>>>
>>> Then sudo installmgr -ri CrossWire KJV with output:
>>> <snip>
>>> Installed module: [KJV]
>>>
>>> Then export SWORD_PATH=/usr/local/share/sword
>>>
>>> Everything seemed to go as planned, except,
>>>
>>> diatheke -b system -k modulelist
>>>
>>> reports no modules found.  Quite appropirately, /usr/local/share/sword
>>> has only mods.d and locales.d directories, both of which are empty.  I
>>> updated to SVN HEAD - same procedure, same results.  Seems like
>>> installmgr is still useless to a fresh install.  I have no idea what
>>> it thinks it is doing, but it's sure not installing the modules.  I
>>> don't know where it's installing (it claims ***** destPath:
>>>
>>> /home/greg//.sword/InstallMgr/20081216195754/modules/texts/ztext/kjv/ot.bzz
>>> but nothing is there).  The tool is quite loquacious, though, telling
>>> me all sorts of information about cURL.
>>>
>>> --Greg
>>>
>>> _______________________________________________
>>> sword-devel mailing list: sword-devel at crosswire.org
>>> http://www.crosswire.org/mailman/listinfo/sword-devel
>>> Instructions to unsubscribe/change your settings at above page
>>>
>>
>>
>> _______________________________________________
>> sword-devel mailing list: sword-devel at crosswire.org
>> http://www.crosswire.org/mailman/listinfo/sword-devel
>> Instructions to unsubscribe/change your settings at above page
>>
>



More information about the sword-devel mailing list