2020-07-17 17:31:19 +00:00
|
|
|
#!/bin/bash -eu
|
|
|
|
# Copyright 2020 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.
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
cp -r $SRC/fuzzer src/backend/
|
2020-09-17 04:42:31 +00:00
|
|
|
git apply ../add_fuzzers.diff
|
2020-08-28 22:25:55 +00:00
|
|
|
|
|
|
|
useradd fuzzuser
|
|
|
|
chown -R fuzzuser .
|
2020-07-17 17:31:19 +00:00
|
|
|
cd bld
|
|
|
|
|
2020-08-28 22:25:55 +00:00
|
|
|
CC="" CXX="" CFLAGS="" CXXFLAGS="" su fuzzuser -c ../configure
|
|
|
|
cd src/backend/fuzzer
|
|
|
|
su fuzzuser -c "make createdb"
|
|
|
|
chown -R root .
|
2020-09-05 04:50:11 +00:00
|
|
|
mv temp/data .
|
2020-09-11 06:21:59 +00:00
|
|
|
cp -r data $OUT/
|
2020-08-28 22:25:55 +00:00
|
|
|
cd ../../..
|
|
|
|
cp -r tmp_install $OUT/
|
|
|
|
make clean
|
2020-07-17 17:31:19 +00:00
|
|
|
|
2020-08-28 22:25:55 +00:00
|
|
|
../configure
|
|
|
|
make
|
|
|
|
cd src/backend/fuzzer
|
|
|
|
make fuzzer
|
|
|
|
cp *_fuzzer $OUT/
|
|
|
|
cp $SRC/postgresql_fuzzer_seed_corpus.zip $OUT/
|