Commit Graph

199 Commits

Author SHA1 Message Date
Sarah Hoffmann
b5480f6e36 reorganise path settings in config
CONST_BasePath is split into separate configuration variables
for binaries, libraries and data. These variables as well as
the installation path are now set in the executable directly and
no longer configurable via project settings.

This is the first step towards an installable software. The
executables should know per installation where to find their
necessary data to execute. Project configuration needs to be
restricted to settings that really concern the specific Nominatim
installation.
2020-12-19 14:33:04 +01:00
Sarah Hoffmann
4b21cc1737 remove more traces of osmosis-init 2020-08-11 10:43:04 +02:00
Sarah Hoffmann
73566a9f15 remove unused functions from setup and update
Removes the defunct --osmosis-init and --no-api switches and the
unsupported (and unnecessary) deduplicate. Also removes
'experimental' from --setup-website as this is a required
function now.
2020-08-06 16:16:35 +02:00
Sarah Hoffmann
8cd9550295 implicitly connect to database during setup
Make access to the DB object a function, so that the connection
can be opened implicitly when the object is accessed for the first
time. This way we no longer need to check beforehand if a specific
function of the setup needs DB access or not.

Also move the check for the module to the relevant sub step.
2020-07-26 11:56:00 +02:00
K Rahul Reddy
37f0b51dff Updated setup.php 2020-06-27 10:45:53 +05:30
K Rahul Reddy
6c406124dd Added setup-website option 2020-06-27 10:45:51 +05:30
Sarah Hoffmann
b9171dd10b clean up intermediate tables earlier with --drop
When --drop is given, we can remove all node geometry information
already after the import with osm2pgsql. Also drop all unnecessary
tables before creating the final indices.
2020-02-12 11:03:20 +01:00
Sarah Hoffmann
3ff6eccfd7 move trigger creation later in setup 2020-01-23 22:28:43 +01:00
marc tobias
84149f26df checkModulePresence now raises exception instead of its callers 2019-04-02 18:37:11 +02:00
Sarah Hoffmann
e70f405abd Restructure script and website installation
Just make cmake install a small stub that includes
the settings from the build directory and then the
script from the source directory. Remove executable
rights from php files in utils/ so that they cannot
be accidentally executed.
2018-12-02 11:13:48 +01:00
Sarah Hoffmann
5d98c09ee9 Add reverse-only parameter to setup
Avoids creating the search_name table. Useful when only /reverse
is used or the content is directly exported to photon.

Fixes #939.
2018-11-21 19:36:21 +01:00
Sarah Hoffmann
409ded385f simplify connection handling in setup script
- factor out runWithEnv
- require explicit connect() call to avoid rechecking for oDB
  (more for readability than for speed)
