Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PostGIS #709

Merged
merged 4 commits into from Jul 11, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 22 additions & 0 deletions projects/postgis/Dockerfile
@@ -0,0 +1,22 @@
# Copyright 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
################################################################################

FROM gcr.io/oss-fuzz-base/base-builder
MAINTAINER lr@pcorp.us
RUN apt-get update && apt-get install -y make autoconf automake libtool g++ postgresql-server-dev-9.5 libgeos-dev libproj-dev libxml2-dev pkg-config libjson-c-dev
RUN git clone --depth 1 https://git.osgeo.org/gogs/postgis/postgis.git postgis
WORKDIR postgis
COPY build.sh $SRC/
26 changes: 26 additions & 0 deletions projects/postgis/build.sh
@@ -0,0 +1,26 @@
#!/bin/bash -eu
# Copyright 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
################################################################################

./autogen.sh
./configure --enable-static --without-raster --without-protobuf
cd liblwgeom
make clean -s
make -j$(nproc) -s
cd ..

./fuzzers/build_google_oss_fuzzers.sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should work as is, but it's preferable to have the fuzz targets built as part of the regular developer build (make).
Otherwise the risk is that the fuzz targets will often bit rot and we will see failures only on oss-fuzz

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it should be part of make but it's ok for it to be part of a separate target (make fuzzers ?) -- especially as the path to that script may change (I find fuzzers to be too generic of a name, when other fuzzers do exist)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make fuzzers, make fuzz_targets , or some such would be great.
What we are tying to encourage is that the fuzz targets become part of the project's continuous integration process, even w/o actually fuzzing.
Read more at https://github.com/google/oss-fuzz/blob/master/docs/ideal_integration.md

./fuzzers/build_seed_corpus.sh
6 changes: 6 additions & 0 deletions projects/postgis/project.yaml
@@ -0,0 +1,6 @@
homepage: "http://postgis.net/"
primary_contact: "lr@pcorp.us"
auto_ccs:
- "even.rouault@gmail.com"
- "pramsey@cleverelephant.ca"
- "strk@kbt.io"