Bug#956804:

Valerio Bozzolan boz.debian at reyboz.it
Tue Feb 21 13:38:07 GMT 2023


Reading this discussion, I see that at the moment there is not any
official way to declare and expose an environment variable to
"catalina.sh".

I mean, for example, if you need to define this env:
(note, it's not a system property):

MY_CUSTOM_APPLICATION_SECRET=123

In short, this is the current situation of this package AFAIK:

1.
Any extra "Environment=FOO=BAR" variable set from systemd is ignored.
(Also if you force that with PassEnvironment=FOO)
Feature? Probably yes.

2.
Any extra environent variable set from /etc/default/tomcat9 is NOT
exposed to "bin/catalina.sh".
Feature? Probably yes.

[MOST IMPORTANT POINT]
3.
The supposed path to declare an extra env variable should be
"bin/setenv.sh", but, this is in a read-only location as per FHS and so
it's NOT supposed to be customized.
Feature? Probably NO.

If I'm correct:

It would probably make sense to discuss the issue n. 3.

For example, allowing a file such as "setenv.sh" to be created in an
officially writable location would probably make sense.

-- 
Valerio Bozz.


E-mail sent from Evolution from a random GNU/Linux distribution,
delivered from my Postfix mailserver.

Have fun with software freedom!



More information about the pkg-java-maintainers mailing list