From: Sarah Hoffmann Date: Fri, 31 Jan 2020 16:54:41 +0000 (+0100) Subject: Merge remote-tracking branch 'upstream/master' X-Git-Tag: deploy~259 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/30ead191463103fb4faceb52fc6fb4867bd41e18?hp=-c Merge remote-tracking branch 'upstream/master' --- 30ead191463103fb4faceb52fc6fb4867bd41e18 diff --combined CMakeLists.txt index a5034786,ba234d55..17b5cd72 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@@ -45,14 -45,14 +45,14 @@@ if (NOT ONLY_DOCS endif() add_subdirectory(osm2pgsql) - find_package(Threads REQUIRED) - unset(PostgreSQL_TYPE_INCLUDE_DIR CACHE) set(PostgreSQL_TYPE_INCLUDE_DIR "/usr/include/") find_package(PostgreSQL REQUIRED) include_directories(${PostgreSQL_INCLUDE_DIRS}) link_directories(${PostgreSQL_LIBRARY_DIRS}) + find_package(PythonInterp 3) + find_program(PYOSMIUM pyosmium-get-changes) if (NOT EXISTS "${PYOSMIUM}") set(PYOSMIUM_PATH "") @@@ -72,13 -72,6 +72,6 @@@ message(FATAL_ERROR "Postgresql server package not found.") endif() - find_package(ZLIB REQUIRED) - - find_package(BZip2 REQUIRED) - - find_package(LibXml2 REQUIRED) - include_directories(${LIBXML2_INCLUDE_DIR}) - # Setting PHP binary variable as to command line (prevailing) or auto detect if (NOT PHP_BIN) find_program (PHP_BIN php) @@@ -107,16 -100,6 +100,16 @@@ set(WEBSITESCRIPT website/status.php ) +set(WEBSITEFILES + 403.html + 509.html + crossdomain.xml + favicon.ico + nominatim.xml + robots.txt + taginfo.json +) + set(CUSTOMSCRIPTS utils/check_import_finished.php utils/country_languages.php @@@ -138,11 -121,6 +131,11 @@@ foreach (script_source ${WEBSITESCRIPTS ${PROJECT_BINARY_DIR}/${script_source}) endforeach() +foreach (webfile ${WEBSITEFILES}) + configure_file(${PROJECT_SOURCE_DIR}/website/${webfile} + ${PROJECT_BINARY_DIR}/website/${webfile}) +endforeach() + configure_file(${PROJECT_SOURCE_DIR}/settings/defaults.php ${PROJECT_BINARY_DIR}/settings/settings.php) @@@ -183,7 -161,6 +176,6 @@@ endif( if (NOT ONLY_DOCS) add_subdirectory(module) - add_subdirectory(nominatim) endif() add_subdirectory(docs) diff --combined utils/update.php index f71c4f43,033c3019..d91c8a76 --- a/utils/update.php +++ b/utils/update.php @@@ -49,7 -49,6 +49,7 @@@ $aCMDOption getCmdOpt($_SERVER['argv'], $aCMDOptions, $aResult, true, true); if (!isset($aResult['index-instances'])) $aResult['index-instances'] = 1; + if (!isset($aResult['index-rank'])) $aResult['index-rank'] = 0; date_default_timezone_set('Etc/UTC'); @@@ -82,6 -81,8 +82,8 @@@ if (!is_null(CONST_Osm2pgsql_Flatnode_F $sOsm2pgsqlCmd .= ' --flat-nodes '.CONST_Osm2pgsql_Flatnode_File; } + $sIndexCmd = CONST_BasePath.'/nominatim/nominatim.py'; + if ($aResult['init-updates']) { // sanity check that the replication URL is correct $sBaseState = file_get_contents(CONST_Replication_Url.'/state.txt'); @@@ -303,7 -304,11 +305,11 @@@ if ($aResult['recompute-word-counts']) } if ($aResult['index']) { - $sCmd = CONST_InstallPath.'/nominatim/nominatim -i -d '.$aDSNInfo['database'].' -P '.$aDSNInfo['port'].' -t '.$aResult['index-instances'].' -r '.$aResult['index-rank']; + $sCmd = $sIndexCmd + .' -d '.$aDSNInfo['database'] + .' -P '.$aDSNInfo['port'] + .' -t '.$aResult['index-instances'] + .' -r '.$aResult['index-rank']; if (isset($aDSNInfo['hostspec']) && $aDSNInfo['hostspec']) { $sCmd .= ' -H ' . $aDSNInfo['hostspec']; } @@@ -349,7 -354,10 +355,10 @@@ if ($aResult['import-osmosis'] || $aRes $sImportFile = CONST_InstallPath.'/osmosischange.osc'; $sCMDDownload = CONST_Pyosmium_Binary.' --server '.CONST_Replication_Url.' -o '.$sImportFile.' -s '.CONST_Replication_Max_Diff_size; $sCMDImport = $sOsm2pgsqlCmd.' '.$sImportFile; - $sCMDIndex = CONST_InstallPath.'/nominatim/nominatim -i -d '.$aDSNInfo['database'].' -P '.$aDSNInfo['port'].' -t '.$aResult['index-instances']; + $sCMDIndex = $sIndexCmd + .' -d '.$aDSNInfo['database'] + .' -P '.$aDSNInfo['port'] + .' -t '.$aResult['index-instances']; if (isset($aDSNInfo['hostspec']) && $aDSNInfo['hostspec']) { $sCMDIndex .= ' -H ' . $aDSNInfo['hostspec']; }