Changeset 10707c6


Ignore:
Timestamp:
Oct 11, 2018 5:04:49 PM (21 months ago)
Author:
meeh <meeh@…>
Branches:
master
Children:
0a99784, ee9976c
Parents:
8e988c39 (diff), 77e539a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

merge of '1f8e31dab7ed66ddd8f332fca5784b4934d0c9b0'

and '4197dba37e7c738c7b1125b3e407a7bc0b2c972a'

Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • apps/routerconsole/java/src/net/i2p/router/web/PluginStarter.java

    r8e988c39 r10707c6  
    441441
    442442        // start console webapps in console/webapps
    443         ContextHandlerCollection server = WebAppStarter.getConsoleServer();
     443        ContextHandlerCollection server = WebAppStarter.getConsoleServer(ctx);
    444444        if (server != null) {
    445445            File consoleDir = new File(pluginDir, "console");
     
    952952            while(it.hasNext() && !isWarRunning) {
    953953                String warName = it.next();
    954                 if(WebAppStarter.isWebAppRunning(warName)) {
     954                if(WebAppStarter.isWebAppRunning(ctx, warName)) {
    955955                    isWarRunning = true;
    956956                }
  • apps/routerconsole/java/src/net/i2p/router/web/RouterConsoleRunner.java

    r8e988c39 r10707c6  
    2525
    2626import net.i2p.I2PAppContext;
     27import net.i2p.app.ClientApp;
    2728import net.i2p.app.ClientAppManager;
    2829import net.i2p.app.ClientAppState;
     
    101102    private final ClientAppManager _mgr;
    102103    private volatile ClientAppState _state = UNINITIALIZED;
    103     private static Server _server;
     104    private Server _server;
    104105    private static ScheduledExecutorScheduler _jettyTimer;
    105106    private String _listenPort;
     
    117118        authenticator.setMaxNonceAge(7*24*60*60*1000L);
    118119    }
     120    private static final String NAME = "console";
    119121    public static final String JETTY_REALM = "i2prouter";
    120122    private static final String JETTY_ROLE = "routerAdmin";
     
    265267    /** @since 0.9.4 */
    266268    public String getName() {
    267         return "console";
     269        return NAME;
    268270    }
    269271
     
    282284
    283285    /**
    284      *  SInce _server is now static
     286     *  To get to Jetty
    285287     *  @return may be null or stopped perhaps
    286288     *  @since Jetty 6 since it doesn't have Server.getServers()
    287289     */
    288     static Server getConsoleServer() {
     290    synchronized Server getConsoleServer() {
    289291        return _server;
    290292    }
     293
     294    /**
     295     *  To get to Jetty
     296     *  @return may be null or stopped perhaps
     297     *  @since 0.9.38
     298     */
     299    static Server getConsoleServer(I2PAppContext ctx) {
     300        ClientApp app = ctx.clientAppManager().getRegisteredApp(NAME);
     301        return (app != null) ? ((RouterConsoleRunner)app).getConsoleServer() : null;
     302    }
     303
    291304
    292305    /** @since 0.8.13, moved from LogsHelper in 0.9.33 */
     
    11141127                if (ROUTERCONSOLE.equals(app))
    11151128                    continue;
    1116                 if (WebAppStarter.isWebAppRunning(app)) {
     1129                if (WebAppStarter.isWebAppRunning(_context, app)) {
    11171130                    try {
    11181131                        WebAppStarter.stopWebApp(_context, app);
  • apps/routerconsole/java/src/net/i2p/router/web/WebAppStarter.java

    r8e988c39 r10707c6  
    77import java.util.concurrent.ConcurrentHashMap;
    88
     9import net.i2p.I2PAppContext;
    910import net.i2p.router.RouterContext;
    1011import net.i2p.util.FileUtil;
     
    151152     */
    152153    public static void stopWebApp(RouterContext ctx, String appName) {
    153         ContextHandler wac = getWebApp(appName);
     154        ContextHandler wac = getWebApp(ctx, appName);
    154155        if (wac == null)
    155156            return;
     
    159160            wac.stop();
    160161        } catch (Exception ie) {}
    161         ContextHandlerCollection server = getConsoleServer();
     162        ContextHandlerCollection server = getConsoleServer(ctx);
    162163        if (server == null)
    163164            return;
     
    174175     *  @since public since 0.9.33; was package private
    175176     */
    176     public static boolean isWebAppRunning(String appName) {
    177         ContextHandler wac = getWebApp(appName);
     177    public static boolean isWebAppRunning(I2PAppContext ctx, String appName) {
     178        ContextHandler wac = getWebApp(ctx, appName);
    178179        if (wac == null)
    179180            return false;
     
    182183   
    183184    /** @since Jetty 6 */
    184     static ContextHandler getWebApp(String appName) {
    185         ContextHandlerCollection server = getConsoleServer();
     185    static ContextHandler getWebApp(I2PAppContext ctx, String appName) {
     186        ContextHandlerCollection server = getConsoleServer(ctx);
    186187        if (server == null)
    187188            return null;
     
    204205     *  @since public since 0.9.33, was package private
    205206     */
    206     public static ContextHandlerCollection getConsoleServer() {
    207         Server s = RouterConsoleRunner.getConsoleServer();
     207    public static ContextHandlerCollection getConsoleServer(I2PAppContext ctx) {
     208        Server s = RouterConsoleRunner.getConsoleServer(ctx);
    208209        if (s == null)
    209210            return null;
  • apps/routerconsole/java/src/net/i2p/router/web/helpers/ConfigClientsHandler.java

    r8e988c39 r10707c6  
    388388     */
    389389    private void startWebApp(String app) {
    390         ContextHandlerCollection s = WebAppStarter.getConsoleServer();
     390        ContextHandlerCollection s = WebAppStarter.getConsoleServer(_context);
    391391        if (s != null) {
    392392                    try {
  • apps/routerconsole/java/src/net/i2p/router/web/helpers/ConfigClientsHelper.java

    r8e988c39 r10707c6  
    216216                String app = name.substring(RouterConsoleRunner.PREFIX.length(), name.lastIndexOf(RouterConsoleRunner.ENABLED));
    217217                String val = props.getProperty(name);
    218                 boolean isRunning = WebAppStarter.isWebAppRunning(app);
     218                boolean isRunning = WebAppStarter.isWebAppRunning(_context, app);
    219219                String desc;
    220220                // use descriptions already tagged elsewhere
  • debian-alt/doc/dependencies.txt

    r8e988c39 r10707c6  
    99instructions are at https://geti2p.net/debian
    1010
    11 This document is current as of release 0.9.33, scheduled 2018-01
     11This document is current as of release 0.9.37, 2018-10-04.
    1212
    1313
     
    1818  This is the standard java build system.
    1919
     20* Java JDK
     21  We require openjdk-7-java or higher to build. For 8, set bootclasspath to
     22  java 7 jars if available.
     23  For 9 or higher, require the same or higher runtime, since bootclasspath
     24  isn't possible.
     25
     26* libgmp-dev
     27
    2028
    2129Current Runtime Dependencies
    2230----------------------------
    2331
    24 * Java JDK/JRE
    25   We require openjdk-7-java to build, and any Java 7, 8, or 9 runtime to run.
    26   Java 9 may still have some issues; see https://trac.i2p2.de/ticket/1870 for status
     32* Java JRE
     33  We require Java 7 or higher runtime, if built with Java 7 or bootclasspath was set
     34  in the build. If built with 8 or higher and bootclasspath was not set,
     35  then require the same JRE or higher.
    2736
    2837* geoip-database
     
    4150  For /usr/share/java/jetty9-*.jar.
    4251  In non-Debian builds we bundle the jars; it's removed in the Debian source package.
     52  This is for Jetty 9.2.x, which is what's in Debian.
     53  We are not compatible with Jetty 9.4.x, which is what's in RedHat.
    4354
    4455* libtomcat8-java
     
    4758  which are different than the way they are packaged for Debian.
    4859  They are removed in the Debian source package.
     60  This is for Tomcat 8.5.x, which is what's in recent Debian/Ubuntu.
     61  Tomcat 8.0.x in older Debian/Ubuntu may or may not work.
    4962
    5063* libtaglibs-standard-*-java (stretch and later, artful and later only)
     
    7184  but there's no particular version that we need.
    7285
    73 * libgmp-dev
     86* libgmp10
    7487  In non-Debian builds we bundle compiled C code; in the Debian packages we have a small
    7588  C shim that links to the libgmp .so file.
    76   We depend on libgmp-dev for both the build and the runtime, but perhaps only the
    77   libgmp10 package is required for runtime? To be researched.
    7889
    7990* famfamfam-flag-png
     
    186197  3rd-party plugins using our plugin system. If we do that, then we can
    187198  have packages for popular plugins such as i2p-bote.
     199
     200* AppArmor
     201  Needs work. In complain-only mode now.
Note: See TracChangeset for help on using the changeset viewer.