Skip to content

Commit

Permalink
Avoid git cloning from the deb6 image (elastic#6459)
Browse files Browse the repository at this point in the history
It seems that by now Debian 6 is so old that `git clone` from Github
repositories no longer works. We only needed git clone from it to
get gotpl running, which is a relatively small program so I included it
and its dependency (go-yaml) as vendored files.

Tested `make package` locally.
  • Loading branch information
tsg authored and andrewkroh committed Feb 23, 2018
1 parent 0befa20 commit 07a2669
Show file tree
Hide file tree
Showing 23 changed files with 9,738 additions and 4 deletions.
2 changes: 2 additions & 0 deletions dev-tools/packer/docker/xgo-image-deb6/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
beats-builder/yaml.v2
beats-builder/gotpl
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@ RUN ./fetch.sh http://www.tcpdump.org/release/libpcap-1.8.1.tar.gz 32d7526dde8f8
./configure --enable-usb=no --enable-bluetooth=no --enable-dbus=no && \
make

# Old git version which does not support proxy with go get requires to fetch go-yaml directly
RUN git clone https://github.com/go-yaml/yaml.git /go/src/gopkg.in/yaml.v2
# Old git version which does not support proxy with go get directly, and git cloning
# from github also no longer works.
ADD yaml.v2 /go/src/gopkg.in/yaml.v2
ADD gotpl /go/src/github.com/tsg/gotpl

# Load gotpl which is needed for creating the templates.
RUN go get github.com/tsg/gotpl
RUN cd /go/src/github.com/tsg/gotpl && \
go install

# add patch for gopacket
ADD gopacket_pcap.patch /gopacket_pcap.patch
3 changes: 2 additions & 1 deletion dev-tools/packer/docker/xgo-image-deb6/build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/sh

cp -r ../../../vendor/gopkg.in/yaml.v2 beats-builder/yaml.v2
cp -r ../../../vendor/github.com/tsg/gotpl beats-builder/gotpl
docker build --rm=true -t tudorg/xgo-deb6-base base/ && \
docker build --rm=true -t tudorg/xgo-deb6-1.9.4 go-1.9.4/ &&
docker build --rm=true -t tudorg/beats-builder-deb6 beats-builder
11 changes: 11 additions & 0 deletions dev-tools/vendor/github.com/tsg/gotpl/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions dev-tools/vendor/github.com/tsg/gotpl/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 48 additions & 0 deletions dev-tools/vendor/github.com/tsg/gotpl/tpl.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

201 changes: 201 additions & 0 deletions dev-tools/vendor/gopkg.in/yaml.v2/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 31 additions & 0 deletions dev-tools/vendor/gopkg.in/yaml.v2/LICENSE.libyaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 07a2669

Please sign in to comment.