- clean DSNInfo of empty strings and simplify check for entries
2018-11-20 22:51:37 +01:00
Sarah Hoffmann
e2d0c9f3c1 fix variable prefix 2018-11-20 21:07:24 +01:00
Sarah Hoffmann
3afd12f977 simplify constructor of SetupFunctions
Also cleans up spacing.
2018-10-02 23:42:33 +02:00
ThomasBarris
0273e128f4 change variables for class SetupClass.php instantiation 2018-09-18 21:28:05 +02:00
ThomasBarris
a0dbeabed1 move setupclass, move command line array, remove args from update array 2018-09-17 10:28:00 +02:00
ThomasBarris
08c2f03ccc moving comment to right position 2018-09-08 10:14:08 +02:00
ThomasBarris
d10f63b666 format change revert, removed bogus CL options, SetupClass to a new dir 2018-09-05 22:01:03 +02:00
ThomasBarris
a3b4f80c99 small fixes on setup.php and a bring update.php to work 2018-08-31 21:31:38 +02:00
ThomasBarris
b2f3cfde0b splitted createTables and changed formatting to please Travis 2018-08-29 22:54:28 +02:00
ThomasBarris
c036480ce2 first draft of setupClass 2018-08-29 21:31:19 +02:00
ThomasBarris
14aca11dcd moving functions from setup.php to a lib file in lib/setup_functions.php and change a passthru in setup.php by calling the function with this new lib 2018-08-24 16:15:39 +02:00
Sarah Hoffmann
1ee636461c Mute notices from postgresql during setup
They are mostly warnings about tables that do not exists. This
is intentional and would only confuse the casual user.
2018-08-23 21:14:34 +02:00
ThomasBarris
e936041713 Revert "Split of setup.php into one file with functions and one with the control of the workflow. The functions will also be included by update.php to avoid the passthru"
This reverts commit 55fa051d3a.
2018-08-23 08:07:40 +02:00
ThomasBarris
a8b31090a1 Revert "code beauty improvements"
This reverts commit ee3973f507.
2018-08-23 08:07:08 +02:00
ThomasBarris
ee3973f507 code beauty improvements 2018-08-22 21:33:17 +02:00
ThomasBarris
55fa051d3a Split of setup.php into one file with functions and one with the control of the workflow. The functions will also be included by update.php to avoid the passthru 2018-08-22 21:06:55 +02:00
ThomasBarris
e286536959 replaced all shebangs in utility scripts with @PHP_BIN@, to be replaced with detected PHP binary on install 2018-08-21 13:21:08 +02:00
Eric Stadtherr
87d78e87d2 changed nominatim.so module path to be a runtime configuration setting as opposed to a command line argument 2018-07-24 15:25:12 -06:00
Eric Stadtherr
bf5063de9a fix variable reference 2018-07-21 21:59:03 -06:00
Eric Stadtherr
13efedde34 fix omitted initialization 2018-07-21 21:53:41 -06:00
Eric Stadtherr
c1beefd543 PR review changes 2018-07-21 21:45:23 -06:00
Eric Stadtherr
1d81c17335 fix a couple errors with naming convention changes 2018-07-21 20:43:48 -06:00
Eric Stadtherr
b8b87716db adapt PR changes to use new variable naming convention 2018-07-21 17:09:59 -06:00
Eric Stadtherr
1108bf7d86 PR review changes 2018-07-21 12:09:47 -06:00
Eric Stadtherr
62747c934d Work on setup/update scripts, unit tests, and documentation to enable Postgres server to be optionally configured on a remote host 2018-07-21 12:09:47 -06:00
Sarah Hoffmann
80a6751c51 make phpcs happy 2018-07-06 22:06:05 +02:00
Sarah Hoffmann
ac29f8bc91 Merge branch 'better-reverse' of https://github.com/gemo1011/Nominatim into gemo1011-better-reverse 2018-07-02 21:33:27 +02:00
Unknown
ec6a427e0a edited indices an setup file to grant select for table country_osm_grid 2018-06-28 11:34:19 +02:00
Frederik Ramm
8139a079f8
limit default threads to 15
When no explicit number of threads is given, don't simply use getProcessorCount()-1, but limit to max. 15
2018-06-20 14:17:07 +02:00
Sarah Hoffmann
3fda792929 ignore empty flatnode file option
Fixes #902.
2018-02-12 20:47:04 +01:00
Sarah Hoffmann
2cf1ff41c0 move nominatim.org links to https
Solves #737.
2018-01-10 23:21:21 +01:00
Sarah Hoffmann
45abcbc301 update drop list for new postcode table
Fixes #875.
2018-01-05 22:41:25 +01:00
Sarah Hoffmann
d5df1c8ae3 fix setup when no us_postcode is available 2018-01-05 22:41:05 +01:00
Sarah Hoffmann
6c1977b448 replace double-quoting with single quotes where applicable 2017-10-26 21:40:33 +02:00
Sarah Hoffmann
8e0ffde3e0 fix CodeSniffer violations 2017-10-08 17:00:59 +02:00
Sarah Hoffmann
bafbf679b6 add script for updating postcodes 2017-10-03 15:58:14 +02:00
Sarah Hoffmann
8e2ef2842e move psqlRunScript implementation into cmd lib
Function needed for update.php as well.
2017-10-03 14:26:59 +02:00
Sarah Hoffmann
61ed3b8ab3 setup: bail out earl when something is wrong with nominatim.so 2017-09-17 20:07:03 +02:00
Sarah Hoffmann
bb1552be29 setup: error out when web site user does not exist
User is needed to be able to grant rights.
2017-09-17 19:51:00 +02:00