Skip to content

Commit

Permalink
[cryptofuzz, circl] Fix build (google#11959)
Browse files Browse the repository at this point in the history
  • Loading branch information
guidovranken authored May 17, 2024
1 parent 5221007 commit 59e17b5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 18 deletions.
3 changes: 0 additions & 3 deletions projects/circl/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,10 @@

FROM gcr.io/oss-fuzz-base/base-builder-go

ENV GO111MODULE off

RUN apt-get update && apt-get install -y make autoconf automake libtool wget python
RUN git clone --depth 1 https://github.com/guidovranken/cryptofuzz
RUN git clone --depth 1 https://github.com/randombit/botan.git
RUN git clone --depth 1 https://github.com/supranational/blst.git
RUN cd $SRC/cryptofuzz/modules/circl && go get ./... || true
RUN wget https://archives.boost.io/release/1.84.0/source/boost_1_84_0.tar.bz2
RUN wget https://storage.googleapis.com/pub/gsutil.tar.gz -O $SRC/gsutil.tar.gz
RUN tar zxf $SRC/gsutil.tar.gz
Expand Down
2 changes: 2 additions & 0 deletions projects/circl/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ cd $SRC/cryptofuzz/modules/blst/
make -j $(nproc)

cd $SRC/cryptofuzz/modules/circl/
go mod init cryptofuzz/circl
go mod tidy
make -j $(nproc)

cd $SRC/cryptofuzz/
Expand Down
1 change: 0 additions & 1 deletion projects/cryptofuzz/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ RUN apt-get update && \
RUN pip3 install 'pip>=20'

RUN wget https://go.dev/dl/go1.20.10.linux-amd64.tar.gz
RUN wget https://go.dev/dl/go1.21.3.linux-amd64.tar.gz
RUN wget https://go.dev/dl/go1.22.1.linux-amd64.tar.gz
RUN git clone --depth 1 https://github.com/golang/go go-dev
RUN git clone --depth 1 https://github.com/golang/crypto go-crypto
Expand Down
17 changes: 3 additions & 14 deletions projects/cryptofuzz/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,7 @@ mkdir -p $GOPATH_122/src/golang.org/x/crypto/
cp -R $SRC/go-crypto/* $GOPATH_122/src/golang.org/x/crypto/
mkdir -p $GOPATH_122/src/golang.org/x/sys/
cp -R $SRC/go-sys/* $GOPATH_122/src/golang.org/x/sys/
export PATH_GO_121=$GOROOT_122/bin:$GOROOT_122/packages/bin:$PATH

tar zxf $SRC/go1.21.3.linux-amd64.tar.gz
mv go/ go-121
export GOROOT_121=$SRC/go-bootstrap/go-121/
export GOPATH_121=$GOROOT_121/packages/
mkdir $GOPATH_121
mkdir -p $GOPATH_121/src/golang.org/x/crypto/
cp -R $SRC/go-crypto/* $GOPATH_121/src/golang.org/x/crypto/
mkdir -p $GOPATH_121/src/golang.org/x/sys/
cp -R $SRC/go-sys/* $GOPATH_121/src/golang.org/x/sys/
export PATH_GO_121=$GOROOT_121/bin:$GOROOT_121/packages/bin:$PATH
export PATH_GO_122=$GOROOT_122/bin:$GOROOT_122/packages/bin:$PATH

tar zxf $SRC/go1.20.10.linux-amd64.tar.gz
mv go/ go-120
Expand Down Expand Up @@ -449,9 +438,9 @@ then
autoreconf -ivf
if [[ $CFLAGS = *-m32* ]]
then
./configure --enable-static --disable-doc --host=i386
./configure --enable-static --disable-doc --disable-jent-support --host=i386
else
./configure --enable-static --disable-doc
./configure --enable-static --disable-doc --disable-jent-support
fi
make -j$(nproc)

Expand Down

0 comments on commit 59e17b5

Please sign in to comment.