-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Import osm2pgsql_2.0.0+ds.orig.tar.xz
[dgit import orig osm2pgsql_2.0.0+ds.orig.tar.xz]
- Loading branch information
Bas Couwenberg
committed
Sep 19, 2024
0 parents
commit 735a262
Showing
429 changed files
with
106,502 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
Language: Cpp | ||
BasedOnStyle: LLVM | ||
AccessModifierOffset: -4 | ||
BreakBeforeBraces: Mozilla | ||
IndentWidth: 4 | ||
ConstructorInitializerIndentWidth: 0 | ||
ReflowComments: false | ||
AlwaysBreakTemplateDeclarations: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
--- | ||
Checks: '*,-abseil-*,-altera-*,-android-cloexec-*,-bugprone-easily-swappable-parameters,-cert-err58-cpp,-cppcoreguidelines-avoid-do-while,-cppcoreguidelines-avoid-magic-numbers,-cppcoreguidelines-avoid-non-const-global-variables,-cppcoreguidelines-owning-memory,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-pro-type-cstyle-cast,-cppcoreguidelines-pro-type-reinterpret-cast,-cppcoreguidelines-pro-type-static-cast-downcast,-cppcoreguidelines-pro-type-vararg,-fuchsia-*,-google-readability-casting,-google-readability-todo,-hicpp-named-parameter,-hicpp-no-array-decay,-hicpp-vararg,-llvm-include-order,-llvm-header-guard,-llvmlibc-*,-misc-include-cleaner,-misc-no-recursion,-modernize-use-nodiscard,-modernize-use-trailing-return-type,-readability-identifier-length,-readability-implicit-bool-conversion,-readability-named-parameter,-readability-magic-numbers' | ||
# | ||
# cppcoreguidelines-pro-type-cstyle-cast | ||
# google-build-using-namespace | ||
# google-readability-casting | ||
# llvm-header-guard | ||
# llvm-include-order | ||
# hicpp-named-parameter | ||
# readability-named-parameter | ||
# Differ from our style guidelines | ||
# | ||
# abseil-* | ||
# Not applicable. | ||
# | ||
# altera-* | ||
# Not applicable. | ||
# | ||
# android-cloexec-* | ||
# O_CLOEXEC isn't available on Windows | ||
# | ||
# bugprone-easily-swappable-parameters | ||
# Can't always be avoided. | ||
# | ||
# cert-err58-cpp | ||
# There are many of these in the test code, most of them from the Catch | ||
# framework. Difficult to avoid. | ||
# | ||
# cppcoreguidelines-avoid-do-while (new in clang-tidy-16) | ||
# Its a good idea to avoid them when there are better alternatives, but | ||
# sometimes they are the cleanest alternative. | ||
# | ||
# cppcoreguidelines-avoid-magic-numbers | ||
# readability-magic-numbers | ||
# We have a lot of these and should probably at least fix some. But remove | ||
# it for the time being because with it we can't see the forest for the | ||
# trees. (TODO) | ||
# | ||
# cppcoreguidelines-avoid-non-const-global-variables | ||
# Not wrong to avoid those, but we have a few that are hard to avoid. | ||
# Also this warning is triggered many times by constructs in the Catch test | ||
# framework. | ||
# | ||
# cppcoreguidelines-owning-memory | ||
# cppcoreguidelines-pro-bounds-array-to-pointer-decay | ||
# cppcoreguidelines-pro-bounds-pointer-arithmetic | ||
# cppcoreguidelines-pro-type-static-cast-downcast | ||
# cppcoreguidelines-pro-type-vararg | ||
# hicpp-no-array-decay | ||
# hicpp-vararg | ||
# When you need them, you need them | ||
# | ||
# fuchsia-* | ||
# Very specific and way too strict | ||
# | ||
# google-readability-todo | ||
# We are not that organized | ||
# | ||
# llvmlibc-* | ||
# Not applicable | ||
# | ||
# misc-include-cleaner (new in clang-tidy-17) | ||
# Many instances of this warning, disabled for now. (TODO) | ||
# | ||
# misc-no-recursion | ||
# Nothing wrong with recursion | ||
# | ||
# modernize-use-nodiscard | ||
# Doesn't really make the code clearer if it is all littered with | ||
# [[nodiscard]]. Looks like this warning is more suited for a library | ||
# than for normal code. | ||
# | ||
# modernize-use-trailing-return-type | ||
# We are not that modern... | ||
# | ||
# readability-identifier-length | ||
# Generally not a bad idea, but there are many cases where short names | ||
# for (local) vars are okay. | ||
# | ||
# readability-implicit-bool-conversion | ||
# Readability is a matter of opinion here | ||
# | ||
#WarningsAsErrors: '*' | ||
HeaderFilterRegex: '\/src\/' | ||
CheckOptions: | ||
- key: cppcoreguidelines-special-member-functions.AllowSoleDefaultDtor | ||
value: true | ||
- key: hicpp-special-member-functions.AllowSoleDefaultDtor | ||
value: true | ||
- key: misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic | ||
value: true | ||
- key: cppcoreguidelines-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic | ||
value: true | ||
- key: readability-function-cognitive-complexity.Threshold | ||
value: 100 | ||
- key: readability-function-cognitive-complexity.IgnoreMacros | ||
value: true | ||
- key: cppcoreguidelines-rvalue-reference-param-not-moved.AllowPartialMove | ||
value: true | ||
- key: bugprone-empty-catch.IgnoreCatchWithKeywords | ||
value: "@todo;@fixme;exception ignored on purpose" | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
custom: "https://osm2pgsql.org/sponsors/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
name: Report problems with the software | ||
about: You found a (possible) bug in osm2pgsql | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
<!-- Please don't use screenshots. Copy and paste the *text* output here if that's needed for context. --> | ||
|
||
## What version of osm2pgsql are you using? | ||
|
||
<!-- Paste output of `osm2pgsql --version` here. Please use the [latest | ||
release](https://osm2pgsql.org/releases/) of osm2pgsql if at all | ||
possible. --> | ||
|
||
|
||
## What operating system and PostgreSQL/PostGIS version are you using? | ||
|
||
<!-- Also what Linux distribution if applicable, OS version? --> | ||
|
||
|
||
## Tell us something about your system | ||
|
||
<!-- How much RAM do you have, how many CPUs, bare metal or cloud setup? --> | ||
|
||
|
||
## What did you do exactly? | ||
|
||
<!-- Please provide the command(s) you used including all options etc. Include | ||
links to input files. --> | ||
|
||
|
||
## What did you expect to happen? | ||
|
||
<!-- Describe in detail what you expected the above would do. --> | ||
|
||
|
||
## What did happen instead? | ||
|
||
<!-- Please describe what happened and why you think this is wrong. Please include | ||
(or link to, if it is too verbose) the log output. --> | ||
|
||
|
||
## What did you do to try analyzing the problem? | ||
|
||
<!-- Describe what steps you already did to try analyzing the problem before | ||
reporting. --> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
contact_links: | ||
- name: osm2pgsql Discussions | ||
url: https://github.com/openstreetmap/osm2pgsql/discussions | ||
about: Ask questions, get support, share ideas and discuss with community members. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Build and test osm2pgsql | ||
|
||
inputs: | ||
test-wrapper: | ||
description: 'Wrapper to use around tests' | ||
required: false | ||
default: pg_virtualenv | ||
|
||
runs: | ||
using: composite | ||
|
||
steps: | ||
- name: build | ||
run: make -j3 all man | ||
shell: bash | ||
working-directory: build | ||
|
||
- name: test | ||
run: | | ||
if [ "$WRAPPER" = "pg_virtualenv" ]; then | ||
pg_virtualenv -v $POSTGRESQL_VERSION ctest --output-on-failure | ||
else | ||
$WRAPPER ctest --output-on-failure | ||
fi | ||
shell: bash | ||
working-directory: build | ||
env: | ||
WRAPPER: ${{ inputs.test-wrapper }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name: Run clang-tidy | ||
|
||
runs: | ||
using: composite | ||
|
||
steps: | ||
- name: Run clang-tidy | ||
run: run-clang-tidy-17 -q -p build | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: CMake | ||
|
||
runs: | ||
using: composite | ||
|
||
steps: | ||
- name: create build directory | ||
run: mkdir build | ||
shell: bash | ||
|
||
- name: configure | ||
run: | | ||
CMAKE_OPTIONS="-LA -DBUILD_TESTS=ON -DWITH_LUAJIT=${LUAJIT_OPTION}" | ||
if [ -n "$WITH_PROJ" ]; then | ||
CMAKE_OPTIONS="$CMAKE_OPTIONS -DWITH_PROJ=$WITH_PROJ" | ||
fi | ||
if [ -n "$CPP_VERSION" ]; then | ||
CMAKE_OPTIONS="$CMAKE_OPTIONS -DCMAKE_CXX_STANDARD=$CPP_VERSION" | ||
fi | ||
if [ -n "$BUILD_TYPE" ]; then | ||
CMAKE_OPTIONS="$CMAKE_OPTIONS -DCMAKE_BUILD_TYPE=$BUILD_TYPE" | ||
fi | ||
cmake $CMAKE_OPTIONS .. | ||
shell: bash | ||
working-directory: build | ||
env: | ||
CXXFLAGS: -pedantic -Wextra ${{ env.EXTRA_FLAGS }} -Werror | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Install Prerequisites on Ubuntu | ||
|
||
runs: | ||
using: composite | ||
|
||
steps: | ||
- name: Remove preinstalled PostgreSQL | ||
run: | | ||
sudo apt-get remove -yq postgresql* | ||
sudo apt-get install curl ca-certificates gnupg | ||
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg >/dev/null | ||
sudo sh -c 'echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' | ||
sudo apt-get update -qq | ||
shell: bash | ||
|
||
- name: Install software | ||
run: | | ||
sudo apt-get install -yq --no-install-suggests --no-install-recommends \ | ||
libboost-dev \ | ||
libbz2-dev \ | ||
libexpat1-dev \ | ||
libopencv-dev \ | ||
libpotrace-dev \ | ||
libpq-dev \ | ||
libproj-dev \ | ||
nlohmann-json3-dev \ | ||
pandoc \ | ||
postgresql-${POSTGRESQL_VERSION} \ | ||
postgresql-${POSTGRESQL_VERSION}-postgis-${POSTGIS_VERSION} \ | ||
postgresql-${POSTGRESQL_VERSION}-postgis-${POSTGIS_VERSION}-scripts \ | ||
postgresql-client postgresql-contrib-${POSTGRESQL_VERSION} \ | ||
python3-setuptools \ | ||
zlib1g-dev | ||
pip3 install $PIP_OPTION behave osmium | ||
if [ "$CC" = clang-8 ]; then sudo apt-get install -yq --no-install-suggests --no-install-recommends clang-8; fi | ||
if [ "$PSYCOPG" = "2"]; then | ||
sudo apt-get install -yq --no-install-suggests --no-install-recommends python3-psycopg2 | ||
else | ||
pip3 install $PIP_OPTION psycopg | ||
fi | ||
shell: bash | ||
|
||
- name: Install Lua | ||
run: | | ||
if [ -n "${LUA_VERSION}" ]; then | ||
sudo apt-get install -yq --no-install-suggests --no-install-recommends liblua${LUA_VERSION}-dev lua${LUA_VERSION} | ||
fi | ||
shell: bash | ||
|
||
- name: Install LuaJIT | ||
run: | | ||
if [ "${LUAJIT_OPTION}" = "ON" ]; then | ||
sudo apt-get install -yq --no-install-suggests --no-install-recommends libluajit-5.1-dev | ||
fi | ||
shell: bash | ||
|
||
- name: Adapt PostgreSQL configuration | ||
run: | | ||
echo 'fsync = off' | sudo tee /etc/postgresql/${POSTGRESQL_VERSION}/main/conf.d/local.conf | ||
echo 'synchronous_commit = off' | sudo tee -a /etc/postgresql/${POSTGRESQL_VERSION}/main/conf.d/local.conf | ||
echo 'full_page_writes = off' | sudo tee -a /etc/postgresql/${POSTGRESQL_VERSION}/main/conf.d/local.conf | ||
echo 'shared_buffers = 1GB' | sudo tee -a /etc/postgresql/${POSTGRESQL_VERSION}/main/conf.d/local.conf | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: Windows build | ||
|
||
runs: | ||
using: composite | ||
|
||
steps: | ||
- name: Build | ||
run: cmake --build . --config Release --verbose | ||
shell: bash | ||
working-directory: build | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Windows CMake | ||
|
||
runs: | ||
using: composite | ||
|
||
steps: | ||
- name: Create build directory | ||
run: mkdir build | ||
shell: bash | ||
|
||
- name: Configure | ||
run: cmake -LA .. -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DBUILD_TESTS=ON -DGETOPT_INCLUDE_DIR=$GETOPT_INCLUDE_DIR -DGETOPT_LIBRARY=$GETOPT_LIBRARY -DBoost_USE_STATIC_LIBS=ON | ||
shell: bash | ||
working-directory: build | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Windows install | ||
|
||
runs: | ||
using: composite | ||
|
||
steps: | ||
- name: Install packages | ||
run: | | ||
vcpkg install \ | ||
boost-geometry:x64-windows \ | ||
bzip2[core]:x64-windows \ | ||
expat:x64-windows \ | ||
libpq:x64-windows \ | ||
lua:x64-windows \ | ||
nlohmann-json:x64-windows \ | ||
proj[core]:x64-windows \ | ||
zlib:x64-windows | ||
shell: bash | ||
- name: Install psycopg2 and behave | ||
run: python -m pip install psycopg2 behave osmium | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Set up PostgreSQL on Windows | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Download postgis | ||
run: | | ||
if (!(Test-Path "C:\postgis.zip")){(new-object net.webclient).DownloadFile("https://osm2pgsql.org/ci/winbuild/postgis-bundle-pg14-3.2.0x64.zip", "c:\postgis.zip")} | ||
7z x c:\postgis.zip -oc:\postgis_archive | ||
shell: pwsh | ||
|
||
- name: Install postgis | ||
run: | | ||
echo "Root: $PGROOT, Bin: $PGBIN" | ||
cp -r c:/postgis_archive/postgis-bundle-*/* "$PGROOT" | ||
shell: bash | ||
|
||
- name: Start PostgreSQL on Windows | ||
run: | | ||
$pgService = Get-Service -Name postgresql* | ||
Set-Service -InputObject $pgService -Status running -StartupType automatic | ||
Start-Process -FilePath "$env:PGBIN\pg_isready" -Wait -PassThru | ||
shell: pwsh | ||
|
||
- name: Create test tablespace | ||
run: | | ||
mkdir c:\tablespace | ||
& $env:PGBIN\psql -c "CREATE TABLESPACE tablespacetest LOCATION 'c:/tablespace'" | ||
shell: pwsh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Windows test | ||
|
||
runs: | ||
using: composite | ||
|
||
steps: | ||
- name: Test | ||
run: ctest --output-on-failure -C Release | ||
env: | ||
PYTHONUTF8: 1 | ||
PROJ_DATA: c:/vcpkg/installed/x64-windows/share/proj/ # so proj finds proj.db | ||
shell: bash | ||
working-directory: build | ||
|
Oops, something went wrong.