diff --git a/.dockerignore b/.dockerignore
deleted file mode 100644
index b1a133833..000000000
--- a/.dockerignore
+++ /dev/null
@@ -1,2 +0,0 @@
-xhyve/
-alpine/packages
diff --git a/.gitignore b/.gitignore
index c7ec943dd..d4b066b0a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
test.log
+*.swp
diff --git a/Dockerfile.media b/Dockerfile.media
new file mode 100644
index 000000000..fa1de01b0
--- /dev/null
+++ b/Dockerfile.media
@@ -0,0 +1,9 @@
+FROM scratch
+
+ADD \
+ alpine/initrd.img \
+ alpine/kernel/x86_64/vmlinuz64 \
+ alpine/mobylinux-bios.iso \
+ alpine/mobylinux-efi.iso \
+ alpine/mobylinux.efi \
+ /
diff --git a/Dockerfile.qemu b/Dockerfile.qemu
index 20fca7c0e..2f6753140 100644
--- a/Dockerfile.qemu
+++ b/Dockerfile.qemu
@@ -1,8 +1,8 @@
-FROM justincormack/alpine-qemu
+FROM mobylinux/alpine-qemu:1f3de121e9dea39a198413344a72049839bea91b
-COPY alpine/initrd.img.gz .
+COPY alpine/initrd.img .
COPY alpine/kernel/x86_64/vmlinuz64 .
RUN qemu-img create -f raw disk.img 100M
-ENTRYPOINT [ "qemu-system-x86_64", "-drive", "file=disk.img,format=raw", "-device", "virtio-rng-pci", "-serial", "stdio", "-kernel", "vmlinuz64", "-initrd", "initrd.img.gz", "-m", "2048", "-append", "earlyprintk=serial console=ttyS0 noapic", "-vnc", "none" ]
+ENTRYPOINT [ "qemu-system-x86_64", "-drive", "file=disk.img,format=raw", "-device", "virtio-rng-pci", "-serial", "stdio", "-kernel", "vmlinuz64", "-initrd", "initrd.img", "-m", "2048", "-append", "earlyprintk=serial console=ttyS0 noapic", "-vnc", "none" ]
diff --git a/Dockerfile.qemu.armhf b/Dockerfile.qemu.armhf
deleted file mode 100644
index 25ef995e1..000000000
--- a/Dockerfile.qemu.armhf
+++ /dev/null
@@ -1,9 +0,0 @@
-FROM justincormack/alpine-qemu
-
-COPY alpine/initrd-arm.img .
-COPY alpine/kernel/arm/zImage .
-COPY alpine/kernel/dtb dtb
-
-RUN gzip -9 initrd-arm.img
-
-ENTRYPOINT [ "qemu-system-arm", "-machine", "vexpress-a15", "-cpu", "cortex-a15", "-no-reboot", "-netdev", "user,id=eth0", "-device", "virtio-net-device,netdev=eth0", "-serial", "stdio", "-kernel", "zImage", "-initrd", "initrd-arm.img.gz", "-dtb", "dtb/vexpress-v2p-ca15-tc1.dtb", "-m", "1024", "-append", "console=ttyAMA0,38400n8", "-vnc", "none" ]
diff --git a/Dockerfile.qemuiso b/Dockerfile.qemuiso
index 8ff221216..042612597 100644
--- a/Dockerfile.qemuiso
+++ b/Dockerfile.qemuiso
@@ -1,4 +1,4 @@
-FROM justincormack/alpine-qemu
+FROM mobylinux/alpine-qemu:1f3de121e9dea39a198413344a72049839bea91b
COPY alpine/mobylinux-bios.iso .
diff --git a/Dockerfile.test b/Dockerfile.test
index 62d7effe6..a3e325cf8 100644
--- a/Dockerfile.test
+++ b/Dockerfile.test
@@ -1,8 +1,8 @@
-FROM justincormack/alpine-qemu
+FROM mobylinux/alpine-qemu:1f3de121e9dea39a198413344a72049839bea91b
-COPY alpine/initrd.img.gz .
+COPY alpine/initrd.img .
COPY alpine/kernel/x86_64/vmlinuz64 .
RUN qemu-img create -f raw disk.img 100M
-ENTRYPOINT [ "qemu-system-x86_64", "-drive", "file=disk.img,format=raw", "-device", "virtio-rng-pci", "-serial", "stdio", "-kernel", "vmlinuz64", "-initrd", "initrd.img.gz", "-m", "1024", "-append", "earlyprintk=serial console=ttyS0 noapic mobyplatform=test", "-vnc", "none" ]
+ENTRYPOINT [ "qemu-system-x86_64", "-drive", "file=disk.img,format=raw", "-device", "virtio-rng-pci", "-serial", "stdio", "-kernel", "vmlinuz64", "-initrd", "initrd.img", "-m", "1024", "-append", "earlyprintk=serial console=ttyS0 noapic mobyplatform=test", "-vnc", "none" ]
diff --git a/Makefile b/Makefile
index 9114c5b9b..af677c038 100644
--- a/Makefile
+++ b/Makefile
@@ -1,36 +1,49 @@
+DOCKER_EXPERIMENTAL?=1
+
all:
- $(MAKE) -C alpine/kernel
$(MAKE) -C alpine
-qemu: all
- tar cf - Dockerfile.qemu alpine/initrd.img.gz alpine/kernel/x86_64/vmlinuz64 | \
- docker build -f Dockerfile.qemu -t mobyqemu:build -
+alpine/initrd.img:
+ $(MAKE) -C alpine initrd.img
+
+alpine/kernel/x86_64/vmlinuz64:
+ $(MAKE) -C alpine/kernel x86_64/vmlinuz64
+
+alpine/mobylinux-bios.iso:
+ $(MAKE) -C alpine mobylinux-bios.iso
+
+qemu: Dockerfile.qemu alpine/initrd.img alpine/kernel/x86_64/vmlinuz64
+ tar cf - $^ | docker build -f Dockerfile.qemu -t mobyqemu:build -
docker run -it --rm mobyqemu:build
-qemu-iso: all
- $(MAKE) -C alpine mobylinux-bios.iso
- docker build -f Dockerfile.qemuiso -t mobyqemuiso:build .
+qemu-iso: Dockerfile.qemuiso alpine/mobylinux-bios.iso
+ tar cf - $^ | docker build -f Dockerfile.qemuiso -t mobyqemuiso:build -
docker run -it --rm mobyqemuiso:build
-arm:
- $(MAKE) -C alpine/kernel arm
- $(MAKE) -C alpine arm
-
-qemu-arm: Dockerfile.qemu.armhf arm
- docker build -f Dockerfile.qemu.armhf -t mobyarmqemu:build .
- docker run -it --rm mobyarmqemu:build
-
-test: Dockerfile.test all
- tar cf - Dockerfile.test alpine/initrd.img.gz alpine/kernel/x86_64/vmlinuz64 | \
- docker build -f Dockerfile.test -t mobytest:build -
+test: Dockerfile.test alpine/initrd.img alpine/kernel/x86_64/vmlinuz64
+ $(MAKE) -C alpine
+ tar cf - $^ | docker build -f Dockerfile.test -t mobytest:build -
touch test.log
docker run --rm mobytest:build 2>&1 | tee -a test.log &
tail -f test.log 2>/dev/null | grep -m 1 -q 'Moby test suite '
cat test.log | grep -q 'Moby test suite PASSED'
+TAG=$(shell git rev-parse HEAD)
+STATUS=$(shell git status -s)
+ifeq ($(DOCKER_EXPERIMENTAL),1)
+MEDIA_PREFIX?=experimental-
+endif
+media: Dockerfile.media alpine/initrd.img alpine/kernel/x86_64/vmlinuz64 alpine/mobylinux-bios.iso alpine/mobylinux-efi.iso
+ifeq ($(STATUS),)
+ tar cf - $^ alpine/mobylinux.efi | docker build -f Dockerfile.media -t mobylinux/media:$(MEDIA_PREFIX)latest -
+ docker tag mobylinux/media:$(EXP_PREFIX)latest mobylinux/media:$(MEDIA_PREFIX)$(TAG)
+ docker push mobylinux/media:$(MEDIA_PREFIX)$(TAG)
+ docker push mobylinux/media:$(MEDIA_PREFIX)latest
+else
+ $(error "git not clean")
+endif
+
.PHONY: clean
clean:
$(MAKE) -C alpine clean
- docker images -q mobyqemu:build | xargs docker rmi -f || true
- docker images -q mobytest:build | xargs docker rmi -f || true
diff --git a/README.md b/README.md
index 6f6688cb2..1e2e69418 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,5 @@
-Base repo for Moby, codename for the Docker Linux distro
-
-Initial requirements are being driven by the very minimal goal of replacing boot2docker for the new Mac app.
-
-However these requirements are fairly small and the scope is intended to be much broader.
+Moby, the Alpine Linux distro for Docker editions
Simple build instructions: use `make` to build. `make qemu` will boot up in qemu in a container.
-You can build for arm, some parts still under development, `make clean` first, then `make qemu-arm` will run in qemu.
+Requires GNU `make`, GNU `tar` (not Busybox tar), Docker to build.
diff --git a/alpine/.dockerignore b/alpine/.dockerignore
deleted file mode 100644
index fdb1349b5..000000000
--- a/alpine/.dockerignore
+++ /dev/null
@@ -1 +0,0 @@
-packages/docker/docker.git
diff --git a/alpine/Dockerfile b/alpine/Dockerfile
index f120e33f8..f17366632 100644
--- a/alpine/Dockerfile
+++ b/alpine/Dockerfile
@@ -1,58 +1,15 @@
-FROM mobylinux/alpine-base:77722e15bd14c8de88e2d2a8235bac75ee6187b3
+FROM mobylinux/alpine-base:5ee3744f0fbcdd3e9c6216322e1d023e4cdf9ee4
ENV ARCH=x86_64
RUN \
addgroup -g 50 docker && \
adduser -G docker -u 1001 -s /bin/sh -D -g "Docker" docker && \
- passwd -d root
+ passwd -d root && \
+ adduser -D -H -s /sbin/nologin dockremap
-COPY etc /etc/
-RUN mkdir -p /etc/docker
-
-ADD kernel/$ARCH/aufs-utils.tar /
-COPY mkinitrd.sh /bin/
-COPY kernel/$ARCH/kernel-source-info /etc/
-ADD kernel/$ARCH/kernel-patches.tar /etc/kernel-patches
-ADD kernel/$ARCH/kernel-modules.tar /
-
-COPY packages/proxy/slirp-proxy /usr/bin/
-COPY packages/proxy/slirp-proxy /sbin/proxy-vsockd
-COPY packages/proxy/etc /etc/
-COPY packages/transfused/transfused /sbin/
-COPY packages/transfused/etc /etc/
-COPY packages/tap-vsockd/tap-vsockd /sbin/
-COPY packages/tap-vsockd/etc /etc/
-COPY packages/docker/bin/* /usr/bin/
-COPY packages/docker/etc /etc/
-COPY packages/diagnostics/diagnostics /usr/bin/
-COPY packages/diagnostics/diagnostics-server /usr/bin/
-COPY packages/diagnostics/etc /etc/
-COPY packages/automount/etc /etc/
-COPY packages/binfmt_misc/etc /etc/
-COPY packages/hostsettings/etc /etc/
-COPY packages/hvtools/hv_kvp_daemon /sbin/
-COPY packages/hvtools/hv_vss_daemon /sbin/
-COPY packages/hvtools/etc /etc/
-COPY packages/hvtools/hv_get_dhcp_info /sbin/
-COPY packages/hvtools/hv_get_dns_info /sbin/
-COPY packages/hvtools/hv_set_ifconfig /sbin/
-COPY packages/hvtools/hvtools.tar.gz /usr/share/src/
-COPY packages/chronyd/etc /etc/
-COPY packages/userns/etc /etc/
-#COPY packages/nc-vsock/nc-vsock /usr/bin/
-COPY packages/vsudd/vsudd /sbin/
-COPY packages/vsudd/etc /etc/
-COPY packages/mobyconfig/mobyconfig /usr/bin/
-COPY packages/mobyplatform/mobyplatform /usr/bin/
-COPY packages/oom/etc /etc/
-COPY packages/9pmount-vsock/9pmount-vsock /sbin/
-COPY packages/test/etc /etc/
-COPY packages/test/mobytest /usr/bin/
-COPY packages/iptables/iptables /usr/local/sbin/
-COPY packages/containerd/etc /etc/
-COPY packages/aws/etc /etc/
-COPY packages/azure/etc /etc/
+COPY . .
+RUN rm Dockerfile
RUN \
rc-update add swap boot && \
@@ -94,14 +51,4 @@ RUN \
rc-update add azure default && \
true
-COPY init /
-
-RUN adduser -D -H -s /sbin/nologin dockremap
-
-RUN cd /usr/bin && \
- ln -s docker-runc runc && \
- ln -s docker-containerd-shim containerd-shim && \
- ln -s docker-containerd-ctr containerd-ctr && \
- ln -s docker-containerd containerd
-
-CMD ["/bin/sh"]
+CMD ["/mkinitrd.sh"]
diff --git a/alpine/Dockerfile.bios b/alpine/Dockerfile.bios
index 5ab3087cb..7a78d7361 100644
--- a/alpine/Dockerfile.bios
+++ b/alpine/Dockerfile.bios
@@ -1,20 +1,16 @@
# Create a legacy BIOS bootable ISO
-FROM alpine:3.4
+FROM mobylinux/alpine-bios:626757290dbb54109514af22108645cae9ea40c3
-RUN apk update && apk add \
- cdrkit \
- syslinux
+WORKDIR /tmp/iso
-RUN mkdir -p /tmp/iso/isolinux && \
- cp /usr/share/syslinux/isolinux.bin /tmp/iso/isolinux && \
- cp /usr/share/syslinux/ldlinux.c32 /tmp/iso/isolinux
+COPY initrd.img ./
+COPY kernel/x86_64/vmlinuz64 ./
+COPY isolinux.cfg ./isolinux/
-COPY initrd.img /tmp/iso
-COPY kernel/x86_64/vmlinuz64 /tmp/iso
-COPY isolinux.cfg /tmp/iso/isolinux
+RUN cp /usr/share/syslinux/isolinux.bin ./isolinux/ && \
+ cp /usr/share/syslinux/ldlinux.c32 ./isolinux/
-RUN cd /tmp/iso && \
- genisoimage -o ../mobylinux-bios.iso -l -J -R \
+RUN genisoimage -o ../mobylinux-bios.iso -l -J -R \
-c isolinux/boot.cat \
-b isolinux/isolinux.bin \
-no-emul-boot -boot-load-size 4 -boot-info-table \
diff --git a/alpine/Dockerfile.efi b/alpine/Dockerfile.efi
index b455880d6..92d7ba8e5 100644
--- a/alpine/Dockerfile.efi
+++ b/alpine/Dockerfile.efi
@@ -1,36 +1,29 @@
# Create a EFI Bootable ISO
-FROM alpine:3.4
+FROM mobylinux/alpine-efi:2f8c8e9ecc4bfefaf1b5ca56bac5506baba301f2
-ENV ARCH=x86_64
+WORKDIR /tmp/efi
-RUN apk add --no-cache binutils mtools xorriso gummiboot
-
-RUN mkdir -p /tmp/efi
-
-COPY initrd.img.gz /tmp/efi
-COPY kernel/$ARCH/vmlinuz64 /tmp/efi
+COPY initrd.img ./
+COPY kernel/x86_64/vmlinuz64 ./
# Create a EFI boot file with kernel and initrd. From:
# https://github.com/haraldh/mkrescue-uefi/blob/master/mkrescue-uefi.sh
-RUN cd /tmp/efi && \
- cp /usr/lib/gummiboot/linuxx64.efi.stub . && \
+RUN cp /usr/lib/gummiboot/linuxx64.efi.stub . && \
echo "earlyprintk=serial console=ttyS0 mobyplatform=windows" > cmdline.txt && \
objcopy \
--add-section .osrel=/etc/os-release --change-section-vma .osrel=0x20000 \
--add-section .cmdline=./cmdline.txt --change-section-vma .cmdline=0x30000 \
--add-section .linux=./vmlinuz64 --change-section-vma .linux=0x40000 \
- --add-section .initrd=initrd.img.gz --change-section-vma .initrd=0x3000000 \
+ --add-section .initrd=initrd.img --change-section-vma .initrd=0x3000000 \
./linuxx64.efi.stub \
mobylinux.efi
# create a ISO with a EFI boot partition
-RUN cd /tmp/efi && \
- mkdir -p iso && \
+RUN mkdir -p iso && \
dd if=/dev/zero of=iso/efi.raw bs=1024 count=70000 && \
mkfs.vfat iso/efi.raw
-RUN cd /tmp/efi && \
- echo "mtools_skip_check=1" >> /etc/mtools.conf && \
+RUN echo "mtools_skip_check=1" >> /etc/mtools.conf && \
mmd -i iso/efi.raw ::/EFI && \
mmd -i iso/efi.raw ::/EFI/BOOT && \
mcopy -i iso/efi.raw mobylinux.efi ::/EFI/BOOT/BOOTX64.EFI && \
diff --git a/alpine/Makefile b/alpine/Makefile
index 1a10603a4..599d47836 100644
--- a/alpine/Makefile
+++ b/alpine/Makefile
@@ -1,54 +1,50 @@
-all: initrd.img.gz mobylinux-efi.iso
+all: initrd.img mobylinux-efi.iso mobylinux-bios.iso
ETCFILES=etc/issue etc/motd etc/network/interfaces
ETCFILES+=etc/inittab etc/fstab
-initrd.img: Dockerfile mkinitrd.sh init $(ETCFILES)
- rm -f initrd.img
- $(MAKE) -C packages
- $(MAKE) -C kernel
- docker build -t moby-initrd:build .
- docker run --net=none --rm moby-initrd:build /bin/mkinitrd.sh > $@
+initrd.img: Dockerfile mkinitrd.sh init $(ETCFILES) common
+ tar cf - \
+ Dockerfile etc init mkinitrd.sh \
+ -C kernel usr etc sbin lib -C .. \
+ -C packages/proxy usr sbin etc -C ../.. \
+ -C packages/transfused sbin etc -C ../.. \
+ -C packages/tap-vsockd sbin etc -C ../.. \
+ -C packages/docker usr etc -C ../.. \
+ -C packages/diagnostics usr etc -C ../.. \
+ -C packages/automount etc -C ../.. \
+ -C packages/binfmt_misc etc -C ../.. \
+ -C packages/hostsettings etc -C ../.. \
+ -C packages/hvtools sbin etc usr -C ../.. \
+ -C packages/chronyd etc -C ../.. \
+ -C packages/userns etc -C ../.. \
+ -C packages/nc-vsock usr -C ../.. \
+ -C packages/vsudd sbin etc -C ../.. \
+ -C packages/mobyconfig usr -C ../.. \
+ -C packages/mobyplatform usr -C ../.. \
+ -C packages/oom etc -C ../.. \
+ -C packages/9pmount-vsock sbin -C ../.. \
+ -C packages/test etc usr -C ../.. \
+ -C packages/iptables usr -C ../.. \
+ -C packages/containerd etc -C ../.. \
+ -C packages/aws etc -C ../.. \
+ -C packages/azure etc -C ../.. \
+ | \
+ docker build -t moby-initrd:build -
+ docker run --net=none --rm moby-initrd:build > $@
-initrd.img.gz: initrd.img
- cat initrd.img | gzip -9 > initrd.img.gz
-
-mobylinux-efi.iso: initrd.img.gz Dockerfile.efi
- docker build -t moby-efi:build -f Dockerfile.efi .
+mobylinux-efi.iso: Dockerfile.efi initrd.img kernel/x86_64/vmlinuz64
+ tar cf - $^ | docker build -t moby-efi:build -f Dockerfile.efi -
docker run --net=none --rm --cap-add sys_admin moby-efi:build cat /tmp/efi/mobylinux.efi > mobylinux.efi
docker run --net=none --rm --cap-add sys_admin moby-efi:build cat /tmp/efi/mobylinux-efi.iso > $@
-mobylinux-bios.iso: initrd.img Dockerfile.bios isolinux.cfg
- docker build -t moby-bios:build -f Dockerfile.bios .
+mobylinux-bios.iso: Dockerfile.bios initrd.img kernel/x86_64/vmlinuz64 isolinux.cfg
+ tar cf - $^ | docker build -t moby-bios:build -f Dockerfile.bios -
docker run --net=none --rm moby-bios:build cat /tmp/mobylinux-bios.iso > $@
-arm: initrd-arm.img
-
-Dockerfile.armhf: Dockerfile
- cat Dockerfile | \
- sed 's@FROM alpine@FROM justincormack/armhf-alpine@' | \
- sed '/hv_/d' | \
- sed '/hvtools/d' | \
- sed 's/syslinux//' | \
- sed '/proxy/d' | \
- sed '/diagnostics/d' | \
- sed '/nc-vsock/d' | \
- sed '/vsudd/d' | \
- sed '/gummiboot/d' | \
- grep -v 'tap-vsockd' | \
- grep -v '9pmount-vsock' | \
- grep -v 'rc-update add binfmt_misc sysinit' > $@
-
-initrd-arm.img: Dockerfile.armhf
- rm -f initrd-arm.img
- $(MAKE) -C packages arm
- $(MAKE) -C kernel arm
- docker build -t moby-arm:build -f Dockerfile.armhf .
- docker run --net=none --rm moby-arm:build /bin/mkinitrd.sh > $@
-
common: initrd.img
$(MAKE) -C kernel
- $(MAKE) -C packages
+ $(MAKE) -j -C packages
ami: common
docker-compose build ami
@@ -63,11 +59,7 @@ azure: common
docker-compose run --rm -T azure uploadvhd
clean:
- rm -f initrd.img initrd.img.gz initrd-arm.img Dockerfile.armhf mobylinux.vhd mobylinux.img
- rm -f mobylinux-bios.iso mobylinux-efi.iso mobylinux.efi
- docker images -q moby-efi:build | xargs docker rmi -f || true
- docker images -q moby-bios:build | xargs docker rmi -f || true
- docker images -q moby-arm:build | xargs docker rmi -f || true
+ rm -f initrd.img mobylinux.vhd mobylinux.img mobylinux-bios.iso mobylinux-efi.iso mobylinux.efi
docker images -q alpine_ami:latest | xargs docker rmi -f || true
docker images -q alpine_azure:latest | xargs docker rmi -f || true
$(MAKE) -C packages clean
diff --git a/alpine/base/alpine-base/Dockerfile b/alpine/base/alpine-base/Dockerfile
index bfeaed050..ba0a16479 100644
--- a/alpine/base/alpine-base/Dockerfile
+++ b/alpine/base/alpine-base/Dockerfile
@@ -3,24 +3,26 @@ FROM alpine:3.4
RUN \
apk update && apk upgrade && \
apk add \
- e2fsprogs \
- chrony \
- git \
- xz \
- iptables \
- sfdisk \
- lvm2 \
- syslinux \
- openrc \
- busybox-initscripts \
alpine-conf \
bind-tools \
- openssh-client \
- strace \
- fuse \
+ busybox-initscripts \
+ chrony \
cifs-utils \
+ e2fsprogs \
e2fsprogs-extra \
- openssl \
+ fuse \
+ git \
+ iptables \
jq \
+ lvm2 \
+ make \
+ openrc \
+ openssh-client \
+ openssl \
+ sfdisk \
+ strace \
sysklogd \
+ syslinux \
+ tar \
+ xz \
&& rm -rf /var/cache/apk/*
diff --git a/alpine/base/alpine-bios/Dockerfile b/alpine/base/alpine-bios/Dockerfile
new file mode 100644
index 000000000..24c74721a
--- /dev/null
+++ b/alpine/base/alpine-bios/Dockerfile
@@ -0,0 +1,8 @@
+FROM alpine:3.4
+
+RUN \
+ apk update && apk upgrade && \
+ apk add \
+ cdrkit \
+ syslinux \
+ && rm -rf /var/cache/apk/*
diff --git a/alpine/base/alpine-bios/Makefile b/alpine/base/alpine-bios/Makefile
new file mode 100644
index 000000000..bc229e62b
--- /dev/null
+++ b/alpine/base/alpine-bios/Makefile
@@ -0,0 +1,32 @@
+.PHONY: tag push
+
+BASE=alpine:3.4
+IMAGE=alpine-bios
+
+default: push
+
+hash:
+ docker pull $(BASE)
+ tar cf - Dockerfile | docker build --no-cache -t $(IMAGE):build -
+ docker run --rm $(IMAGE):build sha1sum /lib/apk/db/installed | sed 's/ .*//' > hash
+
+push: hash
+ docker pull mobylinux/$(IMAGE):$(shell cat hash) || \
+ (docker tag $(IMAGE):build mobylinux/$(IMAGE):latest && \
+ docker tag $(IMAGE):build mobylinux/$(IMAGE):$(shell cat hash) && \
+ docker push mobylinux/$(IMAGE):$(shell cat hash) && \
+ docker push mobylinux/$(IMAGE):latest)
+ docker rmi $(IMAGE):build
+ rm -f hash
+
+tag: hash
+ docker pull mobylinux/$(IMAGE):$(shell cat hash) || \
+ (docker tag $(IMAGE):build mobylinux/$(IMAGE):latest && \
+ docker tag $(IMAGE):build mobylinux/$(IMAGE):$(shell cat hash))
+ docker rmi $(IMAGE):build
+ rm -f hash
+
+clean:
+ rm -f hash
+
+.DELETE_ON_ERROR:
diff --git a/alpine/base/alpine-efi/Dockerfile b/alpine/base/alpine-efi/Dockerfile
new file mode 100644
index 000000000..db73bbf25
--- /dev/null
+++ b/alpine/base/alpine-efi/Dockerfile
@@ -0,0 +1,10 @@
+FROM alpine:3.4
+
+RUN \
+ apk update && apk upgrade && \
+ apk add \
+ binutils \
+ mtools \
+ xorriso \
+ gummiboot \
+ && rm -rf /var/cache/apk/*
diff --git a/alpine/base/alpine-efi/Makefile b/alpine/base/alpine-efi/Makefile
new file mode 100644
index 000000000..969296238
--- /dev/null
+++ b/alpine/base/alpine-efi/Makefile
@@ -0,0 +1,32 @@
+.PHONY: tag push
+
+BASE=alpine:3.4
+IMAGE=alpine-efi
+
+default: push
+
+hash:
+ docker pull $(BASE)
+ tar cf - Dockerfile | docker build --no-cache -t $(IMAGE):build -
+ docker run --rm $(IMAGE):build sha1sum /lib/apk/db/installed | sed 's/ .*//' > hash
+
+push: hash
+ docker pull mobylinux/$(IMAGE):$(shell cat hash) || \
+ (docker tag $(IMAGE):build mobylinux/$(IMAGE):latest && \
+ docker tag $(IMAGE):build mobylinux/$(IMAGE):$(shell cat hash) && \
+ docker push mobylinux/$(IMAGE):$(shell cat hash) && \
+ docker push mobylinux/$(IMAGE):latest)
+ docker rmi $(IMAGE):build
+ rm -f hash
+
+tag: hash
+ docker pull mobylinux/$(IMAGE):$(shell cat hash) || \
+ (docker tag $(IMAGE):build mobylinux/$(IMAGE):latest && \
+ docker tag $(IMAGE):build mobylinux/$(IMAGE):$(shell cat hash))
+ docker rmi $(IMAGE):build
+ rm -f hash
+
+clean:
+ rm -f hash
+
+.DELETE_ON_ERROR:
diff --git a/alpine/base/alpine-qemu/Dockerfile b/alpine/base/alpine-qemu/Dockerfile
new file mode 100644
index 000000000..3c15db068
--- /dev/null
+++ b/alpine/base/alpine-qemu/Dockerfile
@@ -0,0 +1,9 @@
+FROM alpine:3.4
+
+RUN \
+ apk update && apk upgrade && \
+ apk add \
+ qemu-img \
+ qemu-system-arm \
+ qemu-system-x86_64 \
+ && rm -rf /var/cache/apk/*
diff --git a/alpine/base/alpine-qemu/Makefile b/alpine/base/alpine-qemu/Makefile
new file mode 100644
index 000000000..fd9a07309
--- /dev/null
+++ b/alpine/base/alpine-qemu/Makefile
@@ -0,0 +1,32 @@
+.PHONY: tag push
+
+BASE=alpine:3.4
+IMAGE=alpine-qemu
+
+default: push
+
+hash:
+ docker pull $(BASE)
+ tar cf - Dockerfile | docker build --no-cache -t $(IMAGE):build -
+ docker run --rm $(IMAGE):build sha1sum /lib/apk/db/installed | sed 's/ .*//' > hash
+
+push: hash
+ docker pull mobylinux/$(IMAGE):$(shell cat hash) || \
+ (docker tag $(IMAGE):build mobylinux/$(IMAGE):latest && \
+ docker tag $(IMAGE):build mobylinux/$(IMAGE):$(shell cat hash) && \
+ docker push mobylinux/$(IMAGE):$(shell cat hash) && \
+ docker push mobylinux/$(IMAGE):latest)
+ docker rmi $(IMAGE):build
+ rm -f hash
+
+tag: hash
+ docker pull mobylinux/$(IMAGE):$(shell cat hash) || \
+ (docker tag $(IMAGE):build mobylinux/$(IMAGE):latest && \
+ docker tag $(IMAGE):build mobylinux/$(IMAGE):$(shell cat hash))
+ docker rmi $(IMAGE):build
+ rm -f hash
+
+clean:
+ rm -f hash
+
+.DELETE_ON_ERROR:
diff --git a/alpine/base/debian-build-kernel/Dockerfile b/alpine/base/debian-build-kernel/Dockerfile
new file mode 100644
index 000000000..3ea659a18
--- /dev/null
+++ b/alpine/base/debian-build-kernel/Dockerfile
@@ -0,0 +1,24 @@
+FROM debian:jessie
+
+RUN apt-get update && apt-get -y upgrade && apt-get -y install \
+ unzip \
+ xz-utils \
+ curl \
+ bc \
+ build-essential \
+ cpio \
+ gcc libc6 libc6-dev \
+ kmod \
+ squashfs-tools \
+ genisoimage \
+ xorriso \
+ syslinux \
+ isolinux \
+ automake \
+ pkg-config \
+ git \
+ ncurses-dev \
+ p7zip-full \
+ lzop \
+ wget \
+ vim
diff --git a/alpine/base/debian-build-kernel/Makefile b/alpine/base/debian-build-kernel/Makefile
new file mode 100644
index 000000000..60428abf0
--- /dev/null
+++ b/alpine/base/debian-build-kernel/Makefile
@@ -0,0 +1,14 @@
+# no easy hashing scheme for Debian, will switch to Alpine soon so temporarily use sha256
+.PHONY: push
+
+BASE=debian:jessie
+IMAGE=debian-build-kernel
+
+TAG := $(shell cat /dev/urandom | od -N6 -t x2 | head -n1 | cut -b9- | sed 's/ //g')
+
+push:
+ docker pull $(BASE)
+ tar cf - Dockerfile | docker build --no-cache -t mobylinux/$(IMAGE):$(TAG) -
+ docker tag mobylinux/$(IMAGE):$(TAG) mobylinux/$(IMAGE):latest
+ docker push mobylinux/$(IMAGE):$(TAG)
+ docker push mobylinux/$(IMAGE):latest
diff --git a/alpine/kernel/.gitignore b/alpine/kernel/.gitignore
index a4129c97c..fea831687 100644
--- a/alpine/kernel/.gitignore
+++ b/alpine/kernel/.gitignore
@@ -1,2 +1,5 @@
-x86_64
-arm
+x86_64/
+etc/
+lib/
+usr/
+sbin/
diff --git a/alpine/kernel/Dockerfile b/alpine/kernel/Dockerfile
index 944d8ec04..5b0ba0064 100644
--- a/alpine/kernel/Dockerfile
+++ b/alpine/kernel/Dockerfile
@@ -1,33 +1,10 @@
-FROM ubuntu:16.04
+FROM mobylinux/debian-build-kernel:a009a11bf0ad
ARG KERNEL_VERSION=4.4.20
ARG DEBUG=0
ENV KERNEL_SOURCE=https://www.kernel.org/pub/linux/kernel/v4.x/linux-${KERNEL_VERSION}.tar.xz
-RUN apt-get update && apt-get -y upgrade && apt-get -y install \
- unzip \
- xz-utils \
- curl \
- bc \
- build-essential \
- cpio \
- gcc libc6 libc6-dev \
- kmod \
- squashfs-tools \
- genisoimage \
- xorriso \
- syslinux \
- isolinux \
- automake \
- pkg-config \
- git \
- ncurses-dev \
- p7zip-full \
- lzop \
- wget \
- vim
-
RUN curl -sSL -o linux-${KERNEL_VERSION}.tar.xz ${KERNEL_SOURCE}
RUN cat linux-${KERNEL_VERSION}.tar.xz | tar --absolute-names -xJ && mv /linux-${KERNEL_VERSION} /linux
@@ -37,11 +14,13 @@ ENV AUFS_REPO https://github.com/sfjro/aufs4-standalone
ENV AUFS_BRANCH aufs4.4
ENV AUFS_COMMIT 8be74e42b108f9cbbb0d59a87468505a48ff2757
-# Download AUFS and patch kernel
+# Download AUFS
RUN git clone -b "$AUFS_BRANCH" "$AUFS_REPO" /aufs && \
cd /aufs && \
- git checkout -q "$AUFS_COMMIT" && \
- cd /linux && \
+ git checkout -q "$AUFS_COMMIT"
+
+# patch kernel with aufs
+RUN cd /linux && \
cp -r /aufs/Documentation /linux && \
cp -r /aufs/fs /linux && \
cp -r /aufs/include/uapi/linux/aufs_type.h /linux/include/uapi/linux/ && \
@@ -66,13 +45,10 @@ RUN if [ $DEBUG -ne "0" ]; then \
# Apply local patches
COPY patches /patches
RUN cd /linux && \
- mkdir /etc/kernel-patches && \
set -e && for patch in /patches/*.patch; do \
echo "Applying $patch"; \
- cp "$patch" /etc/kernel-patches; \
patch -p1 < "$patch"; \
- done && \
- cd /etc/kernel-patches && tar cf /kernel-patches.tar .
+ done
RUN jobs=$(nproc); \
cd /linux && \
diff --git a/alpine/kernel/Makefile b/alpine/kernel/Makefile
index 739db4e2b..1bf53e271 100644
--- a/alpine/kernel/Makefile
+++ b/alpine/kernel/Makefile
@@ -8,21 +8,17 @@ $(ARCH)/mobykernel-build: Dockerfile kernel_config
docker build --build-arg DEBUG=$(DEBUG) -t mobykernel:build .
touch $@
-$(ARCH)/aufs-utils.tar $(ARCH)/kernel-source-info $(ARCH)/kernel-patches.tar $(ARCH)/kernel-modules.tar: $(ARCH)/mobykernel-build
- docker run --rm mobykernel:build cat /$(notdir $@) > $@ || ! rm $@
-
-$(ARCH)/bzImage $(ARCH)/zImage: $(ARCH)/aufs-utils.tar $(ARCH)/kernel-source-info $(ARCH)/kernel-patches.tar $(ARCH)/kernel-modules.tar $(ARCH)/mobykernel-build
+$(ARCH)/bzImage: $(ARCH)/mobykernel-build
docker run --rm mobykernel:build cat /linux/arch/$(ARCH)/boot/$(notdir $@) > $@ || ! rm $@
-
-$(ARCH)/vmlinux: $(ARCH)/bzImage
- docker run --rm mobykernel:build cat /linux/vmlinux > $@ || ! rm $@
+ docker run --rm --net=none mobykernel:build cat /kernel-modules.tar | tar xf -
+ docker run --rm mobykernel:build cat /aufs-utils.tar | tar xf -
+ docker run --rm mobykernel:build cat /kernel-source-info > etc/kernel-source-info
+ mkdir -p etc
+ cp -a patches etc/kernel-patches
$(ARCH)/vmlinuz64: $(ARCH)/bzImage
cp $< $@
-clean-arch:
- rm -rf $(ARCH)
- docker images -q mobykernel:build | xargs docker rmi -f || true
-
clean:
- $(MAKE) clean-arch ARCH=x86_64
+ rm -rf $(ARCH) lib etc usr sbin
+ docker images -q mobykernel:build | xargs docker rmi -f || true
diff --git a/alpine/mkinitrd.sh b/alpine/mkinitrd.sh
index bb23c3b0d..0bf4a43fd 100755
--- a/alpine/mkinitrd.sh
+++ b/alpine/mkinitrd.sh
@@ -32,7 +32,7 @@ EOF
printf 'moby' > /tmp/etc/hostname
-rm /tmp/bin/mkinitrd.sh
+rm /tmp/mkinitrd.sh
cd /tmp
-find . | cpio -H newc -o
+find . | cpio -H newc -o | gzip -9
diff --git a/alpine/packages/9pmount-vsock/.gitignore b/alpine/packages/9pmount-vsock/.gitignore
index 96331e6d1..5b42612bc 100644
--- a/alpine/packages/9pmount-vsock/.gitignore
+++ b/alpine/packages/9pmount-vsock/.gitignore
@@ -1 +1 @@
-9pmount-vsock
+sbin/
diff --git a/alpine/packages/9pmount-vsock/Dockerfile b/alpine/packages/9pmount-vsock/Dockerfile
index ae76d2d2d..99a8a8e32 100644
--- a/alpine/packages/9pmount-vsock/Dockerfile
+++ b/alpine/packages/9pmount-vsock/Dockerfile
@@ -1,8 +1,9 @@
-FROM mobylinux/alpine-build-c:1b53976210ba819823eda5b1d0d3ea337772e97b
-
-RUN mkdir -p /9pmount-vsock
-WORKDIR /9pmount-vsock
+FROM mobylinux/alpine-build-c:1ea690a7438cdd8a5965eaa034e0a0c521d9cb40
COPY . /9pmount-vsock
-RUN make 9pmount-vsock
+WORKDIR /9pmount-vsock
+
+RUN cc -Wall -Werror 9pmount-vsock.c hvsock.c -lpthread -o 9pmount-vsock
+
+CMD ["tar", "cf", "-", "9pmount-vsock"]
diff --git a/alpine/packages/9pmount-vsock/Makefile b/alpine/packages/9pmount-vsock/Makefile
index 653d84bc1..7d9d06b35 100644
--- a/alpine/packages/9pmount-vsock/Makefile
+++ b/alpine/packages/9pmount-vsock/Makefile
@@ -1,21 +1,9 @@
-.PHONY: all
+DEPS=Dockerfile $(wildcard *.c *.h)
-DEPS=9pmount-vsock.c hvsock.c hvsock.h
-
-all: Dockerfile $(DEPS)
- docker build -t 9pmount-vsock:build .
- docker run --rm 9pmount-vsock:build cat 9pmount-vsock > 9pmount-vsock
- chmod 755 9pmount-vsock
-
-9pmount-vsock: 9pmount-vsock.o hvsock.o
- gcc -Wall -Werror -o 9pmount-vsock 9pmount-vsock.o hvsock.o -lpthread
-
-9pmount-vsock.o: 9pmount-vsock.c hvsock.h
- gcc -Wall -Werror -c 9pmount-vsock.c
-
-hvsock.o: hvsock.c hvsock.h
- gcc -Wall -Werror -c hvsock.c
+9pmount-vsock: $(DEPS)
+ mkdir -p sbin
+ tar cf - $(DEPS) | docker build -t 9pmount-vsock:build -
+ docker run --rm --net=none 9pmount-vsock:build | tar xf - -C sbin
clean:
- rm -f 9pmount-vsock
- docker images -q 9pmount-vsock:build | xargs docker rmi -f || true
+ rm -rf sbin
diff --git a/alpine/packages/Makefile b/alpine/packages/Makefile
index 2f5d0ce44..4af716eca 100644
--- a/alpine/packages/Makefile
+++ b/alpine/packages/Makefile
@@ -1,28 +1,10 @@
-all:
- $(MAKE) -C proxy OS=linux
- $(MAKE) -C diagnostics OS=linux
- $(MAKE) -C transfused OS=linux
- $(MAKE) -C tap-vsockd OS=linux
- $(MAKE) -C hvtools OS=linux
- $(MAKE) -C docker OS=Linux
- $(MAKE) -C nc-vsock OS=linux
- $(MAKE) -C vsudd OS=linux
- $(MAKE) -C 9pmount-vsock OS=linux
- $(MAKE) -C iptables OS=linux
+DEPS=proxy diagnostics transfused tap-vsockd hvtools docker nc-vsock vsudd 9pmount-vsock iptables
+.PHONY: clean $(DEPS)
-arm:
- $(MAKE) -C docker arm OS=Linux ARCH=arm
- # Not cross building at present (C code)
- # $(MAKE) -C diagnostics OS=linux ARCH=arm
+default: $(DEPS)
+
+$(DEPS):
+ $(MAKE) -C $@
clean:
- $(MAKE) -C proxy clean
- $(MAKE) -C diagnostics clean
- $(MAKE) -C transfused clean
- $(MAKE) -C tap-vsockd clean
- $(MAKE) -C docker clean
- $(MAKE) -C hvtools clean
- $(MAKE) -C nc-vsock clean
- $(MAKE) -C vsudd clean
- $(MAKE) -C 9pmount-vsock clean
- $(MAKE) -C iptables clean
+ for f in $(DEPS); do $(MAKE) -C $$f clean; done
diff --git a/alpine/packages/README.md b/alpine/packages/README.md
deleted file mode 100644
index 92ab2d819..000000000
--- a/alpine/packages/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-The directories below should be turned into proper packages, built from upstream.
-
-Currently these are temporarily vendored from pinata.
diff --git a/alpine/packages/containerd/etc/init.d/containerd b/alpine/packages/containerd/etc/init.d/containerd
index f5b007d41..60fd8ae88 100755
--- a/alpine/packages/containerd/etc/init.d/containerd
+++ b/alpine/packages/containerd/etc/init.d/containerd
@@ -13,6 +13,14 @@ start()
ulimit -n 1048576
ulimit -p unlimited
+ [ ! -e /usr/bin/containerd ] && \
+ ( cd /usr/bin && \
+ ln -s docker-runc runc && \
+ ln -s docker-containerd-shim containerd-shim && \
+ ln -s docker-containerd-ctr containerd-ctr && \
+ ln -s docker-containerd containerd \
+ )
+
/usr/bin/containerd 1>&2 2>/var/log/containerd.log &
ewaitfile 5 /var/run/containerd/containerd.sock
diff --git a/alpine/packages/diagnostics/.gitignore b/alpine/packages/diagnostics/.gitignore
index 1802b3c31..bb212fdf6 100644
--- a/alpine/packages/diagnostics/.gitignore
+++ b/alpine/packages/diagnostics/.gitignore
@@ -1,2 +1 @@
-diagnostics-server
-/vendor
\ No newline at end of file
+usr/bin/diagnostics-server
diff --git a/alpine/packages/diagnostics/Dockerfile b/alpine/packages/diagnostics/Dockerfile
index e3c2f659a..3eea9dba5 100644
--- a/alpine/packages/diagnostics/Dockerfile
+++ b/alpine/packages/diagnostics/Dockerfile
@@ -1,13 +1,9 @@
-FROM mobylinux/alpine-build-go:30067067003d565887d7efe533eba03ed46038d2
+FROM mobylinux/alpine-build-go:21b413791b4fed2e16126c77c6b860feaf889d70
-RUN mkdir -p /go/src/diagnostics
-WORKDIR /go/src/diagnostics
+COPY ./ /go/src/diagnostics-server/
-COPY . /go/src/diagnostics
-
-ARG GOARCH
-ARG GOOS
+WORKDIR /go/src/diagnostics-server
RUN go install --ldflags '-extldflags "-fno-PIC"'
-RUN [ -f /go/bin/*/diagnostics ] && mv /go/bin/*/diagnostics /go/bin/ || true
+CMD ["tar", "cf", "-", "-C", "/go/bin", "diagnostics-server"]
diff --git a/alpine/packages/diagnostics/Makefile b/alpine/packages/diagnostics/Makefile
index 19e59e0da..b296d5485 100644
--- a/alpine/packages/diagnostics/Makefile
+++ b/alpine/packages/diagnostics/Makefile
@@ -1,15 +1,12 @@
-all: diagnostics-server
+all: usr/bin/diagnostics-server
-.PHONY: vendor
-vendor:
- mkdir -p ./vendor
- cp -r ../go/vendor/* ./vendor/
+DEPS=Dockerfile $(wildcard *.go)
-diagnostics-server: Dockerfile main.go vendor
- docker build --build-arg GOOS=$(OS) --build-arg GOARCH=$(ARCH) -t diagnostics:build .
- docker run --rm diagnostics:build cat /go/bin/diagnostics > diagnostics-server
- chmod 755 diagnostics-server
+usr/bin/diagnostics-server: $(DEPS) ../vendor/manifest
+ tar cf - $(DEPS) -C .. vendor | docker build -t diagnostics-server:build -
+ docker run --rm --net=none diagnostics-server:build | tar xf - -C usr/bin
clean:
- rm -rf diagnostics-server vendor
- docker images -q diagnostics:build | xargs docker rmi -f || true
+ rm -f usr/bin/diagnostics-server
+
+.DELETE_ON_ERROR:
diff --git a/alpine/packages/diagnostics/diagnostics b/alpine/packages/diagnostics/usr/bin/diagnostics
similarity index 100%
rename from alpine/packages/diagnostics/diagnostics
rename to alpine/packages/diagnostics/usr/bin/diagnostics
diff --git a/alpine/packages/docker/.gitignore b/alpine/packages/docker/.gitignore
index 861389dec..1b91047ac 100644
--- a/alpine/packages/docker/.gitignore
+++ b/alpine/packages/docker/.gitignore
@@ -1,2 +1 @@
-bin/
-docker.git
+usr/
diff --git a/alpine/packages/docker/Makefile b/alpine/packages/docker/Makefile
index 58e9e3bda..ea4c2ccfa 100644
--- a/alpine/packages/docker/Makefile
+++ b/alpine/packages/docker/Makefile
@@ -3,16 +3,37 @@ ARCH?=x86_64
OS?=Linux
DOCKER_EXPERIMENTAL?=1
-all: bin
+DOCKER_BINARIES?=docker dockerd docker-proxy docker-runc docker-containerd docker-containerd-ctr docker-containerd-shim
+
+all: usr/bin/docker
TEST_HOST=$(shell if echo "$(DOCKER_VERSION)" | grep -q -- '-rc'; then echo "test.docker.com"; else echo "get.docker.com"; fi)
-DOCKER_HOST?=$(shell [ "${DOCKER_EXPERIMENTAL}" -eq 1 ] && printf "experimental.docker.com" || printf "${TEST_HOST}")
-DOCKER_BIN_URL?="https://${DOCKER_HOST}/builds/${OS}/${ARCH}/docker-${DOCKER_VERSION}.tgz"
+ifeq ($(DOCKER_EXPERIMENTAL),1)
+DOCKER_HOST=experimental.docker.com
+DOCKER_IMAGE?=docker:$(DOCKER_VERSION)-experimental
+else
+DOCKER_HOST=$(TEST_HOST)
+DOCKER_IMAGE?=docker:$(DOCKER_VERSION)
+endif
-bin:
- mkdir -p bin
- curl -sSL -o docker.tgz ${DOCKER_BIN_URL}
- tar xzf docker.tgz && \
+.PHONY: download hub cleanusr
+
+ifeq ($(DOCKER_BIN_URL)$(FORCE_CURL),)
+usr/bin/docker: hub
+else
+usr/bin/docker: download
+endif
+
+cleanusr:
+ mkdir -p usr/bin
+ rm -f usr/bin/*
+
+download: cleanusr
+ifdef DOCKER_BIN_URL
+ curl -sSL ${DOCKER_BIN_URL} | tar xzf -
+else
+ curl -sSL https://${DOCKER_HOST}/builds/${OS}/${ARCH}/docker-${DOCKER_VERSION}.tgz | tar xzf -
+endif
mv docker/docker-containerd-ctr \
docker/docker \
docker/docker-containerd \
@@ -20,9 +41,12 @@ bin:
docker/docker-proxy \
docker/docker-runc \
docker/docker-containerd-shim \
- bin/
- rm -rf docker/ docker.tgz
- chmod +x bin/*
+ usr/bin/
+
+hub: cleanusr
+ docker run --rm $(DOCKER_IMAGE) tar cf - -C /usr/local/bin $(DOCKER_BINARIES) | tar xf - -C usr/bin
clean:
- rm -rf bin docker/ docker.tgz
+ rm -rf usr/ docker/
+
+.DELETE_ON_ERROR:
diff --git a/alpine/packages/docker/etc/init.d/docker b/alpine/packages/docker/etc/init.d/docker
index 81ee9b35c..38f67e2cb 100755
--- a/alpine/packages/docker/etc/init.d/docker
+++ b/alpine/packages/docker/etc/init.d/docker
@@ -41,6 +41,7 @@ start()
esac
# some config is always in /etc/docker cannot specify alternative eg certs
+ mkdir -p /etc/docker
if mobyconfig exists etc/docker
then
for f in $(mobyconfig find etc/docker)
diff --git a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/.gitignore b/alpine/packages/go/vendor/github.com/Sirupsen/logrus/.gitignore
deleted file mode 100644
index 66be63a00..000000000
--- a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-logrus
diff --git a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/.travis.yml b/alpine/packages/go/vendor/github.com/Sirupsen/logrus/.travis.yml
deleted file mode 100644
index 2d8c08661..000000000
--- a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/.travis.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-language: go
-go:
- - 1.2
- - 1.3
- - 1.4
- - tip
-install:
- - go get -t ./...
diff --git a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/CHANGELOG.md b/alpine/packages/go/vendor/github.com/Sirupsen/logrus/CHANGELOG.md
deleted file mode 100644
index 78f98959b..000000000
--- a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/CHANGELOG.md
+++ /dev/null
@@ -1,47 +0,0 @@
-# 0.8.7
-
-* logrus/core: fix possible race (#216)
-* logrus/doc: small typo fixes and doc improvements
-
-
-# 0.8.6
-
-* hooks/raven: allow passing an initialized client
-
-# 0.8.5
-
-* logrus/core: revert #208
-
-# 0.8.4
-
-* formatter/text: fix data race (#218)
-
-# 0.8.3
-
-* logrus/core: fix entry log level (#208)
-* logrus/core: improve performance of text formatter by 40%
-* logrus/core: expose `LevelHooks` type
-* logrus/core: add support for DragonflyBSD and NetBSD
-* formatter/text: print structs more verbosely
-
-# 0.8.2
-
-* logrus: fix more Fatal family functions
-
-# 0.8.1
-
-* logrus: fix not exiting on `Fatalf` and `Fatalln`
-
-# 0.8.0
-
-* logrus: defaults to stderr instead of stdout
-* hooks/sentry: add special field for `*http.Request`
-* formatter/text: ignore Windows for colors
-
-# 0.7.3
-
-* formatter/\*: allow configuration of timestamp layout
-
-# 0.7.2
-
-* formatter/text: Add configuration option for time format (#158)
diff --git a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/LICENSE b/alpine/packages/go/vendor/github.com/Sirupsen/logrus/LICENSE
deleted file mode 100644
index f090cb42f..000000000
--- a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2014 Simon Eskildsen
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/README.md b/alpine/packages/go/vendor/github.com/Sirupsen/logrus/README.md
deleted file mode 100644
index 6fa6e2062..000000000
--- a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/README.md
+++ /dev/null
@@ -1,357 +0,0 @@
-# Logrus
[](https://travis-ci.org/Sirupsen/logrus) [][godoc]
-
-Logrus is a structured logger for Go (golang), completely API compatible with
-the standard library logger. [Godoc][godoc]. **Please note the Logrus API is not
-yet stable (pre 1.0). Logrus itself is completely stable and has been used in
-many large deployments. The core API is unlikely to change much but please
-version control your Logrus to make sure you aren't fetching latest `master` on
-every build.**
-
-Nicely color-coded in development (when a TTY is attached, otherwise just
-plain text):
-
-
-
-With `log.Formatter = new(logrus.JSONFormatter)`, for easy parsing by logstash
-or Splunk:
-
-```json
-{"animal":"walrus","level":"info","msg":"A group of walrus emerges from the
-ocean","size":10,"time":"2014-03-10 19:57:38.562264131 -0400 EDT"}
-
-{"level":"warning","msg":"The group's number increased tremendously!",
-"number":122,"omg":true,"time":"2014-03-10 19:57:38.562471297 -0400 EDT"}
-
-{"animal":"walrus","level":"info","msg":"A giant walrus appears!",
-"size":10,"time":"2014-03-10 19:57:38.562500591 -0400 EDT"}
-
-{"animal":"walrus","level":"info","msg":"Tremendously sized cow enters the ocean.",
-"size":9,"time":"2014-03-10 19:57:38.562527896 -0400 EDT"}
-
-{"level":"fatal","msg":"The ice breaks!","number":100,"omg":true,
-"time":"2014-03-10 19:57:38.562543128 -0400 EDT"}
-```
-
-With the default `log.Formatter = new(&log.TextFormatter{})` when a TTY is not
-attached, the output is compatible with the
-[logfmt](http://godoc.org/github.com/kr/logfmt) format:
-
-```text
-time="2015-03-26T01:27:38-04:00" level=debug msg="Started observing beach" animal=walrus number=8
-time="2015-03-26T01:27:38-04:00" level=info msg="A group of walrus emerges from the ocean" animal=walrus size=10
-time="2015-03-26T01:27:38-04:00" level=warning msg="The group's number increased tremendously!" number=122 omg=true
-time="2015-03-26T01:27:38-04:00" level=debug msg="Temperature changes" temperature=-4
-time="2015-03-26T01:27:38-04:00" level=panic msg="It's over 9000!" animal=orca size=9009
-time="2015-03-26T01:27:38-04:00" level=fatal msg="The ice breaks!" err=&{0x2082280c0 map[animal:orca size:9009] 2015-03-26 01:27:38.441574009 -0400 EDT panic It's over 9000!} number=100 omg=true
-exit status 1
-```
-
-#### Example
-
-The simplest way to use Logrus is simply the package-level exported logger:
-
-```go
-package main
-
-import (
- log "github.com/Sirupsen/logrus"
-)
-
-func main() {
- log.WithFields(log.Fields{
- "animal": "walrus",
- }).Info("A walrus appears")
-}
-```
-
-Note that it's completely api-compatible with the stdlib logger, so you can
-replace your `log` imports everywhere with `log "github.com/Sirupsen/logrus"`
-and you'll now have the flexibility of Logrus. You can customize it all you
-want:
-
-```go
-package main
-
-import (
- "os"
- log "github.com/Sirupsen/logrus"
- "github.com/Sirupsen/logrus/hooks/airbrake"
-)
-
-func init() {
- // Log as JSON instead of the default ASCII formatter.
- log.SetFormatter(&log.JSONFormatter{})
-
- // Use the Airbrake hook to report errors that have Error severity or above to
- // an exception tracker. You can create custom hooks, see the Hooks section.
- log.AddHook(airbrake.NewHook("https://example.com", "xyz", "development"))
-
- // Output to stderr instead of stdout, could also be a file.
- log.SetOutput(os.Stderr)
-
- // Only log the warning severity or above.
- log.SetLevel(log.WarnLevel)
-}
-
-func main() {
- log.WithFields(log.Fields{
- "animal": "walrus",
- "size": 10,
- }).Info("A group of walrus emerges from the ocean")
-
- log.WithFields(log.Fields{
- "omg": true,
- "number": 122,
- }).Warn("The group's number increased tremendously!")
-
- log.WithFields(log.Fields{
- "omg": true,
- "number": 100,
- }).Fatal("The ice breaks!")
-
- // A common pattern is to re-use fields between logging statements by re-using
- // the logrus.Entry returned from WithFields()
- contextLogger := log.WithFields(log.Fields{
- "common": "this is a common field",
- "other": "I also should be logged always",
- })
-
- contextLogger.Info("I'll be logged with common and other field")
- contextLogger.Info("Me too")
-}
-```
-
-For more advanced usage such as logging to multiple locations from the same
-application, you can also create an instance of the `logrus` Logger:
-
-```go
-package main
-
-import (
- "github.com/Sirupsen/logrus"
-)
-
-// Create a new instance of the logger. You can have any number of instances.
-var log = logrus.New()
-
-func main() {
- // The API for setting attributes is a little different than the package level
- // exported logger. See Godoc.
- log.Out = os.Stderr
-
- log.WithFields(logrus.Fields{
- "animal": "walrus",
- "size": 10,
- }).Info("A group of walrus emerges from the ocean")
-}
-```
-
-#### Fields
-
-Logrus encourages careful, structured logging though logging fields instead of
-long, unparseable error messages. For example, instead of: `log.Fatalf("Failed
-to send event %s to topic %s with key %d")`, you should log the much more
-discoverable:
-
-```go
-log.WithFields(log.Fields{
- "event": event,
- "topic": topic,
- "key": key,
-}).Fatal("Failed to send event")
-```
-
-We've found this API forces you to think about logging in a way that produces
-much more useful logging messages. We've been in countless situations where just
-a single added field to a log statement that was already there would've saved us
-hours. The `WithFields` call is optional.
-
-In general, with Logrus using any of the `printf`-family functions should be
-seen as a hint you should add a field, however, you can still use the
-`printf`-family functions with Logrus.
-
-#### Hooks
-
-You can add hooks for logging levels. For example to send errors to an exception
-tracking service on `Error`, `Fatal` and `Panic`, info to StatsD or log to
-multiple places simultaneously, e.g. syslog.
-
-Logrus comes with [built-in hooks](hooks/). Add those, or your custom hook, in
-`init`:
-
-```go
-import (
- log "github.com/Sirupsen/logrus"
- "github.com/Sirupsen/logrus/hooks/airbrake"
- logrus_syslog "github.com/Sirupsen/logrus/hooks/syslog"
- "log/syslog"
-)
-
-func init() {
- log.AddHook(airbrake.NewHook("https://example.com", "xyz", "development"))
-
- hook, err := logrus_syslog.NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "")
- if err != nil {
- log.Error("Unable to connect to local syslog daemon")
- } else {
- log.AddHook(hook)
- }
-}
-```
-
-
-| Hook | Description |
-| ----- | ----------- |
-| [Airbrake](https://github.com/Sirupsen/logrus/blob/master/hooks/airbrake/airbrake.go) | Send errors to an exception tracking service compatible with the Airbrake API. Uses [`airbrake-go`](https://github.com/tobi/airbrake-go) behind the scenes. |
-| [Papertrail](https://github.com/Sirupsen/logrus/blob/master/hooks/papertrail/papertrail.go) | Send errors to the Papertrail hosted logging service via UDP. |
-| [Syslog](https://github.com/Sirupsen/logrus/blob/master/hooks/syslog/syslog.go) | Send errors to remote syslog server. Uses standard library `log/syslog` behind the scenes. |
-| [BugSnag](https://github.com/Sirupsen/logrus/blob/master/hooks/bugsnag/bugsnag.go) | Send errors to the Bugsnag exception tracking service. |
-| [Sentry](https://github.com/Sirupsen/logrus/blob/master/hooks/sentry/sentry.go) | Send errors to the Sentry error logging and aggregation service. |
-| [Hiprus](https://github.com/nubo/hiprus) | Send errors to a channel in hipchat. |
-| [Logrusly](https://github.com/sebest/logrusly) | Send logs to [Loggly](https://www.loggly.com/) |
-| [Slackrus](https://github.com/johntdyer/slackrus) | Hook for Slack chat. |
-| [Journalhook](https://github.com/wercker/journalhook) | Hook for logging to `systemd-journald` |
-| [Graylog](https://github.com/gemnasium/logrus-hooks/tree/master/graylog) | Hook for logging to [Graylog](http://graylog2.org/) |
-| [Raygun](https://github.com/squirkle/logrus-raygun-hook) | Hook for logging to [Raygun.io](http://raygun.io/) |
-| [LFShook](https://github.com/rifflock/lfshook) | Hook for logging to the local filesystem |
-| [Honeybadger](https://github.com/agonzalezro/logrus_honeybadger) | Hook for sending exceptions to Honeybadger |
-| [Mail](https://github.com/zbindenren/logrus_mail) | Hook for sending exceptions via mail |
-| [Rollrus](https://github.com/heroku/rollrus) | Hook for sending errors to rollbar |
-| [Fluentd](https://github.com/evalphobia/logrus_fluent) | Hook for logging to fluentd |
-| [Mongodb](https://github.com/weekface/mgorus) | Hook for logging to mongodb |
-
-#### Level logging
-
-Logrus has six logging levels: Debug, Info, Warning, Error, Fatal and Panic.
-
-```go
-log.Debug("Useful debugging information.")
-log.Info("Something noteworthy happened!")
-log.Warn("You should probably take a look at this.")
-log.Error("Something failed but I'm not quitting.")
-// Calls os.Exit(1) after logging
-log.Fatal("Bye.")
-// Calls panic() after logging
-log.Panic("I'm bailing.")
-```
-
-You can set the logging level on a `Logger`, then it will only log entries with
-that severity or anything above it:
-
-```go
-// Will log anything that is info or above (warn, error, fatal, panic). Default.
-log.SetLevel(log.InfoLevel)
-```
-
-It may be useful to set `log.Level = logrus.DebugLevel` in a debug or verbose
-environment if your application has that.
-
-#### Entries
-
-Besides the fields added with `WithField` or `WithFields` some fields are
-automatically added to all logging events:
-
-1. `time`. The timestamp when the entry was created.
-2. `msg`. The logging message passed to `{Info,Warn,Error,Fatal,Panic}` after
- the `AddFields` call. E.g. `Failed to send event.`
-3. `level`. The logging level. E.g. `info`.
-
-#### Environments
-
-Logrus has no notion of environment.
-
-If you wish for hooks and formatters to only be used in specific environments,
-you should handle that yourself. For example, if your application has a global
-variable `Environment`, which is a string representation of the environment you
-could do:
-
-```go
-import (
- log "github.com/Sirupsen/logrus"
-)
-
-init() {
- // do something here to set environment depending on an environment variable
- // or command-line flag
- if Environment == "production" {
- log.SetFormatter(&log.JSONFormatter{})
- } else {
- // The TextFormatter is default, you don't actually have to do this.
- log.SetFormatter(&log.TextFormatter{})
- }
-}
-```
-
-This configuration is how `logrus` was intended to be used, but JSON in
-production is mostly only useful if you do log aggregation with tools like
-Splunk or Logstash.
-
-#### Formatters
-
-The built-in logging formatters are:
-
-* `logrus.TextFormatter`. Logs the event in colors if stdout is a tty, otherwise
- without colors.
- * *Note:* to force colored output when there is no TTY, set the `ForceColors`
- field to `true`. To force no colored output even if there is a TTY set the
- `DisableColors` field to `true`
-* `logrus.JSONFormatter`. Logs fields as JSON.
-* `logrus_logstash.LogstashFormatter`. Logs fields as Logstash Events (http://logstash.net).
-
- ```go
- logrus.SetFormatter(&logrus_logstash.LogstashFormatter{Type: “application_name"})
- ```
-
-Third party logging formatters:
-
-* [`zalgo`](https://github.com/aybabtme/logzalgo): invoking the P͉̫o̳̼̊w̖͈̰͎e̬͔̭͂r͚̼̹̲ ̫͓͉̳͈ō̠͕͖̚f̝͍̠ ͕̲̞͖͑Z̖̫̤̫ͪa͉̬͈̗l͖͎g̳̥o̰̥̅!̣͔̲̻͊̄ ̙̘̦̹̦.
-
-You can define your formatter by implementing the `Formatter` interface,
-requiring a `Format` method. `Format` takes an `*Entry`. `entry.Data` is a
-`Fields` type (`map[string]interface{}`) with all your fields as well as the
-default ones (see Entries section above):
-
-```go
-type MyJSONFormatter struct {
-}
-
-log.SetFormatter(new(MyJSONFormatter))
-
-func (f *MyJSONFormatter) Format(entry *Entry) ([]byte, error) {
- // Note this doesn't include Time, Level and Message which are available on
- // the Entry. Consult `godoc` on information about those fields or read the
- // source of the official loggers.
- serialized, err := json.Marshal(entry.Data)
- if err != nil {
- return nil, fmt.Errorf("Failed to marshal fields to JSON, %v", err)
- }
- return append(serialized, '\n'), nil
-}
-```
-
-#### Logger as an `io.Writer`
-
-Logrus can be transformed into an `io.Writer`. That writer is the end of an `io.Pipe` and it is your responsibility to close it.
-
-```go
-w := logger.Writer()
-defer w.Close()
-
-srv := http.Server{
- // create a stdlib log.Logger that writes to
- // logrus.Logger.
- ErrorLog: log.New(w, "", 0),
-}
-```
-
-Each line written to that writer will be printed the usual way, using formatters
-and hooks. The level for those entries is `info`.
-
-#### Rotation
-
-Log rotation is not provided with Logrus. Log rotation should be done by an
-external program (like `logrotate(8)`) that can compress and delete old log
-entries. It should not be a feature of the application-level logger.
-
-
-[godoc]: https://godoc.org/github.com/Sirupsen/logrus
diff --git a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/doc.go b/alpine/packages/go/vendor/github.com/Sirupsen/logrus/doc.go
deleted file mode 100644
index dddd5f877..000000000
--- a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/doc.go
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
-Package logrus is a structured logger for Go, completely API compatible with the standard library logger.
-
-
-The simplest way to use Logrus is simply the package-level exported logger:
-
- package main
-
- import (
- log "github.com/Sirupsen/logrus"
- )
-
- func main() {
- log.WithFields(log.Fields{
- "animal": "walrus",
- "number": 1,
- "size": 10,
- }).Info("A walrus appears")
- }
-
-Output:
- time="2015-09-07T08:48:33Z" level=info msg="A walrus appears" animal=walrus number=1 size=10
-
-For a full guide visit https://github.com/Sirupsen/logrus
-*/
-package logrus
diff --git a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/entry.go b/alpine/packages/go/vendor/github.com/Sirupsen/logrus/entry.go
deleted file mode 100644
index 9ae900bc5..000000000
--- a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/entry.go
+++ /dev/null
@@ -1,264 +0,0 @@
-package logrus
-
-import (
- "bytes"
- "fmt"
- "io"
- "os"
- "time"
-)
-
-// Defines the key when adding errors using WithError.
-var ErrorKey = "error"
-
-// An entry is the final or intermediate Logrus logging entry. It contains all
-// the fields passed with WithField{,s}. It's finally logged when Debug, Info,
-// Warn, Error, Fatal or Panic is called on it. These objects can be reused and
-// passed around as much as you wish to avoid field duplication.
-type Entry struct {
- Logger *Logger
-
- // Contains all the fields set by the user.
- Data Fields
-
- // Time at which the log entry was created
- Time time.Time
-
- // Level the log entry was logged at: Debug, Info, Warn, Error, Fatal or Panic
- Level Level
-
- // Message passed to Debug, Info, Warn, Error, Fatal or Panic
- Message string
-}
-
-func NewEntry(logger *Logger) *Entry {
- return &Entry{
- Logger: logger,
- // Default is three fields, give a little extra room
- Data: make(Fields, 5),
- }
-}
-
-// Returns a reader for the entry, which is a proxy to the formatter.
-func (entry *Entry) Reader() (*bytes.Buffer, error) {
- serialized, err := entry.Logger.Formatter.Format(entry)
- return bytes.NewBuffer(serialized), err
-}
-
-// Returns the string representation from the reader and ultimately the
-// formatter.
-func (entry *Entry) String() (string, error) {
- reader, err := entry.Reader()
- if err != nil {
- return "", err
- }
-
- return reader.String(), err
-}
-
-// Add an error as single field (using the key defined in ErrorKey) to the Entry.
-func (entry *Entry) WithError(err error) *Entry {
- return entry.WithField(ErrorKey, err)
-}
-
-// Add a single field to the Entry.
-func (entry *Entry) WithField(key string, value interface{}) *Entry {
- return entry.WithFields(Fields{key: value})
-}
-
-// Add a map of fields to the Entry.
-func (entry *Entry) WithFields(fields Fields) *Entry {
- data := Fields{}
- for k, v := range entry.Data {
- data[k] = v
- }
- for k, v := range fields {
- data[k] = v
- }
- return &Entry{Logger: entry.Logger, Data: data}
-}
-
-// This function is not declared with a pointer value because otherwise
-// race conditions will occur when using multiple goroutines
-func (entry Entry) log(level Level, msg string) {
- entry.Time = time.Now()
- entry.Level = level
- entry.Message = msg
-
- if err := entry.Logger.Hooks.Fire(level, &entry); err != nil {
- entry.Logger.mu.Lock()
- fmt.Fprintf(os.Stderr, "Failed to fire hook: %v\n", err)
- entry.Logger.mu.Unlock()
- }
-
- reader, err := entry.Reader()
- if err != nil {
- entry.Logger.mu.Lock()
- fmt.Fprintf(os.Stderr, "Failed to obtain reader, %v\n", err)
- entry.Logger.mu.Unlock()
- }
-
- entry.Logger.mu.Lock()
- defer entry.Logger.mu.Unlock()
-
- _, err = io.Copy(entry.Logger.Out, reader)
- if err != nil {
- fmt.Fprintf(os.Stderr, "Failed to write to log, %v\n", err)
- }
-
- // To avoid Entry#log() returning a value that only would make sense for
- // panic() to use in Entry#Panic(), we avoid the allocation by checking
- // directly here.
- if level <= PanicLevel {
- panic(&entry)
- }
-}
-
-func (entry *Entry) Debug(args ...interface{}) {
- if entry.Logger.Level >= DebugLevel {
- entry.log(DebugLevel, fmt.Sprint(args...))
- }
-}
-
-func (entry *Entry) Print(args ...interface{}) {
- entry.Info(args...)
-}
-
-func (entry *Entry) Info(args ...interface{}) {
- if entry.Logger.Level >= InfoLevel {
- entry.log(InfoLevel, fmt.Sprint(args...))
- }
-}
-
-func (entry *Entry) Warn(args ...interface{}) {
- if entry.Logger.Level >= WarnLevel {
- entry.log(WarnLevel, fmt.Sprint(args...))
- }
-}
-
-func (entry *Entry) Warning(args ...interface{}) {
- entry.Warn(args...)
-}
-
-func (entry *Entry) Error(args ...interface{}) {
- if entry.Logger.Level >= ErrorLevel {
- entry.log(ErrorLevel, fmt.Sprint(args...))
- }
-}
-
-func (entry *Entry) Fatal(args ...interface{}) {
- if entry.Logger.Level >= FatalLevel {
- entry.log(FatalLevel, fmt.Sprint(args...))
- }
- os.Exit(1)
-}
-
-func (entry *Entry) Panic(args ...interface{}) {
- if entry.Logger.Level >= PanicLevel {
- entry.log(PanicLevel, fmt.Sprint(args...))
- }
- panic(fmt.Sprint(args...))
-}
-
-// Entry Printf family functions
-
-func (entry *Entry) Debugf(format string, args ...interface{}) {
- if entry.Logger.Level >= DebugLevel {
- entry.Debug(fmt.Sprintf(format, args...))
- }
-}
-
-func (entry *Entry) Infof(format string, args ...interface{}) {
- if entry.Logger.Level >= InfoLevel {
- entry.Info(fmt.Sprintf(format, args...))
- }
-}
-
-func (entry *Entry) Printf(format string, args ...interface{}) {
- entry.Infof(format, args...)
-}
-
-func (entry *Entry) Warnf(format string, args ...interface{}) {
- if entry.Logger.Level >= WarnLevel {
- entry.Warn(fmt.Sprintf(format, args...))
- }
-}
-
-func (entry *Entry) Warningf(format string, args ...interface{}) {
- entry.Warnf(format, args...)
-}
-
-func (entry *Entry) Errorf(format string, args ...interface{}) {
- if entry.Logger.Level >= ErrorLevel {
- entry.Error(fmt.Sprintf(format, args...))
- }
-}
-
-func (entry *Entry) Fatalf(format string, args ...interface{}) {
- if entry.Logger.Level >= FatalLevel {
- entry.Fatal(fmt.Sprintf(format, args...))
- }
- os.Exit(1)
-}
-
-func (entry *Entry) Panicf(format string, args ...interface{}) {
- if entry.Logger.Level >= PanicLevel {
- entry.Panic(fmt.Sprintf(format, args...))
- }
-}
-
-// Entry Println family functions
-
-func (entry *Entry) Debugln(args ...interface{}) {
- if entry.Logger.Level >= DebugLevel {
- entry.Debug(entry.sprintlnn(args...))
- }
-}
-
-func (entry *Entry) Infoln(args ...interface{}) {
- if entry.Logger.Level >= InfoLevel {
- entry.Info(entry.sprintlnn(args...))
- }
-}
-
-func (entry *Entry) Println(args ...interface{}) {
- entry.Infoln(args...)
-}
-
-func (entry *Entry) Warnln(args ...interface{}) {
- if entry.Logger.Level >= WarnLevel {
- entry.Warn(entry.sprintlnn(args...))
- }
-}
-
-func (entry *Entry) Warningln(args ...interface{}) {
- entry.Warnln(args...)
-}
-
-func (entry *Entry) Errorln(args ...interface{}) {
- if entry.Logger.Level >= ErrorLevel {
- entry.Error(entry.sprintlnn(args...))
- }
-}
-
-func (entry *Entry) Fatalln(args ...interface{}) {
- if entry.Logger.Level >= FatalLevel {
- entry.Fatal(entry.sprintlnn(args...))
- }
- os.Exit(1)
-}
-
-func (entry *Entry) Panicln(args ...interface{}) {
- if entry.Logger.Level >= PanicLevel {
- entry.Panic(entry.sprintlnn(args...))
- }
-}
-
-// Sprintlnn => Sprint no newline. This is to get the behavior of how
-// fmt.Sprintln where spaces are always added between operands, regardless of
-// their type. Instead of vendoring the Sprintln implementation to spare a
-// string allocation, we do the simplest thing.
-func (entry *Entry) sprintlnn(args ...interface{}) string {
- msg := fmt.Sprintln(args...)
- return msg[:len(msg)-1]
-}
diff --git a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/examples/basic/basic.go b/alpine/packages/go/vendor/github.com/Sirupsen/logrus/examples/basic/basic.go
deleted file mode 100644
index a1623ec00..000000000
--- a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/examples/basic/basic.go
+++ /dev/null
@@ -1,50 +0,0 @@
-package main
-
-import (
- "github.com/Sirupsen/logrus"
-)
-
-var log = logrus.New()
-
-func init() {
- log.Formatter = new(logrus.JSONFormatter)
- log.Formatter = new(logrus.TextFormatter) // default
- log.Level = logrus.DebugLevel
-}
-
-func main() {
- defer func() {
- err := recover()
- if err != nil {
- log.WithFields(logrus.Fields{
- "omg": true,
- "err": err,
- "number": 100,
- }).Fatal("The ice breaks!")
- }
- }()
-
- log.WithFields(logrus.Fields{
- "animal": "walrus",
- "number": 8,
- }).Debug("Started observing beach")
-
- log.WithFields(logrus.Fields{
- "animal": "walrus",
- "size": 10,
- }).Info("A group of walrus emerges from the ocean")
-
- log.WithFields(logrus.Fields{
- "omg": true,
- "number": 122,
- }).Warn("The group's number increased tremendously!")
-
- log.WithFields(logrus.Fields{
- "temperature": -4,
- }).Debug("Temperature changes")
-
- log.WithFields(logrus.Fields{
- "animal": "orca",
- "size": 9009,
- }).Panic("It's over 9000!")
-}
diff --git a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/examples/hook/hook.go b/alpine/packages/go/vendor/github.com/Sirupsen/logrus/examples/hook/hook.go
deleted file mode 100644
index cb5759a35..000000000
--- a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/examples/hook/hook.go
+++ /dev/null
@@ -1,30 +0,0 @@
-package main
-
-import (
- "github.com/Sirupsen/logrus"
- "github.com/Sirupsen/logrus/hooks/airbrake"
-)
-
-var log = logrus.New()
-
-func init() {
- log.Formatter = new(logrus.TextFormatter) // default
- log.Hooks.Add(airbrake.NewHook("https://example.com", "xyz", "development"))
-}
-
-func main() {
- log.WithFields(logrus.Fields{
- "animal": "walrus",
- "size": 10,
- }).Info("A group of walrus emerges from the ocean")
-
- log.WithFields(logrus.Fields{
- "omg": true,
- "number": 122,
- }).Warn("The group's number increased tremendously!")
-
- log.WithFields(logrus.Fields{
- "omg": true,
- "number": 100,
- }).Fatal("The ice breaks!")
-}
diff --git a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/exported.go b/alpine/packages/go/vendor/github.com/Sirupsen/logrus/exported.go
deleted file mode 100644
index 9a0120ac1..000000000
--- a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/exported.go
+++ /dev/null
@@ -1,193 +0,0 @@
-package logrus
-
-import (
- "io"
-)
-
-var (
- // std is the name of the standard logger in stdlib `log`
- std = New()
-)
-
-func StandardLogger() *Logger {
- return std
-}
-
-// SetOutput sets the standard logger output.
-func SetOutput(out io.Writer) {
- std.mu.Lock()
- defer std.mu.Unlock()
- std.Out = out
-}
-
-// SetFormatter sets the standard logger formatter.
-func SetFormatter(formatter Formatter) {
- std.mu.Lock()
- defer std.mu.Unlock()
- std.Formatter = formatter
-}
-
-// SetLevel sets the standard logger level.
-func SetLevel(level Level) {
- std.mu.Lock()
- defer std.mu.Unlock()
- std.Level = level
-}
-
-// GetLevel returns the standard logger level.
-func GetLevel() Level {
- std.mu.Lock()
- defer std.mu.Unlock()
- return std.Level
-}
-
-// AddHook adds a hook to the standard logger hooks.
-func AddHook(hook Hook) {
- std.mu.Lock()
- defer std.mu.Unlock()
- std.Hooks.Add(hook)
-}
-
-// WithError creates an entry from the standard logger and adds an error to it, using the value defined in ErrorKey as key.
-func WithError(err error) *Entry {
- return std.WithField(ErrorKey, err)
-}
-
-// WithField creates an entry from the standard logger and adds a field to
-// it. If you want multiple fields, use `WithFields`.
-//
-// Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal
-// or Panic on the Entry it returns.
-func WithField(key string, value interface{}) *Entry {
- return std.WithField(key, value)
-}
-
-// WithFields creates an entry from the standard logger and adds multiple
-// fields to it. This is simply a helper for `WithField`, invoking it
-// once for each field.
-//
-// Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal
-// or Panic on the Entry it returns.
-func WithFields(fields Fields) *Entry {
- return std.WithFields(fields)
-}
-
-// Debug logs a message at level Debug on the standard logger.
-func Debug(args ...interface{}) {
- std.Debug(args...)
-}
-
-// Print logs a message at level Info on the standard logger.
-func Print(args ...interface{}) {
- std.Print(args...)
-}
-
-// Info logs a message at level Info on the standard logger.
-func Info(args ...interface{}) {
- std.Info(args...)
-}
-
-// Warn logs a message at level Warn on the standard logger.
-func Warn(args ...interface{}) {
- std.Warn(args...)
-}
-
-// Warning logs a message at level Warn on the standard logger.
-func Warning(args ...interface{}) {
- std.Warning(args...)
-}
-
-// Error logs a message at level Error on the standard logger.
-func Error(args ...interface{}) {
- std.Error(args...)
-}
-
-// Panic logs a message at level Panic on the standard logger.
-func Panic(args ...interface{}) {
- std.Panic(args...)
-}
-
-// Fatal logs a message at level Fatal on the standard logger.
-func Fatal(args ...interface{}) {
- std.Fatal(args...)
-}
-
-// Debugf logs a message at level Debug on the standard logger.
-func Debugf(format string, args ...interface{}) {
- std.Debugf(format, args...)
-}
-
-// Printf logs a message at level Info on the standard logger.
-func Printf(format string, args ...interface{}) {
- std.Printf(format, args...)
-}
-
-// Infof logs a message at level Info on the standard logger.
-func Infof(format string, args ...interface{}) {
- std.Infof(format, args...)
-}
-
-// Warnf logs a message at level Warn on the standard logger.
-func Warnf(format string, args ...interface{}) {
- std.Warnf(format, args...)
-}
-
-// Warningf logs a message at level Warn on the standard logger.
-func Warningf(format string, args ...interface{}) {
- std.Warningf(format, args...)
-}
-
-// Errorf logs a message at level Error on the standard logger.
-func Errorf(format string, args ...interface{}) {
- std.Errorf(format, args...)
-}
-
-// Panicf logs a message at level Panic on the standard logger.
-func Panicf(format string, args ...interface{}) {
- std.Panicf(format, args...)
-}
-
-// Fatalf logs a message at level Fatal on the standard logger.
-func Fatalf(format string, args ...interface{}) {
- std.Fatalf(format, args...)
-}
-
-// Debugln logs a message at level Debug on the standard logger.
-func Debugln(args ...interface{}) {
- std.Debugln(args...)
-}
-
-// Println logs a message at level Info on the standard logger.
-func Println(args ...interface{}) {
- std.Println(args...)
-}
-
-// Infoln logs a message at level Info on the standard logger.
-func Infoln(args ...interface{}) {
- std.Infoln(args...)
-}
-
-// Warnln logs a message at level Warn on the standard logger.
-func Warnln(args ...interface{}) {
- std.Warnln(args...)
-}
-
-// Warningln logs a message at level Warn on the standard logger.
-func Warningln(args ...interface{}) {
- std.Warningln(args...)
-}
-
-// Errorln logs a message at level Error on the standard logger.
-func Errorln(args ...interface{}) {
- std.Errorln(args...)
-}
-
-// Panicln logs a message at level Panic on the standard logger.
-func Panicln(args ...interface{}) {
- std.Panicln(args...)
-}
-
-// Fatalln logs a message at level Fatal on the standard logger.
-func Fatalln(args ...interface{}) {
- std.Fatalln(args...)
-}
diff --git a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/formatter.go b/alpine/packages/go/vendor/github.com/Sirupsen/logrus/formatter.go
deleted file mode 100644
index 104d689f1..000000000
--- a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/formatter.go
+++ /dev/null
@@ -1,48 +0,0 @@
-package logrus
-
-import "time"
-
-const DefaultTimestampFormat = time.RFC3339
-
-// The Formatter interface is used to implement a custom Formatter. It takes an
-// `Entry`. It exposes all the fields, including the default ones:
-//
-// * `entry.Data["msg"]`. The message passed from Info, Warn, Error ..
-// * `entry.Data["time"]`. The timestamp.
-// * `entry.Data["level"]. The level the entry was logged at.
-//
-// Any additional fields added with `WithField` or `WithFields` are also in
-// `entry.Data`. Format is expected to return an array of bytes which are then
-// logged to `logger.Out`.
-type Formatter interface {
- Format(*Entry) ([]byte, error)
-}
-
-// This is to not silently overwrite `time`, `msg` and `level` fields when
-// dumping it. If this code wasn't there doing:
-//
-// logrus.WithField("level", 1).Info("hello")
-//
-// Would just silently drop the user provided level. Instead with this code
-// it'll logged as:
-//
-// {"level": "info", "fields.level": 1, "msg": "hello", "time": "..."}
-//
-// It's not exported because it's still using Data in an opinionated way. It's to
-// avoid code duplication between the two default formatters.
-func prefixFieldClashes(data Fields) {
- _, ok := data["time"]
- if ok {
- data["fields.time"] = data["time"]
- }
-
- _, ok = data["msg"]
- if ok {
- data["fields.msg"] = data["msg"]
- }
-
- _, ok = data["level"]
- if ok {
- data["fields.level"] = data["level"]
- }
-}
diff --git a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/formatters/logstash/logstash.go b/alpine/packages/go/vendor/github.com/Sirupsen/logrus/formatters/logstash/logstash.go
deleted file mode 100644
index 8ea93ddf2..000000000
--- a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/formatters/logstash/logstash.go
+++ /dev/null
@@ -1,56 +0,0 @@
-package logstash
-
-import (
- "encoding/json"
- "fmt"
-
- "github.com/Sirupsen/logrus"
-)
-
-// Formatter generates json in logstash format.
-// Logstash site: http://logstash.net/
-type LogstashFormatter struct {
- Type string // if not empty use for logstash type field.
-
- // TimestampFormat sets the format used for timestamps.
- TimestampFormat string
-}
-
-func (f *LogstashFormatter) Format(entry *logrus.Entry) ([]byte, error) {
- entry.Data["@version"] = 1
-
- if f.TimestampFormat == "" {
- f.TimestampFormat = logrus.DefaultTimestampFormat
- }
-
- entry.Data["@timestamp"] = entry.Time.Format(f.TimestampFormat)
-
- // set message field
- v, ok := entry.Data["message"]
- if ok {
- entry.Data["fields.message"] = v
- }
- entry.Data["message"] = entry.Message
-
- // set level field
- v, ok = entry.Data["level"]
- if ok {
- entry.Data["fields.level"] = v
- }
- entry.Data["level"] = entry.Level.String()
-
- // set type field
- if f.Type != "" {
- v, ok = entry.Data["type"]
- if ok {
- entry.Data["fields.type"] = v
- }
- entry.Data["type"] = f.Type
- }
-
- serialized, err := json.Marshal(entry.Data)
- if err != nil {
- return nil, fmt.Errorf("Failed to marshal fields to JSON, %v", err)
- }
- return append(serialized, '\n'), nil
-}
diff --git a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/hooks.go b/alpine/packages/go/vendor/github.com/Sirupsen/logrus/hooks.go
deleted file mode 100644
index 3f151cdc3..000000000
--- a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/hooks.go
+++ /dev/null
@@ -1,34 +0,0 @@
-package logrus
-
-// A hook to be fired when logging on the logging levels returned from
-// `Levels()` on your implementation of the interface. Note that this is not
-// fired in a goroutine or a channel with workers, you should handle such
-// functionality yourself if your call is non-blocking and you don't wish for
-// the logging calls for levels returned from `Levels()` to block.
-type Hook interface {
- Levels() []Level
- Fire(*Entry) error
-}
-
-// Internal type for storing the hooks on a logger instance.
-type LevelHooks map[Level][]Hook
-
-// Add a hook to an instance of logger. This is called with
-// `log.Hooks.Add(new(MyHook))` where `MyHook` implements the `Hook` interface.
-func (hooks LevelHooks) Add(hook Hook) {
- for _, level := range hook.Levels() {
- hooks[level] = append(hooks[level], hook)
- }
-}
-
-// Fire all the hooks for the passed level. Used by `entry.log` to fire
-// appropriate hooks for a log entry.
-func (hooks LevelHooks) Fire(level Level, entry *Entry) error {
- for _, hook := range hooks[level] {
- if err := hook.Fire(entry); err != nil {
- return err
- }
- }
-
- return nil
-}
diff --git a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/hooks/airbrake/airbrake.go b/alpine/packages/go/vendor/github.com/Sirupsen/logrus/hooks/airbrake/airbrake.go
deleted file mode 100644
index b0502c335..000000000
--- a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/hooks/airbrake/airbrake.go
+++ /dev/null
@@ -1,54 +0,0 @@
-package airbrake
-
-import (
- "errors"
- "fmt"
-
- "github.com/Sirupsen/logrus"
- "github.com/tobi/airbrake-go"
-)
-
-// AirbrakeHook to send exceptions to an exception-tracking service compatible
-// with the Airbrake API.
-type airbrakeHook struct {
- APIKey string
- Endpoint string
- Environment string
-}
-
-func NewHook(endpoint, apiKey, env string) *airbrakeHook {
- return &airbrakeHook{
- APIKey: apiKey,
- Endpoint: endpoint,
- Environment: env,
- }
-}
-
-func (hook *airbrakeHook) Fire(entry *logrus.Entry) error {
- airbrake.ApiKey = hook.APIKey
- airbrake.Endpoint = hook.Endpoint
- airbrake.Environment = hook.Environment
-
- var notifyErr error
- err, ok := entry.Data["error"].(error)
- if ok {
- notifyErr = err
- } else {
- notifyErr = errors.New(entry.Message)
- }
-
- airErr := airbrake.Notify(notifyErr)
- if airErr != nil {
- return fmt.Errorf("Failed to send error to Airbrake: %s", airErr)
- }
-
- return nil
-}
-
-func (hook *airbrakeHook) Levels() []logrus.Level {
- return []logrus.Level{
- logrus.ErrorLevel,
- logrus.FatalLevel,
- logrus.PanicLevel,
- }
-}
diff --git a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/hooks/bugsnag/bugsnag.go b/alpine/packages/go/vendor/github.com/Sirupsen/logrus/hooks/bugsnag/bugsnag.go
deleted file mode 100644
index d20a0f54a..000000000
--- a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/hooks/bugsnag/bugsnag.go
+++ /dev/null
@@ -1,68 +0,0 @@
-package logrus_bugsnag
-
-import (
- "errors"
-
- "github.com/Sirupsen/logrus"
- "github.com/bugsnag/bugsnag-go"
-)
-
-type bugsnagHook struct{}
-
-// ErrBugsnagUnconfigured is returned if NewBugsnagHook is called before
-// bugsnag.Configure. Bugsnag must be configured before the hook.
-var ErrBugsnagUnconfigured = errors.New("bugsnag must be configured before installing this logrus hook")
-
-// ErrBugsnagSendFailed indicates that the hook failed to submit an error to
-// bugsnag. The error was successfully generated, but `bugsnag.Notify()`
-// failed.
-type ErrBugsnagSendFailed struct {
- err error
-}
-
-func (e ErrBugsnagSendFailed) Error() string {
- return "failed to send error to Bugsnag: " + e.err.Error()
-}
-
-// NewBugsnagHook initializes a logrus hook which sends exceptions to an
-// exception-tracking service compatible with the Bugsnag API. Before using
-// this hook, you must call bugsnag.Configure(). The returned object should be
-// registered with a log via `AddHook()`
-//
-// Entries that trigger an Error, Fatal or Panic should now include an "error"
-// field to send to Bugsnag.
-func NewBugsnagHook() (*bugsnagHook, error) {
- if bugsnag.Config.APIKey == "" {
- return nil, ErrBugsnagUnconfigured
- }
- return &bugsnagHook{}, nil
-}
-
-// Fire forwards an error to Bugsnag. Given a logrus.Entry, it extracts the
-// "error" field (or the Message if the error isn't present) and sends it off.
-func (hook *bugsnagHook) Fire(entry *logrus.Entry) error {
- var notifyErr error
- err, ok := entry.Data["error"].(error)
- if ok {
- notifyErr = err
- } else {
- notifyErr = errors.New(entry.Message)
- }
-
- bugsnagErr := bugsnag.Notify(notifyErr)
- if bugsnagErr != nil {
- return ErrBugsnagSendFailed{bugsnagErr}
- }
-
- return nil
-}
-
-// Levels enumerates the log levels on which the error should be forwarded to
-// bugsnag: everything at or above the "Error" level.
-func (hook *bugsnagHook) Levels() []logrus.Level {
- return []logrus.Level{
- logrus.ErrorLevel,
- logrus.FatalLevel,
- logrus.PanicLevel,
- }
-}
diff --git a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/hooks/papertrail/README.md b/alpine/packages/go/vendor/github.com/Sirupsen/logrus/hooks/papertrail/README.md
deleted file mode 100644
index ae61e9229..000000000
--- a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/hooks/papertrail/README.md
+++ /dev/null
@@ -1,28 +0,0 @@
-# Papertrail Hook for Logrus
-
-[Papertrail](https://papertrailapp.com) provides hosted log management. Once stored in Papertrail, you can [group](http://help.papertrailapp.com/kb/how-it-works/groups/) your logs on various dimensions, [search](http://help.papertrailapp.com/kb/how-it-works/search-syntax) them, and trigger [alerts](http://help.papertrailapp.com/kb/how-it-works/alerts).
-
-In most deployments, you'll want to send logs to Papertrail via their [remote_syslog](http://help.papertrailapp.com/kb/configuration/configuring-centralized-logging-from-text-log-files-in-unix/) daemon, which requires no application-specific configuration. This hook is intended for relatively low-volume logging, likely in managed cloud hosting deployments where installing `remote_syslog` is not possible.
-
-## Usage
-
-You can find your Papertrail UDP port on your [Papertrail account page](https://papertrailapp.com/account/destinations). Substitute it below for `YOUR_PAPERTRAIL_UDP_PORT`.
-
-For `YOUR_APP_NAME`, substitute a short string that will readily identify your application or service in the logs.
-
-```go
-import (
- "log/syslog"
- "github.com/Sirupsen/logrus"
- "github.com/Sirupsen/logrus/hooks/papertrail"
-)
-
-func main() {
- log := logrus.New()
- hook, err := logrus_papertrail.NewPapertrailHook("logs.papertrailapp.com", YOUR_PAPERTRAIL_UDP_PORT, YOUR_APP_NAME)
-
- if err == nil {
- log.Hooks.Add(hook)
- }
-}
-```
diff --git a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/hooks/papertrail/papertrail.go b/alpine/packages/go/vendor/github.com/Sirupsen/logrus/hooks/papertrail/papertrail.go
deleted file mode 100644
index c0f10c1bd..000000000
--- a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/hooks/papertrail/papertrail.go
+++ /dev/null
@@ -1,55 +0,0 @@
-package logrus_papertrail
-
-import (
- "fmt"
- "net"
- "os"
- "time"
-
- "github.com/Sirupsen/logrus"
-)
-
-const (
- format = "Jan 2 15:04:05"
-)
-
-// PapertrailHook to send logs to a logging service compatible with the Papertrail API.
-type PapertrailHook struct {
- Host string
- Port int
- AppName string
- UDPConn net.Conn
-}
-
-// NewPapertrailHook creates a hook to be added to an instance of logger.
-func NewPapertrailHook(host string, port int, appName string) (*PapertrailHook, error) {
- conn, err := net.Dial("udp", fmt.Sprintf("%s:%d", host, port))
- return &PapertrailHook{host, port, appName, conn}, err
-}
-
-// Fire is called when a log event is fired.
-func (hook *PapertrailHook) Fire(entry *logrus.Entry) error {
- date := time.Now().Format(format)
- msg, _ := entry.String()
- payload := fmt.Sprintf("<22> %s %s: %s", date, hook.AppName, msg)
-
- bytesWritten, err := hook.UDPConn.Write([]byte(payload))
- if err != nil {
- fmt.Fprintf(os.Stderr, "Unable to send log line to Papertrail via UDP. Wrote %d bytes before error: %v", bytesWritten, err)
- return err
- }
-
- return nil
-}
-
-// Levels returns the available logging levels.
-func (hook *PapertrailHook) Levels() []logrus.Level {
- return []logrus.Level{
- logrus.PanicLevel,
- logrus.FatalLevel,
- logrus.ErrorLevel,
- logrus.WarnLevel,
- logrus.InfoLevel,
- logrus.DebugLevel,
- }
-}
diff --git a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/hooks/sentry/README.md b/alpine/packages/go/vendor/github.com/Sirupsen/logrus/hooks/sentry/README.md
deleted file mode 100644
index 31de6540a..000000000
--- a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/hooks/sentry/README.md
+++ /dev/null
@@ -1,111 +0,0 @@
-# Sentry Hook for Logrus
-
-[Sentry](https://getsentry.com) provides both self-hosted and hosted
-solutions for exception tracking.
-Both client and server are
-[open source](https://github.com/getsentry/sentry).
-
-## Usage
-
-Every sentry application defined on the server gets a different
-[DSN](https://www.getsentry.com/docs/). In the example below replace
-`YOUR_DSN` with the one created for your application.
-
-```go
-import (
- "github.com/Sirupsen/logrus"
- "github.com/Sirupsen/logrus/hooks/sentry"
-)
-
-func main() {
- log := logrus.New()
- hook, err := logrus_sentry.NewSentryHook(YOUR_DSN, []logrus.Level{
- logrus.PanicLevel,
- logrus.FatalLevel,
- logrus.ErrorLevel,
- })
-
- if err == nil {
- log.Hooks.Add(hook)
- }
-}
-```
-
-If you wish to initialize a SentryHook with tags, you can use the `NewWithTagsSentryHook` constructor to provide default tags:
-
-```go
-tags := map[string]string{
- "site": "example.com",
-}
-levels := []logrus.Level{
- logrus.PanicLevel,
- logrus.FatalLevel,
- logrus.ErrorLevel,
-}
-hook, err := logrus_sentry.NewWithTagsSentryHook(YOUR_DSN, tags, levels)
-
-```
-
-If you wish to initialize a SentryHook with an already initialized raven client, you can use
-the `NewWithClientSentryHook` constructor:
-
-```go
-import (
- "github.com/Sirupsen/logrus"
- "github.com/Sirupsen/logrus/hooks/sentry"
- "github.com/getsentry/raven-go"
-)
-
-func main() {
- log := logrus.New()
-
- client, err := raven.New(YOUR_DSN)
- if err != nil {
- log.Fatal(err)
- }
-
- hook, err := logrus_sentry.NewWithClientSentryHook(client, []logrus.Level{
- logrus.PanicLevel,
- logrus.FatalLevel,
- logrus.ErrorLevel,
- })
-
- if err == nil {
- log.Hooks.Add(hook)
- }
-}
-
-hook, err := NewWithClientSentryHook(client, []logrus.Level{
- logrus.ErrorLevel,
-})
-```
-
-## Special fields
-
-Some logrus fields have a special meaning in this hook,
-these are `server_name`, `logger` and `http_request`.
-When logs are sent to sentry these fields are treated differently.
-- `server_name` (also known as hostname) is the name of the server which
-is logging the event (hostname.example.com)
-- `logger` is the part of the application which is logging the event.
-In go this usually means setting it to the name of the package.
-- `http_request` is the in-coming request(*http.Request). The detailed request data are sent to Sentry.
-
-## Timeout
-
-`Timeout` is the time the sentry hook will wait for a response
-from the sentry server.
-
-If this time elapses with no response from
-the server an error will be returned.
-
-If `Timeout` is set to 0 the SentryHook will not wait for a reply
-and will assume a correct delivery.
-
-The SentryHook has a default timeout of `100 milliseconds` when created
-with a call to `NewSentryHook`. This can be changed by assigning a value to the `Timeout` field:
-
-```go
-hook, _ := logrus_sentry.NewSentryHook(...)
-hook.Timeout = 20*time.Second
-```
diff --git a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/hooks/sentry/sentry.go b/alpine/packages/go/vendor/github.com/Sirupsen/logrus/hooks/sentry/sentry.go
deleted file mode 100644
index cf88098a8..000000000
--- a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/hooks/sentry/sentry.go
+++ /dev/null
@@ -1,137 +0,0 @@
-package logrus_sentry
-
-import (
- "fmt"
- "net/http"
- "time"
-
- "github.com/Sirupsen/logrus"
- "github.com/getsentry/raven-go"
-)
-
-var (
- severityMap = map[logrus.Level]raven.Severity{
- logrus.DebugLevel: raven.DEBUG,
- logrus.InfoLevel: raven.INFO,
- logrus.WarnLevel: raven.WARNING,
- logrus.ErrorLevel: raven.ERROR,
- logrus.FatalLevel: raven.FATAL,
- logrus.PanicLevel: raven.FATAL,
- }
-)
-
-func getAndDel(d logrus.Fields, key string) (string, bool) {
- var (
- ok bool
- v interface{}
- val string
- )
- if v, ok = d[key]; !ok {
- return "", false
- }
-
- if val, ok = v.(string); !ok {
- return "", false
- }
- delete(d, key)
- return val, true
-}
-
-func getAndDelRequest(d logrus.Fields, key string) (*http.Request, bool) {
- var (
- ok bool
- v interface{}
- req *http.Request
- )
- if v, ok = d[key]; !ok {
- return nil, false
- }
- if req, ok = v.(*http.Request); !ok || req == nil {
- return nil, false
- }
- delete(d, key)
- return req, true
-}
-
-// SentryHook delivers logs to a sentry server.
-type SentryHook struct {
- // Timeout sets the time to wait for a delivery error from the sentry server.
- // If this is set to zero the server will not wait for any response and will
- // consider the message correctly sent
- Timeout time.Duration
-
- client *raven.Client
- levels []logrus.Level
-}
-
-// NewSentryHook creates a hook to be added to an instance of logger
-// and initializes the raven client.
-// This method sets the timeout to 100 milliseconds.
-func NewSentryHook(DSN string, levels []logrus.Level) (*SentryHook, error) {
- client, err := raven.New(DSN)
- if err != nil {
- return nil, err
- }
- return &SentryHook{100 * time.Millisecond, client, levels}, nil
-}
-
-// NewWithTagsSentryHook creates a hook with tags to be added to an instance
-// of logger and initializes the raven client. This method sets the timeout to
-// 100 milliseconds.
-func NewWithTagsSentryHook(DSN string, tags map[string]string, levels []logrus.Level) (*SentryHook, error) {
- client, err := raven.NewWithTags(DSN, tags)
- if err != nil {
- return nil, err
- }
- return &SentryHook{100 * time.Millisecond, client, levels}, nil
-}
-
-// NewWithClientSentryHook creates a hook using an initialized raven client.
-// This method sets the timeout to 100 milliseconds.
-func NewWithClientSentryHook(client *raven.Client, levels []logrus.Level) (*SentryHook, error) {
- return &SentryHook{100 * time.Millisecond, client, levels}, nil
-}
-
-// Called when an event should be sent to sentry
-// Special fields that sentry uses to give more information to the server
-// are extracted from entry.Data (if they are found)
-// These fields are: logger, server_name and http_request
-func (hook *SentryHook) Fire(entry *logrus.Entry) error {
- packet := &raven.Packet{
- Message: entry.Message,
- Timestamp: raven.Timestamp(entry.Time),
- Level: severityMap[entry.Level],
- Platform: "go",
- }
-
- d := entry.Data
-
- if logger, ok := getAndDel(d, "logger"); ok {
- packet.Logger = logger
- }
- if serverName, ok := getAndDel(d, "server_name"); ok {
- packet.ServerName = serverName
- }
- if req, ok := getAndDelRequest(d, "http_request"); ok {
- packet.Interfaces = append(packet.Interfaces, raven.NewHttp(req))
- }
- packet.Extra = map[string]interface{}(d)
-
- _, errCh := hook.client.Capture(packet, nil)
- timeout := hook.Timeout
- if timeout != 0 {
- timeoutCh := time.After(timeout)
- select {
- case err := <-errCh:
- return err
- case <-timeoutCh:
- return fmt.Errorf("no response from sentry server in %s", timeout)
- }
- }
- return nil
-}
-
-// Levels returns the available logging levels.
-func (hook *SentryHook) Levels() []logrus.Level {
- return hook.levels
-}
diff --git a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/hooks/syslog/README.md b/alpine/packages/go/vendor/github.com/Sirupsen/logrus/hooks/syslog/README.md
deleted file mode 100644
index 4dbb8e729..000000000
--- a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/hooks/syslog/README.md
+++ /dev/null
@@ -1,20 +0,0 @@
-# Syslog Hooks for Logrus
-
-## Usage
-
-```go
-import (
- "log/syslog"
- "github.com/Sirupsen/logrus"
- logrus_syslog "github.com/Sirupsen/logrus/hooks/syslog"
-)
-
-func main() {
- log := logrus.New()
- hook, err := logrus_syslog.NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "")
-
- if err == nil {
- log.Hooks.Add(hook)
- }
-}
-```
diff --git a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/hooks/syslog/syslog.go b/alpine/packages/go/vendor/github.com/Sirupsen/logrus/hooks/syslog/syslog.go
deleted file mode 100644
index b6fa37462..000000000
--- a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/hooks/syslog/syslog.go
+++ /dev/null
@@ -1,59 +0,0 @@
-package logrus_syslog
-
-import (
- "fmt"
- "github.com/Sirupsen/logrus"
- "log/syslog"
- "os"
-)
-
-// SyslogHook to send logs via syslog.
-type SyslogHook struct {
- Writer *syslog.Writer
- SyslogNetwork string
- SyslogRaddr string
-}
-
-// Creates a hook to be added to an instance of logger. This is called with
-// `hook, err := NewSyslogHook("udp", "localhost:514", syslog.LOG_DEBUG, "")`
-// `if err == nil { log.Hooks.Add(hook) }`
-func NewSyslogHook(network, raddr string, priority syslog.Priority, tag string) (*SyslogHook, error) {
- w, err := syslog.Dial(network, raddr, priority, tag)
- return &SyslogHook{w, network, raddr}, err
-}
-
-func (hook *SyslogHook) Fire(entry *logrus.Entry) error {
- line, err := entry.String()
- if err != nil {
- fmt.Fprintf(os.Stderr, "Unable to read entry, %v", err)
- return err
- }
-
- switch entry.Level {
- case logrus.PanicLevel:
- return hook.Writer.Crit(line)
- case logrus.FatalLevel:
- return hook.Writer.Crit(line)
- case logrus.ErrorLevel:
- return hook.Writer.Err(line)
- case logrus.WarnLevel:
- return hook.Writer.Warning(line)
- case logrus.InfoLevel:
- return hook.Writer.Info(line)
- case logrus.DebugLevel:
- return hook.Writer.Debug(line)
- default:
- return nil
- }
-}
-
-func (hook *SyslogHook) Levels() []logrus.Level {
- return []logrus.Level{
- logrus.PanicLevel,
- logrus.FatalLevel,
- logrus.ErrorLevel,
- logrus.WarnLevel,
- logrus.InfoLevel,
- logrus.DebugLevel,
- }
-}
diff --git a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/json_formatter.go b/alpine/packages/go/vendor/github.com/Sirupsen/logrus/json_formatter.go
deleted file mode 100644
index 2ad6dc5cf..000000000
--- a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/json_formatter.go
+++ /dev/null
@@ -1,41 +0,0 @@
-package logrus
-
-import (
- "encoding/json"
- "fmt"
-)
-
-type JSONFormatter struct {
- // TimestampFormat sets the format used for marshaling timestamps.
- TimestampFormat string
-}
-
-func (f *JSONFormatter) Format(entry *Entry) ([]byte, error) {
- data := make(Fields, len(entry.Data)+3)
- for k, v := range entry.Data {
- switch v := v.(type) {
- case error:
- // Otherwise errors are ignored by `encoding/json`
- // https://github.com/Sirupsen/logrus/issues/137
- data[k] = v.Error()
- default:
- data[k] = v
- }
- }
- prefixFieldClashes(data)
-
- timestampFormat := f.TimestampFormat
- if timestampFormat == "" {
- timestampFormat = DefaultTimestampFormat
- }
-
- data["time"] = entry.Time.Format(timestampFormat)
- data["msg"] = entry.Message
- data["level"] = entry.Level.String()
-
- serialized, err := json.Marshal(data)
- if err != nil {
- return nil, fmt.Errorf("Failed to marshal fields to JSON, %v", err)
- }
- return append(serialized, '\n'), nil
-}
diff --git a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/logger.go b/alpine/packages/go/vendor/github.com/Sirupsen/logrus/logger.go
deleted file mode 100644
index fd9804c64..000000000
--- a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/logger.go
+++ /dev/null
@@ -1,206 +0,0 @@
-package logrus
-
-import (
- "io"
- "os"
- "sync"
-)
-
-type Logger struct {
- // The logs are `io.Copy`'d to this in a mutex. It's common to set this to a
- // file, or leave it default which is `os.Stderr`. You can also set this to
- // something more adventorous, such as logging to Kafka.
- Out io.Writer
- // Hooks for the logger instance. These allow firing events based on logging
- // levels and log entries. For example, to send errors to an error tracking
- // service, log to StatsD or dump the core on fatal errors.
- Hooks LevelHooks
- // All log entries pass through the formatter before logged to Out. The
- // included formatters are `TextFormatter` and `JSONFormatter` for which
- // TextFormatter is the default. In development (when a TTY is attached) it
- // logs with colors, but to a file it wouldn't. You can easily implement your
- // own that implements the `Formatter` interface, see the `README` or included
- // formatters for examples.
- Formatter Formatter
- // The logging level the logger should log at. This is typically (and defaults
- // to) `logrus.Info`, which allows Info(), Warn(), Error() and Fatal() to be
- // logged. `logrus.Debug` is useful in
- Level Level
- // Used to sync writing to the log.
- mu sync.Mutex
-}
-
-// Creates a new logger. Configuration should be set by changing `Formatter`,
-// `Out` and `Hooks` directly on the default logger instance. You can also just
-// instantiate your own:
-//
-// var log = &Logger{
-// Out: os.Stderr,
-// Formatter: new(JSONFormatter),
-// Hooks: make(LevelHooks),
-// Level: logrus.DebugLevel,
-// }
-//
-// It's recommended to make this a global instance called `log`.
-func New() *Logger {
- return &Logger{
- Out: os.Stderr,
- Formatter: new(TextFormatter),
- Hooks: make(LevelHooks),
- Level: InfoLevel,
- }
-}
-
-// Adds a field to the log entry, note that you it doesn't log until you call
-// Debug, Print, Info, Warn, Fatal or Panic. It only creates a log entry.
-// If you want multiple fields, use `WithFields`.
-func (logger *Logger) WithField(key string, value interface{}) *Entry {
- return NewEntry(logger).WithField(key, value)
-}
-
-// Adds a struct of fields to the log entry. All it does is call `WithField` for
-// each `Field`.
-func (logger *Logger) WithFields(fields Fields) *Entry {
- return NewEntry(logger).WithFields(fields)
-}
-
-func (logger *Logger) Debugf(format string, args ...interface{}) {
- if logger.Level >= DebugLevel {
- NewEntry(logger).Debugf(format, args...)
- }
-}
-
-func (logger *Logger) Infof(format string, args ...interface{}) {
- if logger.Level >= InfoLevel {
- NewEntry(logger).Infof(format, args...)
- }
-}
-
-func (logger *Logger) Printf(format string, args ...interface{}) {
- NewEntry(logger).Printf(format, args...)
-}
-
-func (logger *Logger) Warnf(format string, args ...interface{}) {
- if logger.Level >= WarnLevel {
- NewEntry(logger).Warnf(format, args...)
- }
-}
-
-func (logger *Logger) Warningf(format string, args ...interface{}) {
- if logger.Level >= WarnLevel {
- NewEntry(logger).Warnf(format, args...)
- }
-}
-
-func (logger *Logger) Errorf(format string, args ...interface{}) {
- if logger.Level >= ErrorLevel {
- NewEntry(logger).Errorf(format, args...)
- }
-}
-
-func (logger *Logger) Fatalf(format string, args ...interface{}) {
- if logger.Level >= FatalLevel {
- NewEntry(logger).Fatalf(format, args...)
- }
- os.Exit(1)
-}
-
-func (logger *Logger) Panicf(format string, args ...interface{}) {
- if logger.Level >= PanicLevel {
- NewEntry(logger).Panicf(format, args...)
- }
-}
-
-func (logger *Logger) Debug(args ...interface{}) {
- if logger.Level >= DebugLevel {
- NewEntry(logger).Debug(args...)
- }
-}
-
-func (logger *Logger) Info(args ...interface{}) {
- if logger.Level >= InfoLevel {
- NewEntry(logger).Info(args...)
- }
-}
-
-func (logger *Logger) Print(args ...interface{}) {
- NewEntry(logger).Info(args...)
-}
-
-func (logger *Logger) Warn(args ...interface{}) {
- if logger.Level >= WarnLevel {
- NewEntry(logger).Warn(args...)
- }
-}
-
-func (logger *Logger) Warning(args ...interface{}) {
- if logger.Level >= WarnLevel {
- NewEntry(logger).Warn(args...)
- }
-}
-
-func (logger *Logger) Error(args ...interface{}) {
- if logger.Level >= ErrorLevel {
- NewEntry(logger).Error(args...)
- }
-}
-
-func (logger *Logger) Fatal(args ...interface{}) {
- if logger.Level >= FatalLevel {
- NewEntry(logger).Fatal(args...)
- }
- os.Exit(1)
-}
-
-func (logger *Logger) Panic(args ...interface{}) {
- if logger.Level >= PanicLevel {
- NewEntry(logger).Panic(args...)
- }
-}
-
-func (logger *Logger) Debugln(args ...interface{}) {
- if logger.Level >= DebugLevel {
- NewEntry(logger).Debugln(args...)
- }
-}
-
-func (logger *Logger) Infoln(args ...interface{}) {
- if logger.Level >= InfoLevel {
- NewEntry(logger).Infoln(args...)
- }
-}
-
-func (logger *Logger) Println(args ...interface{}) {
- NewEntry(logger).Println(args...)
-}
-
-func (logger *Logger) Warnln(args ...interface{}) {
- if logger.Level >= WarnLevel {
- NewEntry(logger).Warnln(args...)
- }
-}
-
-func (logger *Logger) Warningln(args ...interface{}) {
- if logger.Level >= WarnLevel {
- NewEntry(logger).Warnln(args...)
- }
-}
-
-func (logger *Logger) Errorln(args ...interface{}) {
- if logger.Level >= ErrorLevel {
- NewEntry(logger).Errorln(args...)
- }
-}
-
-func (logger *Logger) Fatalln(args ...interface{}) {
- if logger.Level >= FatalLevel {
- NewEntry(logger).Fatalln(args...)
- }
- os.Exit(1)
-}
-
-func (logger *Logger) Panicln(args ...interface{}) {
- if logger.Level >= PanicLevel {
- NewEntry(logger).Panicln(args...)
- }
-}
diff --git a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/logrus.go b/alpine/packages/go/vendor/github.com/Sirupsen/logrus/logrus.go
deleted file mode 100644
index 0c09fbc26..000000000
--- a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/logrus.go
+++ /dev/null
@@ -1,98 +0,0 @@
-package logrus
-
-import (
- "fmt"
- "log"
-)
-
-// Fields type, used to pass to `WithFields`.
-type Fields map[string]interface{}
-
-// Level type
-type Level uint8
-
-// Convert the Level to a string. E.g. PanicLevel becomes "panic".
-func (level Level) String() string {
- switch level {
- case DebugLevel:
- return "debug"
- case InfoLevel:
- return "info"
- case WarnLevel:
- return "warning"
- case ErrorLevel:
- return "error"
- case FatalLevel:
- return "fatal"
- case PanicLevel:
- return "panic"
- }
-
- return "unknown"
-}
-
-// ParseLevel takes a string level and returns the Logrus log level constant.
-func ParseLevel(lvl string) (Level, error) {
- switch lvl {
- case "panic":
- return PanicLevel, nil
- case "fatal":
- return FatalLevel, nil
- case "error":
- return ErrorLevel, nil
- case "warn", "warning":
- return WarnLevel, nil
- case "info":
- return InfoLevel, nil
- case "debug":
- return DebugLevel, nil
- }
-
- var l Level
- return l, fmt.Errorf("not a valid logrus Level: %q", lvl)
-}
-
-// These are the different logging levels. You can set the logging level to log
-// on your instance of logger, obtained with `logrus.New()`.
-const (
- // PanicLevel level, highest level of severity. Logs and then calls panic with the
- // message passed to Debug, Info, ...
- PanicLevel Level = iota
- // FatalLevel level. Logs and then calls `os.Exit(1)`. It will exit even if the
- // logging level is set to Panic.
- FatalLevel
- // ErrorLevel level. Logs. Used for errors that should definitely be noted.
- // Commonly used for hooks to send errors to an error tracking service.
- ErrorLevel
- // WarnLevel level. Non-critical entries that deserve eyes.
- WarnLevel
- // InfoLevel level. General operational entries about what's going on inside the
- // application.
- InfoLevel
- // DebugLevel level. Usually only enabled when debugging. Very verbose logging.
- DebugLevel
-)
-
-// Won't compile if StdLogger can't be realized by a log.Logger
-var (
- _ StdLogger = &log.Logger{}
- _ StdLogger = &Entry{}
- _ StdLogger = &Logger{}
-)
-
-// StdLogger is what your logrus-enabled library should take, that way
-// it'll accept a stdlib logger and a logrus logger. There's no standard
-// interface, this is the closest we get, unfortunately.
-type StdLogger interface {
- Print(...interface{})
- Printf(string, ...interface{})
- Println(...interface{})
-
- Fatal(...interface{})
- Fatalf(string, ...interface{})
- Fatalln(...interface{})
-
- Panic(...interface{})
- Panicf(string, ...interface{})
- Panicln(...interface{})
-}
diff --git a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/terminal_bsd.go b/alpine/packages/go/vendor/github.com/Sirupsen/logrus/terminal_bsd.go
deleted file mode 100644
index 71f8d67a5..000000000
--- a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/terminal_bsd.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// +build darwin freebsd openbsd netbsd dragonfly
-
-package logrus
-
-import "syscall"
-
-const ioctlReadTermios = syscall.TIOCGETA
-
-type Termios syscall.Termios
diff --git a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/terminal_linux.go b/alpine/packages/go/vendor/github.com/Sirupsen/logrus/terminal_linux.go
deleted file mode 100644
index a2c0b40db..000000000
--- a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/terminal_linux.go
+++ /dev/null
@@ -1,12 +0,0 @@
-// Based on ssh/terminal:
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package logrus
-
-import "syscall"
-
-const ioctlReadTermios = syscall.TCGETS
-
-type Termios syscall.Termios
diff --git a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/terminal_notwindows.go b/alpine/packages/go/vendor/github.com/Sirupsen/logrus/terminal_notwindows.go
deleted file mode 100644
index 4bb537602..000000000
--- a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/terminal_notwindows.go
+++ /dev/null
@@ -1,21 +0,0 @@
-// Based on ssh/terminal:
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build linux darwin freebsd openbsd netbsd dragonfly
-
-package logrus
-
-import (
- "syscall"
- "unsafe"
-)
-
-// IsTerminal returns true if the given file descriptor is a terminal.
-func IsTerminal() bool {
- fd := syscall.Stdout
- var termios Termios
- _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0)
- return err == 0
-}
diff --git a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/terminal_windows.go b/alpine/packages/go/vendor/github.com/Sirupsen/logrus/terminal_windows.go
deleted file mode 100644
index 2e09f6f7e..000000000
--- a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/terminal_windows.go
+++ /dev/null
@@ -1,27 +0,0 @@
-// Based on ssh/terminal:
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build windows
-
-package logrus
-
-import (
- "syscall"
- "unsafe"
-)
-
-var kernel32 = syscall.NewLazyDLL("kernel32.dll")
-
-var (
- procGetConsoleMode = kernel32.NewProc("GetConsoleMode")
-)
-
-// IsTerminal returns true if the given file descriptor is a terminal.
-func IsTerminal() bool {
- fd := syscall.Stdout
- var st uint32
- r, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, uintptr(fd), uintptr(unsafe.Pointer(&st)), 0)
- return r != 0 && e == 0
-}
diff --git a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/text_formatter.go b/alpine/packages/go/vendor/github.com/Sirupsen/logrus/text_formatter.go
deleted file mode 100644
index 17cc29848..000000000
--- a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/text_formatter.go
+++ /dev/null
@@ -1,159 +0,0 @@
-package logrus
-
-import (
- "bytes"
- "fmt"
- "runtime"
- "sort"
- "strings"
- "time"
-)
-
-const (
- nocolor = 0
- red = 31
- green = 32
- yellow = 33
- blue = 34
- gray = 37
-)
-
-var (
- baseTimestamp time.Time
- isTerminal bool
-)
-
-func init() {
- baseTimestamp = time.Now()
- isTerminal = IsTerminal()
-}
-
-func miniTS() int {
- return int(time.Since(baseTimestamp) / time.Second)
-}
-
-type TextFormatter struct {
- // Set to true to bypass checking for a TTY before outputting colors.
- ForceColors bool
-
- // Force disabling colors.
- DisableColors bool
-
- // Disable timestamp logging. useful when output is redirected to logging
- // system that already adds timestamps.
- DisableTimestamp bool
-
- // Enable logging the full timestamp when a TTY is attached instead of just
- // the time passed since beginning of execution.
- FullTimestamp bool
-
- // TimestampFormat to use for display when a full timestamp is printed
- TimestampFormat string
-
- // The fields are sorted by default for a consistent output. For applications
- // that log extremely frequently and don't use the JSON formatter this may not
- // be desired.
- DisableSorting bool
-}
-
-func (f *TextFormatter) Format(entry *Entry) ([]byte, error) {
- var keys []string = make([]string, 0, len(entry.Data))
- for k := range entry.Data {
- keys = append(keys, k)
- }
-
- if !f.DisableSorting {
- sort.Strings(keys)
- }
-
- b := &bytes.Buffer{}
-
- prefixFieldClashes(entry.Data)
-
- isColorTerminal := isTerminal && (runtime.GOOS != "windows")
- isColored := (f.ForceColors || isColorTerminal) && !f.DisableColors
-
- timestampFormat := f.TimestampFormat
- if timestampFormat == "" {
- timestampFormat = DefaultTimestampFormat
- }
- if isColored {
- f.printColored(b, entry, keys, timestampFormat)
- } else {
- if !f.DisableTimestamp {
- f.appendKeyValue(b, "time", entry.Time.Format(timestampFormat))
- }
- f.appendKeyValue(b, "level", entry.Level.String())
- f.appendKeyValue(b, "msg", entry.Message)
- for _, key := range keys {
- f.appendKeyValue(b, key, entry.Data[key])
- }
- }
-
- b.WriteByte('\n')
- return b.Bytes(), nil
-}
-
-func (f *TextFormatter) printColored(b *bytes.Buffer, entry *Entry, keys []string, timestampFormat string) {
- var levelColor int
- switch entry.Level {
- case DebugLevel:
- levelColor = gray
- case WarnLevel:
- levelColor = yellow
- case ErrorLevel, FatalLevel, PanicLevel:
- levelColor = red
- default:
- levelColor = blue
- }
-
- levelText := strings.ToUpper(entry.Level.String())[0:4]
-
- if !f.FullTimestamp {
- fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m[%04d] %-44s ", levelColor, levelText, miniTS(), entry.Message)
- } else {
- fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m[%s] %-44s ", levelColor, levelText, entry.Time.Format(timestampFormat), entry.Message)
- }
- for _, k := range keys {
- v := entry.Data[k]
- fmt.Fprintf(b, " \x1b[%dm%s\x1b[0m=%+v", levelColor, k, v)
- }
-}
-
-func needsQuoting(text string) bool {
- for _, ch := range text {
- if !((ch >= 'a' && ch <= 'z') ||
- (ch >= 'A' && ch <= 'Z') ||
- (ch >= '0' && ch <= '9') ||
- ch == '-' || ch == '.') {
- return false
- }
- }
- return true
-}
-
-func (f *TextFormatter) appendKeyValue(b *bytes.Buffer, key string, value interface{}) {
-
- b.WriteString(key)
- b.WriteByte('=')
-
- switch value := value.(type) {
- case string:
- if needsQuoting(value) {
- b.WriteString(value)
- } else {
- fmt.Fprintf(b, "%q", value)
- }
- case error:
- errmsg := value.Error()
- if needsQuoting(errmsg) {
- b.WriteString(errmsg)
- } else {
- fmt.Fprintf(b, "%q", value)
- }
- default:
- fmt.Fprint(b, value)
- }
-
- b.WriteByte(' ')
-}
diff --git a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/writer.go b/alpine/packages/go/vendor/github.com/Sirupsen/logrus/writer.go
deleted file mode 100644
index 1e30b1c75..000000000
--- a/alpine/packages/go/vendor/github.com/Sirupsen/logrus/writer.go
+++ /dev/null
@@ -1,31 +0,0 @@
-package logrus
-
-import (
- "bufio"
- "io"
- "runtime"
-)
-
-func (logger *Logger) Writer() *io.PipeWriter {
- reader, writer := io.Pipe()
-
- go logger.writerScanner(reader)
- runtime.SetFinalizer(writer, writerFinalizer)
-
- return writer
-}
-
-func (logger *Logger) writerScanner(reader *io.PipeReader) {
- scanner := bufio.NewScanner(reader)
- for scanner.Scan() {
- logger.Print(scanner.Text())
- }
- if err := scanner.Err(); err != nil {
- logger.Errorf("Error while reading from Writer: %s", err)
- }
- reader.Close()
-}
-
-func writerFinalizer(writer *io.PipeWriter) {
- writer.Close()
-}
diff --git a/alpine/packages/hvtools/.gitignore b/alpine/packages/hvtools/.gitignore
index c69db8318..cf40cde3b 100644
--- a/alpine/packages/hvtools/.gitignore
+++ b/alpine/packages/hvtools/.gitignore
@@ -1,4 +1,2 @@
-/hv_fcopy_daemon
-/hv_kvp_daemon
-/hv_vss_daemon
-/hvtools.tar.gz
+sbin/
+usr/
diff --git a/alpine/packages/hvtools/Dockerfile b/alpine/packages/hvtools/Dockerfile
index b69f9963c..49e8a932a 100644
--- a/alpine/packages/hvtools/Dockerfile
+++ b/alpine/packages/hvtools/Dockerfile
@@ -1,9 +1,8 @@
-FROM mobylinux/alpine-build-c:1b53976210ba819823eda5b1d0d3ea337772e97b
-
-RUN mkdir -p /hvtools
+FROM mobylinux/alpine-build-c:1ea690a7438cdd8a5965eaa034e0a0c521d9cb40
COPY src /hvtools/
-RUN tar czvf /hvtools.tar.gz hvtools
WORKDIR /hvtools
RUN make
+
+CMD ["tar", "cf", "-", "hv_fcopy_daemon", "hv_kvp_daemon", "hv_vss_daemon"]
diff --git a/alpine/packages/hvtools/Makefile b/alpine/packages/hvtools/Makefile
index 3c1565733..936858ccb 100644
--- a/alpine/packages/hvtools/Makefile
+++ b/alpine/packages/hvtools/Makefile
@@ -1,13 +1,14 @@
-all: hvtools
+all: sbin/hv_fcopy_daemon usr/share/src/hvtools.tar.gz
-hvtools: Dockerfile src/*
- docker build -t hvtools:build .
- docker run --rm hvtools:build cat /hvtools.tar.gz > hvtools.tar.gz
- docker run --rm hvtools:build cat /hvtools/hv_fcopy_daemon > hv_fcopy_daemon
- docker run --rm hvtools:build cat /hvtools/hv_kvp_daemon > hv_kvp_daemon
- docker run --rm hvtools:build cat /hvtools/hv_vss_daemon > hv_vss_daemon
- chmod 755 hv_fcopy_daemon hv_kvp_daemon hv_vss_daemon
+sbin/hv_fcopy_daemon: Dockerfile src/*
+ tar cf - Dockerfile src | docker build -t hvtools:build -
+ docker run --rm --net=none hvtools:build | tar xf - -C sbin
+
+usr/share/src/hvtools.tar.gz: src/*
+ mkdir -p usr/share/src/
+ tar czf usr/share/src/hvtools.tar.gz src
clean:
- rm -f hv_fcopy_daemon hv_kvp_daemon hv_vss_daemon
- docker images -q hvtools:build | xargs docker rmi -f || true
+ rm -rf usr sbin/hv_fcopy_daemon sbin/hv_kvp_daemon sbin/hv_vss_daemon
+
+.DELETE_ON_ERROR:
diff --git a/alpine/packages/hvtools/hv_get_dhcp_info b/alpine/packages/hvtools/sbin/hv_get_dhcp_info
similarity index 100%
rename from alpine/packages/hvtools/hv_get_dhcp_info
rename to alpine/packages/hvtools/sbin/hv_get_dhcp_info
diff --git a/alpine/packages/hvtools/hv_get_dns_info b/alpine/packages/hvtools/sbin/hv_get_dns_info
similarity index 100%
rename from alpine/packages/hvtools/hv_get_dns_info
rename to alpine/packages/hvtools/sbin/hv_get_dns_info
diff --git a/alpine/packages/hvtools/hv_set_ifconfig b/alpine/packages/hvtools/sbin/hv_set_ifconfig
similarity index 100%
rename from alpine/packages/hvtools/hv_set_ifconfig
rename to alpine/packages/hvtools/sbin/hv_set_ifconfig
diff --git a/alpine/packages/iptables/Dockerfile b/alpine/packages/iptables/Dockerfile
index 6c6ea1b3e..9b09fea1e 100644
--- a/alpine/packages/iptables/Dockerfile
+++ b/alpine/packages/iptables/Dockerfile
@@ -5,3 +5,4 @@ WORKDIR /app
ADD . /app
RUN sudo chown -R opam /app
RUN opam config exec -- ocamlfind ocamlopt -package unix,astring,syslog -linkpkg -o iptables main.ml
+CMD ["tar", "cf", "-", "iptables"]
diff --git a/alpine/packages/iptables/Makefile b/alpine/packages/iptables/Makefile
index df248cc0a..0965a9f7d 100644
--- a/alpine/packages/iptables/Makefile
+++ b/alpine/packages/iptables/Makefile
@@ -1,9 +1,10 @@
-all: iptables
+all: usr/local/sbin/iptables
-iptables: Dockerfile main.ml
+usr/local/sbin/iptables: Dockerfile main.ml
+ mkdir -p usr/local/sbin
docker build -t iptables:build .
- docker run --rm iptables:build cat /app/iptables > iptables
- chmod 755 iptables
+ docker run --rm iptables:build | tar xf - -C usr/local/sbin
clean:
+ rm -rf usr
docker images -q iptables:build | xargs docker rmi -f || true
diff --git a/alpine/packages/mobyconfig/mobyconfig b/alpine/packages/mobyconfig/usr/bin/mobyconfig
similarity index 100%
rename from alpine/packages/mobyconfig/mobyconfig
rename to alpine/packages/mobyconfig/usr/bin/mobyconfig
diff --git a/alpine/packages/mobyplatform/mobyplatform b/alpine/packages/mobyplatform/usr/bin/mobyplatform
similarity index 100%
rename from alpine/packages/mobyplatform/mobyplatform
rename to alpine/packages/mobyplatform/usr/bin/mobyplatform
diff --git a/alpine/packages/nc-vsock/.gitignore b/alpine/packages/nc-vsock/.gitignore
index 41edd196d..1b91047ac 100644
--- a/alpine/packages/nc-vsock/.gitignore
+++ b/alpine/packages/nc-vsock/.gitignore
@@ -1 +1 @@
-nc-vsock
+usr/
diff --git a/alpine/packages/nc-vsock/Dockerfile b/alpine/packages/nc-vsock/Dockerfile
index e6cedd3a9..f93b9fc71 100644
--- a/alpine/packages/nc-vsock/Dockerfile
+++ b/alpine/packages/nc-vsock/Dockerfile
@@ -1,8 +1,9 @@
-FROM mobylinux/alpine-build-c:1b53976210ba819823eda5b1d0d3ea337772e97b
-
-RUN mkdir -p /nc-vsock
-WORKDIR /nc-vsock
+FROM mobylinux/alpine-build-c:1ea690a7438cdd8a5965eaa034e0a0c521d9cb40
COPY . /nc-vsock
-RUN make nc-vsock
+WORKDIR /nc-vsock
+
+RUN cc -Wall -Werror -o nc-vsock nc-vsock.c -luuid
+
+CMD ["tar", "cf", "-", "nc-vsock"]
diff --git a/alpine/packages/nc-vsock/Makefile b/alpine/packages/nc-vsock/Makefile
index 469721faa..cf9752ee6 100644
--- a/alpine/packages/nc-vsock/Makefile
+++ b/alpine/packages/nc-vsock/Makefile
@@ -1,15 +1,9 @@
-.PHONY: all
+DEPS=Dockerfile $(wildcard *.c *.h)
-DEPS=nc-vsock.c
-
-all: Dockerfile $(DEPS)
- docker build -t nc-vsock:build .
- docker run --rm nc-vsock:build cat nc-vsock > nc-vsock
- chmod 755 nc-vsock
-
-nc-vsock: $(DEPS)
- gcc -Wall -Werror -o nc-vsock nc-vsock.c -luuid
+usr/bin/nc-vsock: $(DEPS)
+ mkdir -p usr/bin
+ tar cf - $(DEPS) | docker build -t nc-vsock:build -
+ docker run --rm --net=none nc-vsock:build | tar xf - -C usr/bin
clean:
- rm -f nc-vsock
- docker images -q nc-vsock:build | xargs docker rmi -f || true
+ rm -rf usr
diff --git a/alpine/packages/nc-vsock/nc-vsock.c b/alpine/packages/nc-vsock/nc-vsock.c
index 14c449f33..ef5d77c43 100644
--- a/alpine/packages/nc-vsock/nc-vsock.c
+++ b/alpine/packages/nc-vsock/nc-vsock.c
@@ -10,7 +10,7 @@
#include
#include
#include
-#include "include/uapi/linux/vm_sockets.h"
+#include "vm_sockets.h"
#define MODE_READ 1 /* From the vsock */
#define MODE_WRITE 2 /* To the vsock */
diff --git a/alpine/packages/nc-vsock/include/uapi/linux/vm_sockets.h b/alpine/packages/nc-vsock/vm_sockets.h
similarity index 100%
rename from alpine/packages/nc-vsock/include/uapi/linux/vm_sockets.h
rename to alpine/packages/nc-vsock/vm_sockets.h
diff --git a/alpine/packages/proxy/.gitignore b/alpine/packages/proxy/.gitignore
index e02fc7aa4..5ae715395 100644
--- a/alpine/packages/proxy/.gitignore
+++ b/alpine/packages/proxy/.gitignore
@@ -1,2 +1,3 @@
-/slirp-proxy
-/vendor
+proxy
+usr/
+sbin/
diff --git a/alpine/packages/proxy/Dockerfile b/alpine/packages/proxy/Dockerfile
index e3d93098f..cea1d15e2 100644
--- a/alpine/packages/proxy/Dockerfile
+++ b/alpine/packages/proxy/Dockerfile
@@ -1,13 +1,9 @@
-FROM mobylinux/alpine-build-go:30067067003d565887d7efe533eba03ed46038d2
-
-RUN mkdir -p /go/src/proxy
-WORKDIR /go/src/proxy
+FROM mobylinux/alpine-build-go:21b413791b4fed2e16126c77c6b860feaf889d70
COPY ./ /go/src/proxy/
-ARG GOARCH
-ARG GOOS
+WORKDIR /go/src/proxy
RUN go install --ldflags '-extldflags "-fno-PIC"'
-RUN [ -f /go/bin/*/proxy ] && mv /go/bin/*/proxy /go/bin/ || true
+CMD ["tar", "cf", "-", "-C", "/go/bin", "proxy"]
diff --git a/alpine/packages/proxy/Makefile b/alpine/packages/proxy/Makefile
index 98dabb38d..a0d58c19d 100644
--- a/alpine/packages/proxy/Makefile
+++ b/alpine/packages/proxy/Makefile
@@ -1,15 +1,20 @@
-all: proxy
+all: usr/bin/slirp-proxy sbin/proxy-vsockd
-.PHONY: vendor
-vendor:
- mkdir -p ./vendor
- cp -r ../go/vendor/* ./vendor/
+DEPS=Dockerfile $(wildcard *.go libproxy/*.go)
-proxy: Dockerfile main.go proxy.go vendor
- docker build --build-arg GOOS=$(OS) --build-arg GOARCH=$(ARCH) -t proxy:build .
- docker run --rm proxy:build cat /go/bin/proxy > slirp-proxy
- chmod 755 slirp-proxy
+proxy: $(DEPS) ../vendor/manifest
+ tar cf - $(DEPS) -C .. vendor | docker build -t proxy:build -
+ docker run --rm --net=none proxy:build | tar xf -
+
+usr/bin/slirp-proxy: proxy
+ mkdir -p usr/bin
+ cp proxy $@
+
+sbin/proxy-vsockd: proxy
+ mkdir -p sbin
+ cp proxy $@
clean:
- rm -rf slirp-proxy vendor
- docker images -q proxy:build | xargs docker rmi -f || true
+ rm -rf proxy sbin usr
+
+.DELETE_ON_ERROR:
diff --git a/alpine/packages/proxy/libproxy/tcp_proxy.go b/alpine/packages/proxy/libproxy/tcp_proxy.go
index 758918ed4..ed177df92 100644
--- a/alpine/packages/proxy/libproxy/tcp_proxy.go
+++ b/alpine/packages/proxy/libproxy/tcp_proxy.go
@@ -2,9 +2,8 @@ package libproxy
import (
"io"
+ "log"
"net"
-
- "github.com/Sirupsen/logrus"
)
type Conn interface {
@@ -37,7 +36,7 @@ func NewTCPProxy(listener net.Listener, backendAddr *net.TCPAddr) (*TCPProxy, er
func HandleTCPConnection(client Conn, backendAddr *net.TCPAddr, quit chan bool) {
backend, err := net.DialTCP("tcp", nil, backendAddr)
if err != nil {
- logrus.Printf("Can't forward traffic to backend tcp/%v: %s\n", backendAddr, err)
+ log.Printf("Can't forward traffic to backend tcp/%v: %s\n", backendAddr, err)
client.Close()
return
}
@@ -46,15 +45,15 @@ func HandleTCPConnection(client Conn, backendAddr *net.TCPAddr, quit chan bool)
var broker = func(to, from Conn) {
written, err := io.Copy(to, from)
if err != nil {
- logrus.Println("error copying:", err)
+ log.Println("error copying:", err)
}
err = from.CloseRead()
if err != nil {
- logrus.Println("error CloseRead from:", err)
+ log.Println("error CloseRead from:", err)
}
err = to.CloseWrite()
if err != nil {
- logrus.Println("error CloseWrite to:", err)
+ log.Println("error CloseWrite to:", err)
}
event <- written
}
@@ -88,7 +87,7 @@ func (proxy *TCPProxy) Run() {
for {
client, err := proxy.listener.Accept()
if err != nil {
- logrus.Printf("Stopping proxy on tcp/%v for tcp/%v (%s)", proxy.frontendAddr, proxy.backendAddr, err)
+ log.Printf("Stopping proxy on tcp/%v for tcp/%v (%s)", proxy.frontendAddr, proxy.backendAddr, err)
return
}
go HandleTCPConnection(client.(Conn), proxy.backendAddr, quit)
diff --git a/alpine/packages/proxy/libproxy/udp_encapsulation.go b/alpine/packages/proxy/libproxy/udp_encapsulation.go
index c3daf4997..244f73169 100644
--- a/alpine/packages/proxy/libproxy/udp_encapsulation.go
+++ b/alpine/packages/proxy/libproxy/udp_encapsulation.go
@@ -4,10 +4,9 @@ import (
"bytes"
"encoding/binary"
"io"
+ "log"
"net"
"sync"
-
- "github.com/Sirupsen/logrus"
)
type udpListener interface {
@@ -32,7 +31,7 @@ func (u *udpEncapsulator) getConn() (net.Conn, error) {
}
conn, err := u.listener.Accept()
if err != nil {
- logrus.Printf("Failed to accept connection: %#v", err)
+ log.Printf("Failed to accept connection: %#v", err)
return nil, err
}
u.conn = &conn
diff --git a/alpine/packages/proxy/libproxy/udp_proxy.go b/alpine/packages/proxy/libproxy/udp_proxy.go
index 3e5a971c6..ed3ccba1f 100644
--- a/alpine/packages/proxy/libproxy/udp_proxy.go
+++ b/alpine/packages/proxy/libproxy/udp_proxy.go
@@ -2,13 +2,12 @@ package libproxy
import (
"encoding/binary"
+ "log"
"net"
"strings"
"sync"
"syscall"
"time"
-
- "github.com/Sirupsen/logrus"
)
const (
@@ -109,7 +108,7 @@ func (proxy *UDPProxy) Run() {
// ECONNREFUSED like Read do (see comment in
// UDPProxy.replyLoop)
if !isClosedError(err) {
- logrus.Printf("Stopping proxy on %v for udp/%v (%s)", proxy.frontendAddr, proxy.backendAddr, err)
+ log.Printf("Stopping proxy on %v for udp/%v (%s)", proxy.frontendAddr, proxy.backendAddr, err)
}
break
}
@@ -120,7 +119,7 @@ func (proxy *UDPProxy) Run() {
if !hit {
proxyConn, err = net.DialUDP("udp", nil, proxy.backendAddr)
if err != nil {
- logrus.Printf("Can't proxy a datagram to udp/%s: %s\n", proxy.backendAddr, err)
+ log.Printf("Can't proxy a datagram to udp/%s: %s\n", proxy.backendAddr, err)
proxy.connTrackLock.Unlock()
continue
}
@@ -131,7 +130,7 @@ func (proxy *UDPProxy) Run() {
for i := 0; i != read; {
written, err := proxyConn.Write(readBuf[i:read])
if err != nil {
- logrus.Printf("Can't proxy a datagram to udp/%s: %s\n", proxy.backendAddr, err)
+ log.Printf("Can't proxy a datagram to udp/%s: %s\n", proxy.backendAddr, err)
break
}
i += written
diff --git a/alpine/packages/tap-vsockd/.gitignore b/alpine/packages/tap-vsockd/.gitignore
index 5cf0d45b4..e1ae85e07 100644
--- a/alpine/packages/tap-vsockd/.gitignore
+++ b/alpine/packages/tap-vsockd/.gitignore
@@ -1 +1 @@
-tap-vsockd
+sbin
diff --git a/alpine/packages/tap-vsockd/Dockerfile b/alpine/packages/tap-vsockd/Dockerfile
index 4e5990dd0..a8e26bf8e 100644
--- a/alpine/packages/tap-vsockd/Dockerfile
+++ b/alpine/packages/tap-vsockd/Dockerfile
@@ -1,8 +1,9 @@
-FROM mobylinux/alpine-build-c:1b53976210ba819823eda5b1d0d3ea337772e97b
-
-RUN mkdir -p /tap-vsockd
-WORKDIR /tap-vsockd
+FROM mobylinux/alpine-build-c:1ea690a7438cdd8a5965eaa034e0a0c521d9cb40
COPY . /tap-vsockd
-RUN make tap-vsockd
+WORKDIR /tap-vsockd
+
+RUN cc -Wall -Werror tap-vsockd.c hvsock.c protocol.c -lpthread -o tap-vsockd
+
+CMD ["tar", "cf", "-", "tap-vsockd"]
diff --git a/alpine/packages/tap-vsockd/Makefile b/alpine/packages/tap-vsockd/Makefile
index f0f3eb82e..9fb44a613 100644
--- a/alpine/packages/tap-vsockd/Makefile
+++ b/alpine/packages/tap-vsockd/Makefile
@@ -1,24 +1,9 @@
-.PHONY: all
+DEPS=Dockerfile $(wildcard *.c *.h)
-DEPS=tap-vsockd.c hvsock.c hvsock.h protocol.c protocol.h
-
-all: Dockerfile $(DEPS)
- docker build -t tap-vsockd:build .
- docker run --rm tap-vsockd:build cat tap-vsockd > tap-vsockd
- chmod 755 tap-vsockd
-
-tap-vsockd: hvsock.o protocol.o tap-vsockd.o
- gcc -Wall -Werror -o tap-vsockd tap-vsockd.o protocol.o hvsock.o -lpthread
-
-hvsock.o: hvsock.c hvsock.h
- gcc -Wall -Werror -c hvsock.c
-
-protocol.o: protocol.c
- gcc -Wall -Werror -c protocol.c
-
-tap-vsockd.o: tap-vsockd.c hvsock.h
- gcc -Wall -Werror -c tap-vsockd.c
+sbin/tap-vsockd: $(DEPS)
+ mkdir -p sbin
+ tar cf - $(DEPS) | docker build -t tap-vsockd:build -
+ docker run --rm --net=none tap-vsockd:build | tar xf - -C sbin
clean:
- rm -f tap-vsockd
- docker images -q tap-vsockd:build | xargs docker rmi -f || true
+ rm -rf sbin
diff --git a/alpine/packages/test/mobytest b/alpine/packages/test/usr/bin/mobytest
similarity index 100%
rename from alpine/packages/test/mobytest
rename to alpine/packages/test/usr/bin/mobytest
diff --git a/alpine/packages/transfused/.gitignore b/alpine/packages/transfused/.gitignore
index 497a34c5f..e1ae85e07 100644
--- a/alpine/packages/transfused/.gitignore
+++ b/alpine/packages/transfused/.gitignore
@@ -1 +1 @@
-/transfused
+sbin
diff --git a/alpine/packages/transfused/Dockerfile b/alpine/packages/transfused/Dockerfile
index 1a9458ac4..31b7d80eb 100644
--- a/alpine/packages/transfused/Dockerfile
+++ b/alpine/packages/transfused/Dockerfile
@@ -1,8 +1,9 @@
-FROM mobylinux/alpine-build-c:1b53976210ba819823eda5b1d0d3ea337772e97b
-
-RUN mkdir -p /transfused
-WORKDIR /transfused
+FROM mobylinux/alpine-build-c:1ea690a7438cdd8a5965eaa034e0a0c521d9cb40
COPY . /transfused
-RUN make transfused
+WORKDIR /transfused
+
+RUN cc -g -static -Wall -Werror -o transfused transfused.c transfused_log.c transfused_vsock.c
+
+CMD ["tar", "cf", "-", "transfused"]
diff --git a/alpine/packages/transfused/Makefile b/alpine/packages/transfused/Makefile
index d1bfc5fa3..804d30f80 100644
--- a/alpine/packages/transfused/Makefile
+++ b/alpine/packages/transfused/Makefile
@@ -1,18 +1,9 @@
-.PHONY: all
+DEPS=Dockerfile $(wildcard *.c *.h)
-HDR=transfused.h transfused_log.h transfused_vsock.h
-SRC=transfused.c transfused_log.c transfused_vsock.c
-DEPS=$(HDR) $(SRC)
-
-
-all: Dockerfile $(DEPS)
- docker build -t transfused:build .
- docker run --rm transfused:build cat transfused > transfused
- chmod 755 transfused
-
-transfused: $(DEPS)
- gcc -g -static -Wall -Werror -o transfused $(SRC)
+sbin/transfused: $(DEPS)
+ mkdir -p sbin
+ tar cf - $(DEPS) | docker build -t transfused:build -
+ docker run --rm --net=none transfused:build | tar xf - -C sbin
clean:
- rm -f transfused
- docker images -q transfused:build | xargs docker rmi -f || true
+ rm -rf sbin
diff --git a/alpine/packages/transfused/transfused_vsock.c b/alpine/packages/transfused/transfused_vsock.c
index 25e0219dd..08408dd0e 100644
--- a/alpine/packages/transfused/transfused_vsock.c
+++ b/alpine/packages/transfused/transfused_vsock.c
@@ -3,7 +3,7 @@
#include
-#include "include/uapi/linux/vm_sockets.h"
+#include "vm_sockets.h"
#include "transfused_log.h"
diff --git a/alpine/packages/transfused/include/uapi/linux/vm_sockets.h b/alpine/packages/transfused/vm_sockets.h
similarity index 100%
rename from alpine/packages/transfused/include/uapi/linux/vm_sockets.h
rename to alpine/packages/transfused/vm_sockets.h
diff --git a/alpine/packages/go/vendor/github.com/rneugeba/virtsock/go/LICENSE b/alpine/packages/vendor/github.com/rneugeba/virtsock/go/LICENSE
similarity index 100%
rename from alpine/packages/go/vendor/github.com/rneugeba/virtsock/go/LICENSE
rename to alpine/packages/vendor/github.com/rneugeba/virtsock/go/LICENSE
diff --git a/alpine/packages/go/vendor/github.com/rneugeba/virtsock/go/examples/client.go b/alpine/packages/vendor/github.com/rneugeba/virtsock/go/examples/client.go
similarity index 100%
rename from alpine/packages/go/vendor/github.com/rneugeba/virtsock/go/examples/client.go
rename to alpine/packages/vendor/github.com/rneugeba/virtsock/go/examples/client.go
diff --git a/alpine/packages/go/vendor/github.com/rneugeba/virtsock/go/examples/hvgoecho.go b/alpine/packages/vendor/github.com/rneugeba/virtsock/go/examples/hvgoecho.go
similarity index 100%
rename from alpine/packages/go/vendor/github.com/rneugeba/virtsock/go/examples/hvgoecho.go
rename to alpine/packages/vendor/github.com/rneugeba/virtsock/go/examples/hvgoecho.go
diff --git a/alpine/packages/go/vendor/github.com/rneugeba/virtsock/go/examples/hvgostress.go b/alpine/packages/vendor/github.com/rneugeba/virtsock/go/examples/hvgostress.go
similarity index 100%
rename from alpine/packages/go/vendor/github.com/rneugeba/virtsock/go/examples/hvgostress.go
rename to alpine/packages/vendor/github.com/rneugeba/virtsock/go/examples/hvgostress.go
diff --git a/alpine/packages/go/vendor/github.com/rneugeba/virtsock/go/hvsock/hvsock.go b/alpine/packages/vendor/github.com/rneugeba/virtsock/go/hvsock/hvsock.go
similarity index 100%
rename from alpine/packages/go/vendor/github.com/rneugeba/virtsock/go/hvsock/hvsock.go
rename to alpine/packages/vendor/github.com/rneugeba/virtsock/go/hvsock/hvsock.go
diff --git a/alpine/packages/go/vendor/github.com/rneugeba/virtsock/go/hvsock/hvsock_darwin.go b/alpine/packages/vendor/github.com/rneugeba/virtsock/go/hvsock/hvsock_darwin.go
similarity index 100%
rename from alpine/packages/go/vendor/github.com/rneugeba/virtsock/go/hvsock/hvsock_darwin.go
rename to alpine/packages/vendor/github.com/rneugeba/virtsock/go/hvsock/hvsock_darwin.go
diff --git a/alpine/packages/go/vendor/github.com/rneugeba/virtsock/go/hvsock/hvsock_linux.go b/alpine/packages/vendor/github.com/rneugeba/virtsock/go/hvsock/hvsock_linux.go
similarity index 100%
rename from alpine/packages/go/vendor/github.com/rneugeba/virtsock/go/hvsock/hvsock_linux.go
rename to alpine/packages/vendor/github.com/rneugeba/virtsock/go/hvsock/hvsock_linux.go
diff --git a/alpine/packages/go/vendor/github.com/rneugeba/virtsock/go/hvsock/hvsock_windows.go b/alpine/packages/vendor/github.com/rneugeba/virtsock/go/hvsock/hvsock_windows.go
similarity index 100%
rename from alpine/packages/go/vendor/github.com/rneugeba/virtsock/go/hvsock/hvsock_windows.go
rename to alpine/packages/vendor/github.com/rneugeba/virtsock/go/hvsock/hvsock_windows.go
diff --git a/alpine/packages/go/vendor/github.com/rneugeba/virtsock/go/hvsock/zsyscall_windows.go b/alpine/packages/vendor/github.com/rneugeba/virtsock/go/hvsock/zsyscall_windows.go
similarity index 100%
rename from alpine/packages/go/vendor/github.com/rneugeba/virtsock/go/hvsock/zsyscall_windows.go
rename to alpine/packages/vendor/github.com/rneugeba/virtsock/go/hvsock/zsyscall_windows.go
diff --git a/alpine/packages/go/vendor/github.com/rneugeba/virtsock/go/vsock/vsock_linux.go b/alpine/packages/vendor/github.com/rneugeba/virtsock/go/vsock/vsock_linux.go
similarity index 100%
rename from alpine/packages/go/vendor/github.com/rneugeba/virtsock/go/vsock/vsock_linux.go
rename to alpine/packages/vendor/github.com/rneugeba/virtsock/go/vsock/vsock_linux.go
diff --git a/alpine/packages/go/vendor/manifest b/alpine/packages/vendor/manifest
similarity index 99%
rename from alpine/packages/go/vendor/manifest
rename to alpine/packages/vendor/manifest
index 9f686cf79..19690cf88 100644
--- a/alpine/packages/go/vendor/manifest
+++ b/alpine/packages/vendor/manifest
@@ -11,4 +11,4 @@
"notests": true
}
]
-}
\ No newline at end of file
+}
diff --git a/alpine/packages/vsudd/.gitignore b/alpine/packages/vsudd/.gitignore
index 50802866b..5b42612bc 100644
--- a/alpine/packages/vsudd/.gitignore
+++ b/alpine/packages/vsudd/.gitignore
@@ -1,2 +1 @@
-/vsudd
-/vendor
\ No newline at end of file
+sbin/
diff --git a/alpine/packages/vsudd/Dockerfile b/alpine/packages/vsudd/Dockerfile
index 05f84f184..ce8227b3f 100644
--- a/alpine/packages/vsudd/Dockerfile
+++ b/alpine/packages/vsudd/Dockerfile
@@ -1,13 +1,9 @@
-FROM mobylinux/alpine-build-go:30067067003d565887d7efe533eba03ed46038d2
+FROM mobylinux/alpine-build-go:21b413791b4fed2e16126c77c6b860feaf889d70
+
+COPY ./ /go/src/vsudd/
-RUN mkdir -p /go/src/vsudd
WORKDIR /go/src/vsudd
-COPY . /go/src/vsudd/
-
-ARG GOARCH
-ARG GOOS
-
RUN go install --ldflags '-extldflags "-fno-PIC"'
-RUN [ -f /go/bin/*/vsudd ] && mv /go/bin/*/vsudd /go/bin/ || true
+CMD ["tar", "cf", "-", "-C", "/go/bin", "vsudd"]
diff --git a/alpine/packages/vsudd/Makefile b/alpine/packages/vsudd/Makefile
index 80f1e5578..6189b7fb5 100644
--- a/alpine/packages/vsudd/Makefile
+++ b/alpine/packages/vsudd/Makefile
@@ -1,15 +1,13 @@
all: vsudd
-.PHONY: vendor
-vendor:
- mkdir -p ./vendor
- cp -r ../go/vendor/* ./vendor/
+DEPS=Dockerfile $(wildcard *.go)
-vsudd: Dockerfile main.go vendor
- docker build --build-arg GOOS=$(OS) --build-arg GOARCH=$(ARCH) -t vsudd:build .
- docker run --rm vsudd:build cat /go/bin/vsudd > vsudd
- chmod 755 vsudd
+vsudd: $(DEPS) ../vendor/manifest
+ mkdir -p sbin
+ tar cf - $(DEPS) -C .. vendor | docker build -t vsudd:build -
+ docker run --rm --net=none vsudd:build | tar xf - -C sbin
clean:
- rm -rf vsudd vendor
- docker images -q vsudd:build | xargs docker rmi -f || true
+ rm -rf sbin
+
+.DELETE_ON_ERROR:
diff --git a/alpine/packages/vsudd/include/uapi/linux/vm_sockets.h b/alpine/packages/vsudd/include/uapi/linux/vm_sockets.h
deleted file mode 100644
index 41934a185..000000000
--- a/alpine/packages/vsudd/include/uapi/linux/vm_sockets.h
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * VMware vSockets Driver
- *
- * Copyright (C) 2007-2013 VMware, Inc. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation version 2 and no later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- */
-
-#ifndef _UAPI_VM_SOCKETS_H
-#define _UAPI_VM_SOCKETS_H
-
-#ifdef __KERNEL__
-#include
-#else
-#define __kernel_sa_family_t sa_family_t
-#include
-#endif
-
-/* Option name for STREAM socket buffer size. Use as the option name in
- * setsockopt(3) or getsockopt(3) to set or get an unsigned long long that
- * specifies the size of the buffer underlying a vSockets STREAM socket.
- * Value is clamped to the MIN and MAX.
- */
-
-#define SO_VM_SOCKETS_BUFFER_SIZE 0
-
-/* Option name for STREAM socket minimum buffer size. Use as the option name
- * in setsockopt(3) or getsockopt(3) to set or get an unsigned long long that
- * specifies the minimum size allowed for the buffer underlying a vSockets
- * STREAM socket.
- */
-
-#define SO_VM_SOCKETS_BUFFER_MIN_SIZE 1
-
-/* Option name for STREAM socket maximum buffer size. Use as the option name
- * in setsockopt(3) or getsockopt(3) to set or get an unsigned long long
- * that specifies the maximum size allowed for the buffer underlying a
- * vSockets STREAM socket.
- */
-
-#define SO_VM_SOCKETS_BUFFER_MAX_SIZE 2
-
-/* Option name for socket peer's host-specific VM ID. Use as the option name
- * in getsockopt(3) to get a host-specific identifier for the peer endpoint's
- * VM. The identifier is a signed integer.
- * Only available for hypervisor endpoints.
- */
-
-#define SO_VM_SOCKETS_PEER_HOST_VM_ID 3
-
-/* Option name for determining if a socket is trusted. Use as the option name
- * in getsockopt(3) to determine if a socket is trusted. The value is a
- * signed integer.
- */
-
-#define SO_VM_SOCKETS_TRUSTED 5
-
-/* Option name for STREAM socket connection timeout. Use as the option name
- * in setsockopt(3) or getsockopt(3) to set or get the connection
- * timeout for a STREAM socket.
- */
-
-#define SO_VM_SOCKETS_CONNECT_TIMEOUT 6
-
-/* Option name for using non-blocking send/receive. Use as the option name
- * for setsockopt(3) or getsockopt(3) to set or get the non-blocking
- * transmit/receive flag for a STREAM socket. This flag determines whether
- * send() and recv() can be called in non-blocking contexts for the given
- * socket. The value is a signed integer.
- *
- * This option is only relevant to kernel endpoints, where descheduling the
- * thread of execution is not allowed, for example, while holding a spinlock.
- * It is not to be confused with conventional non-blocking socket operations.
- *
- * Only available for hypervisor endpoints.
- */
-
-#define SO_VM_SOCKETS_NONBLOCK_TXRX 7
-
-/* The vSocket equivalent of INADDR_ANY. This works for the svm_cid field of
- * sockaddr_vm and indicates the context ID of the current endpoint.
- */
-
-#define VMADDR_CID_ANY -1U
-
-/* Bind to any available port. Works for the svm_port field of
- * sockaddr_vm.
- */
-
-#define VMADDR_PORT_ANY -1U
-
-/* Use this as the destination CID in an address when referring to the
- * hypervisor. VMCI relies on it being 0, but this would be useful for other
- * transports too.
- */
-
-#define VMADDR_CID_HYPERVISOR 0
-
-/* This CID is specific to VMCI and can be considered reserved (even VMCI
- * doesn't use it anymore, it's a legacy value from an older release).
- */
-
-#define VMADDR_CID_RESERVED 1
-
-/* Use this as the destination CID in an address when referring to the host
- * (any process other than the hypervisor). VMCI relies on it being 2, but
- * this would be useful for other transports too.
- */
-
-#define VMADDR_CID_HOST 2
-
-/* Invalid vSockets version. */
-
-#define VM_SOCKETS_INVALID_VERSION -1U
-
-/* The epoch (first) component of the vSockets version. A single byte
- * representing the epoch component of the vSockets version.
- */
-
-#define VM_SOCKETS_VERSION_EPOCH(_v) (((_v) & 0xFF000000) >> 24)
-
-/* The major (second) component of the vSockets version. A single byte
- * representing the major component of the vSockets version. Typically
- * changes for every major release of a product.
- */
-
-#define VM_SOCKETS_VERSION_MAJOR(_v) (((_v) & 0x00FF0000) >> 16)
-
-/* The minor (third) component of the vSockets version. Two bytes representing
- * the minor component of the vSockets version.
- */
-
-#define VM_SOCKETS_VERSION_MINOR(_v) (((_v) & 0x0000FFFF))
-
-/* Address structure for vSockets. The address family should be set to
- * AF_VSOCK. The structure members should all align on their natural
- * boundaries without resorting to compiler packing directives. The total size
- * of this structure should be exactly the same as that of struct sockaddr.
- */
-
-struct sockaddr_vm {
- __kernel_sa_family_t svm_family;
- unsigned short svm_reserved1;
- unsigned int svm_port;
- unsigned int svm_cid;
- unsigned char svm_zero[sizeof(struct sockaddr) -
- sizeof(sa_family_t) -
- sizeof(unsigned short) -
- sizeof(unsigned int) - sizeof(unsigned int)];
-};
-
-#define IOCTL_VM_SOCKETS_GET_LOCAL_CID _IO(7, 0xb9)
-
-#endif /* _UAPI_VM_SOCKETS_H */
diff --git a/docs/hub.md b/docs/hub.md
new file mode 100644
index 000000000..7d39c5bf2
--- /dev/null
+++ b/docs/hub.md
@@ -0,0 +1,21 @@
+## Docker Hub
+
+There are images on Docker Hub to help with reproducible builds. These are built (by hand) from `alpine/base`,
+generally with tags based on the image contents.
+
+- `mobylinux/alpine-base` the base packages for Moby, before we add Docker and our code and config
+- `mobylinux/alpine-build-c` for building C code
+- `mobylinux/alpine-build-go` for building Go code
+- `mobylinux/alpine-bios` for building BIOS image
+- `mobylinux/alpine-efi` for building efi images
+- `mobylinux/alpine-qemu` for Qemu eg for the tests
+- `mobylinux/debian-build-kernel` for the kernel builds while we cannot use Alpine
+
+In addition
+- `mobylinux/media` contains build artifacts
+
+You can upload build artifacts with `make media` or `make media MEDIA_PREFIX=1.12.0-` if you want to change the prefix of the git hash.
+The will by default be prefixed by `experimental-` if they are Docker experimental builds. These are used in the Mac and Windows build
+process to get the images.
+
+Ping @justincormack if you need access to the Hub organization.