• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2017 Google Inc.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#      http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14#
15################################################################################
16
17FROM gcr.io/oss-fuzz-base/base-builder
18# install build requirements
19RUN apt-get update && \
20    apt-get install -y wget xz-utils autoconf automake libtool pkg-config \
21        gperf libglm-dev patch
22ADD https://dev-www.libreoffice.org/src/lcms2-2.8.tar.gz \
23    https://dev-www.libreoffice.org/src/zlib-1.2.11.tar.xz \
24    https://dev-www.libreoffice.org/src/libpng-1.6.34.tar.xz \
25    https://dev-www.libreoffice.org/src/libxml2-2.9.7.tar.gz \
26    https://dev-www.libreoffice.org/src/icu4c-60_2-src.tgz \
27    https://dev-www.libreoffice.org/src/mdds-1.3.1.tar.bz2 \
28    https://dev-www.libreoffice.org/src/boost_1_66_0.tar.bz2 \
29    $SRC/
30# download fuzzing corpora
31ADD https://dev-www.libreoffice.org/corpus/olefuzzer_seed_corpus.zip \
32    https://dev-www.libreoffice.org/corpus/pubfuzzer_seed_corpus.zip \
33    https://dev-www.libreoffice.org/corpus/zipfuzzer_seed_corpus.zip \
34    https://dev-www.libreoffice.org/corpus/cdrfuzzer_seed_corpus.zip \
35    https://dev-www.libreoffice.org/corpus/vsdfuzzer_seed_corpus.zip \
36    https://dev-www.libreoffice.org/corpus/zmffuzzer_seed_corpus.zip \
37    https://dev-www.libreoffice.org/corpus/pmdfuzzer_seed_corpus.zip \
38    https://dev-www.libreoffice.org/corpus/fhfuzzer_seed_corpus.zip \
39    https://dev-www.libreoffice.org/corpus/cmxfuzzer_seed_corpus.zip \
40    https://dev-www.libreoffice.org/corpus/sdcfuzzer_seed_corpus.zip \
41    https://dev-www.libreoffice.org/corpus/bmifuzzer_seed_corpus.zip \
42    https://dev-www.libreoffice.org/corpus/abwfuzzer_seed_corpus.zip \
43    https://dev-www.libreoffice.org/corpus/sdafuzzer_seed_corpus.zip \
44    https://dev-www.libreoffice.org/corpus/sddfuzzer_seed_corpus.zip \
45    https://dev-www.libreoffice.org/corpus/sdwfuzzer_seed_corpus.zip \
46    https://dev-www.libreoffice.org/corpus/key6fuzzer_seed_corpus.zip \
47    https://dev-www.libreoffice.org/corpus/vsdxfuzzer_seed_corpus.zip \
48    https://dev-www.libreoffice.org/corpus/vdxfuzzer_seed_corpus.zip \
49    https://dev-www.libreoffice.org/corpus/qxpfuzzer_seed_corpus.zip \
50    $SRC/
51RUN wget -q --show-progress --progress=bar:force \
52    https://sourceforge.net/projects/libwpd/files/corpus/wpdfuzzer_seed_corpus.zip \
53    https://sourceforge.net/projects/libwpg/files/corpus/wpgfuzzer_seed_corpus.zip \
54    https://sourceforge.net/projects/libwps/files/corpus/wpsfuzzer_seed_corpus.zip \
55    https://sourceforge.net/projects/libmwaw/files/corpus/actafuzzer_seed_corpus.zip \
56    https://sourceforge.net/projects/libebook/files/corpus/lrffuzzer_seed_corpus.zip \
57    https://sourceforge.net/projects/libwps/files/corpus/wksfuzzer_seed_corpus.zip \
58    https://sourceforge.net/projects/libwps/files/corpus/wdbfuzzer_seed_corpus.zip \
59    https://sourceforge.net/projects/libwps/files/corpus/docfuzzer_seed_corpus.zip \
60    https://sourceforge.net/projects/libwps/files/corpus/wrifuzzer_seed_corpus.zip \
61    https://sourceforge.net/projects/libmwaw/files/corpus/powerpointfuzzer_seed_corpus.zip \
62    https://sourceforge.net/projects/libmwaw/files/corpus/mswrdfuzzer_seed_corpus.zip \
63    https://sourceforge.net/projects/libmwaw/files/corpus/mswksfuzzer_seed_corpus.zip \
64    https://sourceforge.net/projects/libwps/files/corpus/123fuzzer_seed_corpus.zip \
65    https://sourceforge.net/projects/libwps/files/corpus/wqfuzzer_seed_corpus.zip \
66    https://sourceforge.net/projects/libebook/files/corpus/pdbfuzzer_seed_corpus.zip \
67    https://sourceforge.net/projects/libmwaw/files/corpus/beaglewksfuzzer_seed_corpus.zip \
68    https://sourceforge.net/projects/libmwaw/files/corpus/clariswksfuzzer_seed_corpus.zip \
69    https://sourceforge.net/projects/libmwaw/files/corpus/greatwksfuzzer_seed_corpus.zip \
70    https://sourceforge.net/projects/libmwaw/files/corpus/applepictfuzzer_seed_corpus.zip \
71    https://sourceforge.net/projects/libmwaw/files/corpus/clarisdrawfuzzer_seed_corpus.zip \
72    https://sourceforge.net/projects/libmwaw/files/corpus/cricketdrawfuzzer_seed_corpus.zip \
73    https://sourceforge.net/projects/libmwaw/files/corpus/freehandfuzzer_seed_corpus.zip \
74    https://sourceforge.net/projects/libmwaw/files/corpus/macdraftfuzzer_seed_corpus.zip \
75    https://sourceforge.net/projects/libmwaw/files/corpus/macdrawfuzzer_seed_corpus.zip \
76    https://sourceforge.net/projects/libmwaw/files/corpus/macpaintfuzzer_seed_corpus.zip \
77    https://sourceforge.net/projects/libmwaw/files/corpus/pixelpaintfuzzer_seed_corpus.zip \
78    https://sourceforge.net/projects/libmwaw/files/corpus/superpaintfuzzer_seed_corpus.zip \
79    https://sourceforge.net/projects/libmwaw/files/corpus/wingzfuzzer_seed_corpus.zip \
80    https://sourceforge.net/projects/libmwaw/files/corpus/docmkrfuzzer_seed_corpus.zip \
81    https://sourceforge.net/projects/libmwaw/files/corpus/edocfuzzer_seed_corpus.zip \
82    https://sourceforge.net/projects/libmwaw/files/corpus/fullwrtfuzzer_seed_corpus.zip \
83    https://sourceforge.net/projects/libmwaw/files/corpus/hanmacwrdfuzzer_seed_corpus.zip \
84    https://sourceforge.net/projects/libmwaw/files/corpus/lightwaytxtfuzzer_seed_corpus.zip \
85    https://sourceforge.net/projects/libmwaw/files/corpus/macdocfuzzer_seed_corpus.zip \
86    https://sourceforge.net/projects/libmwaw/files/corpus/macwrtfuzzer_seed_corpus.zip \
87    https://sourceforge.net/projects/libmwaw/files/corpus/marinerwrtfuzzer_seed_corpus.zip \
88    https://sourceforge.net/projects/libmwaw/files/corpus/maxwrtfuzzer_seed_corpus.zip \
89    https://sourceforge.net/projects/libmwaw/files/corpus/mindwrtfuzzer_seed_corpus.zip \
90    https://sourceforge.net/projects/libmwaw/files/corpus/morefuzzer_seed_corpus.zip \
91    https://sourceforge.net/projects/libmwaw/files/corpus/mousewrtfuzzer_seed_corpus.zip \
92    https://sourceforge.net/projects/libmwaw/files/corpus/nisuswrtfuzzer_seed_corpus.zip \
93    https://sourceforge.net/projects/libmwaw/files/corpus/ragtimefuzzer_seed_corpus.zip \
94    https://sourceforge.net/projects/libmwaw/files/corpus/stylefuzzer_seed_corpus.zip \
95    https://sourceforge.net/projects/libmwaw/files/corpus/teachtxtfuzzer_seed_corpus.zip \
96    https://sourceforge.net/projects/libmwaw/files/corpus/writenowfuzzer_seed_corpus.zip \
97    https://sourceforge.net/projects/libmwaw/files/corpus/writerplsfuzzer_seed_corpus.zip \
98    https://sourceforge.net/projects/libmwaw/files/corpus/zwrtfuzzer_seed_corpus.zip \
99    https://sourceforge.net/projects/libmwaw/files/corpus/multiplanfuzzer_seed_corpus.zip \
100    https://sourceforge.net/projects/libwps/files/corpus/mpfuzzer_seed_corpus.zip \
101    https://sourceforge.net/projects/libebook/files/corpus/fb2fuzzer_seed_corpus.zip \
102    -P $SRC
103# clone sources
104RUN git clone --depth 1 git://git.code.sf.net/p/libwpd/librevenge
105RUN git clone --depth 1 git://gerrit.libreoffice.org/libmspub
106RUN git clone --depth 1 git://gerrit.libreoffice.org/libcdr
107RUN git clone --depth 1 git://gerrit.libreoffice.org/libvisio
108RUN git clone --depth 1 git://gerrit.libreoffice.org/libzmf
109RUN git clone --depth 1 git://gerrit.libreoffice.org/libpagemaker
110RUN git clone --depth 1 git://gerrit.libreoffice.org/libfreehand
111RUN git clone --depth 1 git://git.code.sf.net/p/libwpd/code libwpd
112RUN git clone --depth 1 git://git.code.sf.net/p/libwpg/code libwpg
113RUN git clone --depth 1 https://github.com/fosnola/libstaroffice
114RUN git clone --depth 1 git://git.code.sf.net/p/libwps/code libwps
115RUN git clone --depth 1 git://git.code.sf.net/p/libmwaw/libmwaw
116RUN git clone --depth 1 git://git.code.sf.net/p/libebook/code libe-book
117RUN git clone --depth 1 git://gerrit.libreoffice.org/libabw
118RUN git clone --depth 1 git://gerrit.libreoffice.org/libetonyek
119RUN git clone --depth 1 git://gerrit.libreoffice.org/libqxp
120WORKDIR $SRC
121COPY build.sh *.options *.patch $SRC/
122