You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by Damian Steer <d....@bristol.ac.uk> on 2012/08/07 23:37:56 UTC

Anyone like to see the end of $JENAROOT?

Hi all,

Would anyone object if I changed the shell scripts (via template.bin) to work out JENAROOT automatically (if unset)? You can then add the script directory to PATH.

The current logic there looks wrong, btw. [1] Why is ROOT set?

Damian

[1] <http://svn.apache.org/viewvc/jena/trunk/apache-jena/template.bin?view=markup>

Re: Anyone like to see the end of $JENAROOT?

Posted by Damian Steer <d....@bristol.ac.uk>.
On 9 Aug 2012, at 09:00, Damian Steer wrote:

> Finally committed the new script, having been delayed by the fun of sym links.
> 
> * Haven't touched tdbloader2 or added the tmpdir business to tdbloader3.
> * Attempted to fix JENA-284. Cygwin users, please check!
> * Working in dash, so hopefully POSIXy enough.

* JENAROOT -> JENA_HOME

Damian

Re: Anyone like to see the end of $JENAROOT?

Posted by Damian Steer <d....@bristol.ac.uk>.
On 8 Aug 2012, at 23:35, Damian Steer wrote:

> Andy,
> 
> tdbloader3 has the following addition:
> 
> # TMP on Windows, and TMPDIR on linux.

Finally committed the new script, having been delayed by the fun of sym links.

* Haven't touched tdbloader2 or added the tmpdir business to tdbloader3.
* Attempted to fix JENA-284. Cygwin users, please check!
* Working in dash, so hopefully POSIXy enough.

Damian



Re: Anyone like to see the end of $JENAROOT?

Posted by Andy Seaborne <an...@apache.org>.
On 10/08/12 15:03, Damian Steer wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 10/08/12 11:26, Andy Seaborne wrote:
>
>> Looks much better than the old scripts.
>>
>> For MS Windows, I have just s/JENAROOT/JENA_HOME/g for the moment
>> and, for compatibility, if JENAROOT is set, this i used to set
>> JENA_HOME.
>
> Thanks, hunting other mentions of JENAROOT was next on my list.
> jena-core scripts are still using JENAROOT, as are (mutatis mutandis)
> tdb, sdb and arq. Given that these aren't released (except in source
> form) I don't think they're urgent.

