This is an automated email from the ASF dual-hosted git repository. tross pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git
The following commit(s) were added to refs/heads/master by this push: new c57e76b DISPATCH-1300 - Removing /stand-alone from console install dir Updated the console-tarball generator to work with the new layout This closes #475 c57e76b is described below commit c57e76b92ef2ead3232dc114c1e8c1565c999db1 Author: Ernest Allen <eal...@redhat.com> AuthorDate: Thu Mar 21 14:15:06 2019 -0400 DISPATCH-1300 - Removing /stand-alone from console install dir Updated the console-tarball generator to work with the new layout This closes #475 --- CMakeLists.txt | 2 +- bin/make_standalone_console_tarball.sh | 4 +--- src/config.h.in | 1 + src/connection_manager.c | 11 +---------- src/http-libwebsockets.c | 2 +- 5 files changed, 5 insertions(+), 15 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1e2194e..f1a30f6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -104,7 +104,7 @@ set(QPID_DISPATCH_HOME_INSTALLED ${CMAKE_INSTALL_PREFIX}/${QPID_DISPATCH_HOME}) set(CONSOLE_BASE_INSTALL_DIR "share/qpid-dispatch/console") set(CONSOLE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${CONSOLE_BASE_INSTALL_DIR}") -set(CONSOLE_STAND_ALONE_INSTALL_DIR "${CONSOLE_INSTALL_DIR}/stand-alone") +set(CONSOLE_STAND_ALONE_INSTALL_DIR "${CONSOLE_INSTALL_DIR}") set(RUN ${PYTHON_EXECUTABLE} ${CMAKE_BINARY_DIR}/run.py) diff --git a/bin/make_standalone_console_tarball.sh b/bin/make_standalone_console_tarball.sh index 75f0536..14015e6 100755 --- a/bin/make_standalone_console_tarball.sh +++ b/bin/make_standalone_console_tarball.sh @@ -89,13 +89,11 @@ echo Working Directory=${WORKDIR} pushd $BUILD_DIR cmake -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR -DCMAKE_BUILD_TYPE=Release ../$PREFIX make install - pushd $INSTALL_DIR/share/qpid-dispatch/console - ln -s stand-alone console + pushd $INSTALL_DIR/share/qpid-dispatch/ tar -c -h -z \ --owner=root --group=root --numeric-owner \ --mtime="${MTIME}" \ -f ${ARCHIVE} console - rm console popd popd echo Created "${ARCHIVE}" diff --git a/src/config.h.in b/src/config.h.in index 90b201a..5cd3e89 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -19,5 +19,6 @@ #define QPID_DISPATCH_VERSION "${QPID_DISPATCH_VERSION}" #define QPID_DISPATCH_LIB "$<TARGET_FILE_NAME:qpid-dispatch>" +#define QPID_CONSOLE_STAND_ALONE_INSTALL_DIR "${CONSOLE_STAND_ALONE_INSTALL_DIR}" #cmakedefine01 USE_MEMORY_POOL #cmakedefine01 QD_MEMORY_STATS diff --git a/src/connection_manager.c b/src/connection_manager.c index fef6bdb..d31561b 100644 --- a/src/connection_manager.c +++ b/src/connection_manager.c @@ -317,16 +317,7 @@ static qd_error_t load_server_config(qd_dispatch_t *qd, qd_server_config_t *conf config->websockets = qd_entity_opt_bool(entity, "websockets", true); CHECK(); config->http = qd_entity_opt_bool(entity, "http", false); CHECK(); config->http_root_dir = qd_entity_opt_string(entity, "httpRootDir", false); CHECK(); - - // Because of a potential conflict when console is installed or not installed, - // we now want to require that the config file explicitly specify HTTP root - // if it wants full HTTP service. If it does not specify HTTP root, it will - // be useful for AMQP-over-websockets, but will not serve any static content. - config->http = config->http || config->http_root_dir; - if (config->http && ! config->http_root_dir) { - qd_log(qd->connection_manager->log_source, QD_LOG_INFO, "HTTP service is requested but no httpRootDir specified. The router will serve AMQP-over-websockets but no static content."); - } - + config->http = config->http || config->http_root_dir; /* httpRoot implies http */ config->max_frame_size = qd_entity_get_long(entity, "maxFrameSize"); CHECK(); config->max_sessions = qd_entity_get_long(entity, "maxSessions"); CHECK(); uint64_t ssn_frames = qd_entity_opt_long(entity, "maxSessionFrames", 0); CHECK(); diff --git a/src/http-libwebsockets.c b/src/http-libwebsockets.c index 850c646..06f7045 100644 --- a/src/http-libwebsockets.c +++ b/src/http-libwebsockets.c @@ -305,7 +305,7 @@ static void listener_start(qd_http_listener_t *hl, qd_http_server_t *hs) { m->mountpoint = "/"; /* URL mount point */ m->mountpoint_len = strlen(m->mountpoint); /* length of the mountpoint */ m->origin = (config->http_root_dir && *config->http_root_dir) ? /* File system root */ - config->http_root_dir : 0; // http root must now be explicitly specified in config. + config->http_root_dir : QPID_CONSOLE_STAND_ALONE_INSTALL_DIR; m->def = "index.html"; /* Default file name */ m->origin_protocol = LWSMPRO_FILE; /* mount type is a directory in a filesystem */ m->extra_mimetypes = mime_types; --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org