Anything in the dev modules can be left alone - they aren't the same 
scripts anyway having to put in class folders, and look in .classpath 
for the classpath.  lib/* it ain't.

That way, when working on development system, you run dev code.

Does that work for everyone?

>> Added an entry in jena-core/ReleaseNotes
>
> Are you sure?

Yes! - but may be not at 15:00.  Our network had a hiccup.

	Andy

>
> Damian
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAlAlFL8ACgkQAyLCB+mTtykEogCgrTClLWpXnI8z3Rr/kUNGEhHs
> t0EAnR+TpqfK1krkYSEKbUfNQ11/9VCS
> =h2r/
> -----END PGP SIGNATURE-----
>


Re: Anyone like to see the end of $JENAROOT?

Posted by Damian Steer <d....@bristol.ac.uk>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10/08/12 11:26, Andy Seaborne wrote:

> Looks much better than the old scripts.
> 
> For MS Windows, I have just s/JENAROOT/JENA_HOME/g for the moment
> and, for compatibility, if JENAROOT is set, this i used to set
> JENA_HOME.

Thanks, hunting other mentions of JENAROOT was next on my list.
jena-core scripts are still using JENAROOT, as are (mutatis mutandis)
tdb, sdb and arq. Given that these aren't released (except in source
form) I don't think they're urgent.

> Added an entry in jena-core/ReleaseNotes

Are you sure?

Damian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlAlFL8ACgkQAyLCB+mTtykEogCgrTClLWpXnI8z3Rr/kUNGEhHs
t0EAnR+TpqfK1krkYSEKbUfNQ11/9VCS
=h2r/
-----END PGP SIGNATURE-----

Re: Anyone like to see the end of $JENAROOT?

Posted by Andy Seaborne <an...@apache.org>.
On 09/08/12 15:26, Damian Steer wrote:
>
> On 9 Aug 2012, at 13:45, Andy Seaborne wrote:
>
>> That's exactly why I made the change .. /tmp being small. tdbloader2 isn't affected as the unix commands that need temp respect TMP/TMPDIR.
>
> TMPDIR/TMP support now added.
>
> Damian
>

Looks much better than the old scripts.

For MS Windows, I have just s/JENAROOT/JENA_HOME/g for the moment and, 
for compatibility, if JENAROOT is set, this i used to set JENA_HOME.

Caution: I have not rebuilt the .bat scripts - I am away-from-a-windows 
machine at the moment so this is not tested.

README: Updated to reflect the changes.

tdbloader2:

I've refactored tdbloader2 - it needs to have the classpath as well.

I've split it in to a setup script and execution script so it's got two 
parts like all the other commands.  Still make "tdbloader2" slightly 
different from the other scripts (it exec tdbloader2, not java) but it's 
now in the same shape as the other scripts.

Added an entry in jena-core/ReleaseNotes

	Andy


Re: Anyone like to see the end of $JENAROOT?

Posted by Damian Steer <d....@bristol.ac.uk>.
On 9 Aug 2012, at 13:45, Andy Seaborne wrote:

> That's exactly why I made the change .. /tmp being small. tdbloader2 isn't affected as the unix commands that need temp respect TMP/TMPDIR.

TMPDIR/TMP support now added.

Damian


Re: Anyone like to see the end of $JENAROOT?

Posted by Andy Seaborne <an...@apache.org>.
On 09/08/12 11:19, Damian Steer wrote:
>
> On 9 Aug 2012, at 09:42, Paolo Castagna <ca...@gmail.com> wrote:
>
>> Hi Damian,
>> tdbloader3 uses the directory you specify as temporary directory to
>> spill stuff on disk (via DataBags contributed by Stephen).
>> On many systems /tmp is limited (for good reasons), therefore we need to
>> give users somehow the opportunity to set the java.io.tmpdir property.
>>
>> Paolo
>
> Aha, so this is simply "make java respect $TMPDIR/$TMP". Don't see any harm in adding that to all scripts (he said boldly).
>
> Damian

That's exactly why I made the change .. /tmp being small. tdbloader2 
isn't affected as the unix commands that need temp respect TMP/TMPDIR.

+1

All looks good.

	Andy


Re: Anyone like to see the end of $JENAROOT?

Posted by Damian Steer <d....@bristol.ac.uk>.
On 9 Aug 2012, at 09:42, Paolo Castagna <ca...@gmail.com> wrote:

> Hi Damian,
> tdbloader3 uses the directory you specify as temporary directory to
> spill stuff on disk (via DataBags contributed by Stephen).
> On many systems /tmp is limited (for good reasons), therefore we need to
> give users somehow the opportunity to set the java.io.tmpdir property.
> 
> Paolo

Aha, so this is simply "make java respect $TMPDIR/$TMP". Don't see any harm in adding that to all scripts (he said boldly).

Damian


Re: Anyone like to see the end of $JENAROOT?

Posted by Paolo Castagna <ca...@gmail.com>.
Hi Damian,
tdbloader3 uses the directory you specify as temporary directory to
spill stuff on disk (via DataBags contributed by Stephen).
On many systems /tmp is limited (for good reasons), therefore we need to
give users somehow the opportunity to set the java.io.tmpdir property.

Paolo

On 08/08/12 23:35, Damian Steer wrote:
> Andy,
>
> tdbloader3 has the following addition:
>
> # TMP on Windows, and TMPDIR on linux.
> T=
> if [ "$TMP" != "" ]
> then
>     T="$TMP"
>     fi
> if [ "$TMPDIR" != "" ]
> then
>     T="$TMPDIR"
>     fi
>
> # ---- Setup
> JVM_ARGS=${JVM_ARGS:--Xmx1024M}
> if [ "$T" != "" ]
> then
>     JVM_ARGS="$JVM_ARGS -Djava.io.tmpdir=$T"
>     fi
>
> Shall I roll this back to the template? Why was this change made?
>
> Damian
>


Re: Anyone like to see the end of $JENAROOT?

Posted by Damian Steer <d....@bristol.ac.uk>.
Andy,

tdbloader3 has the following addition:

# TMP on Windows, and TMPDIR on linux.
T=
if [ "$TMP" != "" ]
then
    T="$TMP"
    fi
if [ "$TMPDIR" != "" ]
then
    T="$TMPDIR"
    fi

# ---- Setup
JVM_ARGS=${JVM_ARGS:--Xmx1024M}
if [ "$T" != "" ]
then
    JVM_ARGS="$JVM_ARGS -Djava.io.tmpdir=$T"
    fi

Shall I roll this back to the template? Why was this change made?

Damian


Re: Anyone like to see the end of $JENAROOT?

Posted by Damian Steer <d....@bristol.ac.uk>.
On 8 Aug 2012, at 21:56, Andy Seaborne wrote:

> While I remember ...
> 
> For cygwin, the path has to be windows style.

I think I can handle that;

> I think (can anyone confirm?) that the lib/* needs a trailing ";".  It used to - I'm not up on current windows to know.
> 
> https://issues.apache.org/jira/browse/JENA-284


Anyone using cygwin? Prepared to be a guinea pig?

Damian

Re: Anyone like to see the end of $JENAROOT?

Posted by Andy Seaborne <an...@apache.org>.
While I remember ...

For cygwin, the path has to be windows style.

I think (can anyone confirm?) that the lib/* needs a trailing ";".  It 
used to - I'm not up on current windows to know.

https://issues.apache.org/jira/browse/JENA-284

	Andy

On 08/08/12 10:49, Damian Steer wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 08/08/12 08:31, Andy Seaborne wrote:
>> On 07/08/12 22:37, Damian Steer wrote:
>>> Hi all,
>>>
>>> Would anyone object if I changed the shell scripts (via
>>> template.bin) to work out JENAROOT automatically (if unset)? You
>>> can then add the script directory to PATH.
>
>> Sounds like a very good idea.
>>
>> The original scripts used ROOT so that they worked for ARQROOT and
>> JENAROOT to maximise backwards compatibility.  Automatically
>> setting JENAROOT is better.
>>
>> The two choices seem to be ignore JENAROOT altogether and assume
>> the bin/ directory is next to the lib/ directory (i.e. bin/* not
>> copied anywhere else) or keep a possible JENAROOT setting - now
>> with a different name? JENALIB?
>
> The java style in my experience is mostly what we have now (i.e.
> JENAROOT, pointing to dir containing lib), so there's little reason to
> change. (Java utilities seem to use the 'HOME' suffix, however. See
> JAVA_HOME, M2_HOME)

*HOME is good - leaves *ROOT free for the development scripts

>
> We should support symlinking tools into bin directories, so I'll check
> that works. This is what ant does in debian, for example.
>
>>> (via template.bin)
>>
>> and for a bonus p(o)int, template.bat.
>
> <tumbleweed>
>
> Damian
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAlAiNg8ACgkQAyLCB+mTtylqnwCggJ2kBQlLLii6G5iLLljozzg1
> 40kAoPkvlNjG58AnLOvGbWsWx0Aknxpp
> =Fyvh
> -----END PGP SIGNATURE-----
>


Re: Anyone like to see the end of $JENAROOT?

Posted by Damian Steer <d....@bristol.ac.uk>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 08/08/12 08:31, Andy Seaborne wrote:
> On 07/08/12 22:37, Damian Steer wrote:
>> Hi all,
>> 
>> Would anyone object if I changed the shell scripts (via
>> template.bin) to work out JENAROOT automatically (if unset)? You
>> can then add the script directory to PATH.

> Sounds like a very good idea.
> 
> The original scripts used ROOT so that they worked for ARQROOT and 
> JENAROOT to maximise backwards compatibility.  Automatically
> setting JENAROOT is better.
> 
> The two choices seem to be ignore JENAROOT altogether and assume
> the bin/ directory is next to the lib/ directory (i.e. bin/* not
> copied anywhere else) or keep a possible JENAROOT setting - now
> with a different name? JENALIB?

The java style in my experience is mostly what we have now (i.e.
JENAROOT, pointing to dir containing lib), so there's little reason to
change. (Java utilities seem to use the 'HOME' suffix, however. See
JAVA_HOME, M2_HOME)

We should support symlinking tools into bin directories, so I'll check
that works. This is what ant does in debian, for example.

>> (via template.bin)
> 
> and for a bonus p(o)int, template.bat.

<tumbleweed>

Damian

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlAiNg8ACgkQAyLCB+mTtylqnwCggJ2kBQlLLii6G5iLLljozzg1
40kAoPkvlNjG58AnLOvGbWsWx0Aknxpp
=Fyvh
-----END PGP SIGNATURE-----

Re: Anyone like to see the end of $JENAROOT?

Posted by Andy Seaborne <an...@apache.org>.
On 07/08/12 22:37, Damian Steer wrote:
> Hi all,
>
> Would anyone object if I changed the shell scripts (via template.bin) to work out JENAROOT automatically (if unset)? You can then add the script directory to PATH.
>
> The current logic there looks wrong, btw. [1] Why is ROOT set?
>
> Damian
>
> [1] <http://svn.apache.org/viewvc/jena/trunk/apache-jena/template.bin?view=markup>
>

Sounds like a very good idea.

The original scripts used ROOT so that they worked for ARQROOT and 
JENAROOT to maximise backwards compatibility.  Automatically setting 
JENAROOT is better.

The two choices seem to be ignore JENAROOT altogether and assume the 
bin/ directory is next to the lib/ directory (i.e. bin/* not copied 
anywhere else) or keep a possible JENAROOT setting - now with a 
different name? JENALIB?

 > (via template.bin)

and for a bonus p(o)int, template.bat.

	Andy