├── src ├── buildorder │ ├── testpackages │ │ ├── a │ │ │ ├── strato.yml │ │ │ └── Dockerfile │ │ ├── b │ │ │ ├── strato.yml │ │ │ └── Dockerfile │ │ ├── c │ │ │ ├── strato.yml │ │ │ └── Dockerfile │ │ └── d │ │ │ ├── strato.yml │ │ │ └── Dockerfile │ └── convert_test.go ├── utils │ └── args.go ├── version │ └── version.go ├── cmd │ ├── xf │ │ └── xf.go │ ├── extract │ │ └── extract.go │ ├── build │ │ └── build.go │ └── buildall │ │ └── buildall.go └── main.go ├── vendor ├── golang.org │ └── x │ │ ├── sys │ │ ├── unix │ │ │ ├── .gitignore │ │ │ ├── asm.s │ │ │ ├── constants.go │ │ │ ├── syscall_no_getwd.go │ │ │ ├── zsysnum_solaris_amd64.go │ │ │ ├── env_unset.go │ │ │ ├── flock_linux_32bit.go │ │ │ ├── asm_solaris_amd64.s │ │ │ ├── gccgo_linux_amd64.go │ │ │ ├── race0.go │ │ │ ├── env_unix.go │ │ │ ├── asm_linux_arm64.s │ │ │ ├── str.go │ │ │ ├── race.go │ │ │ ├── asm_linux_ppc64x.s │ │ │ ├── asm_linux_arm.s │ │ │ ├── asm_freebsd_arm.s │ │ │ ├── asm_netbsd_arm.s │ │ │ ├── asm_darwin_386.s │ │ │ ├── asm_freebsd_386.s │ │ │ ├── asm_netbsd_386.s │ │ │ ├── asm_openbsd_386.s │ │ │ ├── asm_darwin_amd64.s │ │ │ ├── asm_dragonfly_386.s │ │ │ ├── asm_freebsd_amd64.s │ │ │ ├── asm_linux_amd64.s │ │ │ ├── asm_netbsd_amd64.s │ │ │ ├── asm_openbsd_amd64.s │ │ │ ├── asm_dragonfly_amd64.s │ │ │ ├── asm_darwin_arm.s │ │ │ ├── asm_darwin_arm64.s │ │ │ ├── flock.go │ │ │ ├── mksysnum_darwin.pl │ │ │ ├── asm_linux_386.s │ │ │ ├── syscall_solaris_amd64.go │ │ │ ├── gccgo_c.c │ │ │ ├── syscall_openbsd_amd64.go │ │ │ ├── sockcmsg_linux.go │ │ │ ├── syscall_netbsd_386.go │ │ │ ├── syscall_netbsd_arm.go │ │ │ ├── syscall_openbsd_386.go │ │ │ ├── syscall_netbsd_amd64.go │ │ │ ├── mksysnum_dragonfly.pl │ │ │ └── mksysnum_openbsd.pl │ │ ├── codereview.cfg │ │ ├── .gitignore │ │ ├── AUTHORS │ │ ├── CONTRIBUTORS │ │ ├── README │ │ ├── .gitattributes │ │ └── CONTRIBUTING.md │ │ └── net │ │ ├── codereview.cfg │ │ ├── .gitignore │ │ ├── README │ │ ├── AUTHORS │ │ ├── CONTRIBUTORS │ │ ├── .gitattributes │ │ ├── proxy │ │ └── direct.go │ │ ├── context │ │ └── ctxhttp │ │ │ ├── cancelreq.go │ │ │ └── cancelreq_go14.go │ │ └── CONTRIBUTING.md ├── github.com │ ├── Sirupsen │ │ └── logrus │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── terminal_bsd.go │ │ │ ├── terminal_solaris.go │ │ │ ├── terminal_linux.go │ │ │ ├── terminal_notwindows.go │ │ │ ├── doc.go │ │ │ ├── writer.go │ │ │ ├── terminal_windows.go │ │ │ ├── json_formatter.go │ │ │ ├── LICENSE │ │ │ └── hooks.go │ ├── docker │ │ ├── docker │ │ │ ├── VERSION │ │ │ ├── .dockerignore │ │ │ ├── api │ │ │ │ ├── types │ │ │ │ │ ├── errors.go │ │ │ │ │ ├── time │ │ │ │ │ │ └── duration_convert.go │ │ │ │ │ ├── blkiodev │ │ │ │ │ │ └── blkio.go │ │ │ │ │ ├── swarm │ │ │ │ │ │ ├── common.go │ │ │ │ │ │ └── container.go │ │ │ │ │ ├── auth.go │ │ │ │ │ ├── strslice │ │ │ │ │ │ └── strslice.go │ │ │ │ │ ├── reference │ │ │ │ │ │ └── image_reference.go │ │ │ │ │ └── versions │ │ │ │ │ │ └── README.md │ │ │ │ └── README.md │ │ │ ├── client │ │ │ │ ├── client_windows.go │ │ │ │ ├── client_unix.go │ │ │ │ ├── interface_stable.go │ │ │ │ ├── service_remove.go │ │ │ │ ├── network_remove.go │ │ │ │ ├── plugin_enable.go │ │ │ │ ├── swarm_join.go │ │ │ │ ├── plugin_disable.go │ │ │ │ ├── container_unpause.go │ │ │ │ ├── container_pause.go │ │ │ │ ├── plugin_set.go │ │ │ │ ├── swarm_leave.go │ │ │ │ ├── checkpoint_delete.go │ │ │ │ ├── plugin_push.go │ │ │ │ ├── volume_remove.go │ │ │ │ ├── container_rename.go │ │ │ │ ├── checkpoint_create.go │ │ │ │ ├── node_remove.go │ │ │ │ ├── container_kill.go │ │ │ │ ├── network_disconnect.go │ │ │ │ ├── node_update.go │ │ │ │ ├── plugin_remove.go │ │ │ │ ├── swarm_inspect.go │ │ │ │ ├── container_export.go │ │ │ │ ├── swarm_init.go │ │ │ │ ├── image_save.go │ │ │ │ ├── version.go │ │ │ │ ├── volume_create.go │ │ │ │ ├── plugin_list.go │ │ │ │ ├── container_start.go │ │ │ │ ├── network_connect.go │ │ │ │ ├── checkpoint_list.go │ │ │ │ ├── image_history.go │ │ │ │ ├── info.go │ │ │ │ ├── disk_usage.go │ │ │ │ ├── container_diff.go │ │ │ │ ├── container_stop.go │ │ │ │ ├── container_remove.go │ │ │ │ ├── swarm_update.go │ │ │ │ ├── container_restart.go │ │ │ │ ├── container_wait.go │ │ │ │ ├── image_prune.go │ │ │ │ ├── volume_prune.go │ │ │ │ ├── container_update.go │ │ │ │ ├── plugin_inspect.go │ │ │ │ ├── container_prune.go │ │ │ │ ├── network_create.go │ │ │ │ ├── image_remove.go │ │ │ │ ├── container_stats.go │ │ │ │ ├── container_top.go │ │ │ │ ├── transport.go │ │ │ │ ├── login.go │ │ │ │ ├── service_update.go │ │ │ │ ├── task_list.go │ │ │ │ ├── node_list.go │ │ │ │ ├── service_create.go │ │ │ │ ├── volume_list.go │ │ │ │ ├── image_load.go │ │ │ │ ├── service_list.go │ │ │ │ ├── node_inspect.go │ │ │ │ ├── network_list.go │ │ │ │ ├── task_inspect.go │ │ │ │ ├── service_inspect.go │ │ │ │ ├── README.md │ │ │ │ ├── image_inspect.go │ │ │ │ ├── image_tag.go │ │ │ │ ├── container_resize.go │ │ │ │ ├── image_import.go │ │ │ │ ├── image_create.go │ │ │ │ ├── container_attach.go │ │ │ │ ├── image_list.go │ │ │ │ ├── volume_inspect.go │ │ │ │ └── container_logs.go │ │ │ ├── pkg │ │ │ │ ├── tlsconfig │ │ │ │ │ ├── tlsconfig_clone.go │ │ │ │ │ └── tlsconfig_clone_go16.go │ │ │ │ └── README.md │ │ │ ├── NOTICE │ │ │ └── .gitignore │ │ ├── go-connections │ │ │ ├── sockets │ │ │ │ ├── README.md │ │ │ │ ├── sockets_windows.go │ │ │ │ ├── sockets_unix.go │ │ │ │ ├── tcp_socket.go │ │ │ │ └── sockets.go │ │ │ ├── circle.yml │ │ │ ├── tlsconfig │ │ │ │ ├── config_legacy_client_ciphers.go │ │ │ │ └── config_client_ciphers.go │ │ │ ├── README.md │ │ │ └── MAINTAINERS │ │ ├── go-units │ │ │ ├── circle.yml │ │ │ ├── README.md │ │ │ ├── MAINTAINERS │ │ │ └── duration.go │ │ └── distribution │ │ │ ├── coverpkg.sh │ │ │ ├── Dockerfile │ │ │ ├── .gitignore │ │ │ ├── CHANGELOG.md │ │ │ └── digest │ │ │ └── verifiers.go │ ├── opencontainers │ │ └── runc │ │ │ ├── VERSION │ │ │ ├── Dockerfile │ │ │ ├── .gitignore │ │ │ ├── libcontainer │ │ │ └── user │ │ │ │ ├── MAINTAINERS │ │ │ │ ├── lookup_unsupported.go │ │ │ │ └── lookup_unix.go │ │ │ ├── .pullapprove.yml │ │ │ ├── MAINTAINERS │ │ │ ├── NOTICE │ │ │ └── PRINCIPLES.md │ ├── urfave │ │ └── cli │ │ │ ├── .gitignore │ │ │ ├── appveyor.yml │ │ │ ├── cli.go │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── category.go │ │ │ └── funcs.go │ └── pkg │ │ └── errors │ │ ├── .travis.yml │ │ ├── .gitignore │ │ └── appveyor.yml └── gopkg.in │ └── yaml.v2 │ ├── .travis.yml │ └── LICENSE ├── packages ├── base-layout │ ├── strato.yml │ ├── shells │ ├── profile │ ├── shadow │ ├── group │ ├── Dockerfile │ └── passwd ├── acpi │ ├── strato.yml │ └── Dockerfile ├── bash │ ├── strato.yml │ ├── fetch-patches │ └── Dockerfile ├── dhcpcd │ ├── strato.yml │ └── Dockerfile ├── glibc │ ├── strato.yml │ └── Dockerfile ├── jq │ ├── strato.yml │ ├── Dockerfile │ └── CVE-2015-8863.patch ├── kmod │ ├── strato.yml │ └── Dockerfile ├── mdadm │ ├── strato.yml │ └── Dockerfile ├── rsync │ ├── strato.yml │ └── Dockerfile ├── sudo │ ├── strato.yml │ └── Dockerfile ├── busybox │ ├── strato.yml │ └── Dockerfile ├── e2fsprogs │ ├── strato.yml │ └── Dockerfile ├── iproute2 │ ├── strato.yml │ └── Dockerfile ├── iptables │ ├── strato.yml │ └── Dockerfile ├── openssl │ ├── strato.yml │ └── Dockerfile ├── syslinux │ ├── strato.yml │ └── Dockerfile ├── ca-certificates │ ├── strato.yml │ └── Dockerfile ├── rsyslog │ ├── strato.yml │ └── Dockerfile ├── ntp │ ├── strato.yml │ ├── ntp.conf │ └── Dockerfile ├── openssh │ ├── strato.yml │ └── Dockerfile ├── parted │ ├── strato.yml │ └── Dockerfile ├── eudev │ ├── strato.yml │ └── Dockerfile ├── popt │ ├── strato.yml │ └── Dockerfile ├── zlib │ ├── strato.yml │ └── Dockerfile ├── json-c │ ├── strato.yml │ └── Dockerfile ├── libestr │ ├── strato.yml │ └── Dockerfile ├── readline │ ├── strato.yml │ └── Dockerfile ├── ncurses │ ├── strato.yml │ └── Dockerfile ├── acl │ ├── strato.yml │ └── Dockerfile ├── xz │ ├── strato.yml │ └── Dockerfile ├── lvm2 │ ├── strato.yml │ └── Dockerfile └── util-linux │ ├── strato.yml │ └── Dockerfile ├── tests ├── iproute2.sh ├── jq.sh ├── xz.sh ├── bash.sh ├── ntp.sh ├── sudo.sh ├── dhcpcd.sh ├── eudev.sh ├── mdadm.sh ├── openssh.sh ├── parted.sh ├── e2fsprogs.sh ├── iptables.sh └── syslinux.sh ├── Dockerfile ├── assets └── install-deb ├── scripts ├── ci ├── clean ├── entry ├── run ├── test ├── build-packages ├── version ├── build-bin ├── dev ├── build-base └── webserver ├── .drone.yml ├── .gitignore ├── Dockerfile.build ├── vendor.conf └── Makefile /src/buildorder/testpackages/a/strato.yml: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /src/buildorder/testpackages/b/strato.yml: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /src/buildorder/testpackages/c/strato.yml: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /src/buildorder/testpackages/d/strato.yml: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/.gitignore: -------------------------------------------------------------------------------- 1 | _obj/ 2 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/.gitignore: -------------------------------------------------------------------------------- 1 | logrus 2 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/VERSION: -------------------------------------------------------------------------------- 1 | 1.13.0-dev 2 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-connections/sockets/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/base-layout/strato.yml: -------------------------------------------------------------------------------- 1 | extract_folder: /package 2 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/runc/VERSION: -------------------------------------------------------------------------------- 1 | 1.0.0-rc1 2 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/codereview.cfg: -------------------------------------------------------------------------------- 1 | issuerepo: golang/go 2 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/codereview.cfg: -------------------------------------------------------------------------------- 1 | issuerepo: golang/go 2 | -------------------------------------------------------------------------------- /tests/iproute2.sh: -------------------------------------------------------------------------------- 1 | strato --source=/packages/ add iproute2 && ss 2 | -------------------------------------------------------------------------------- /tests/jq.sh: -------------------------------------------------------------------------------- 1 | strato --source=/packages/ add jq && jq --version 2 | -------------------------------------------------------------------------------- /tests/xz.sh: -------------------------------------------------------------------------------- 1 | strato --source=/packages/ add xz && xz --version 2 | -------------------------------------------------------------------------------- /tests/bash.sh: -------------------------------------------------------------------------------- 1 | strato --source=/packages/ add bash && bash --version 2 | -------------------------------------------------------------------------------- /tests/ntp.sh: -------------------------------------------------------------------------------- 1 | strato --source=/packages/ add ntp && ntpd --version 2 | -------------------------------------------------------------------------------- /tests/sudo.sh: -------------------------------------------------------------------------------- 1 | strato --source=/packages/ add sudo && sudo --version 2 | -------------------------------------------------------------------------------- /tests/dhcpcd.sh: -------------------------------------------------------------------------------- 1 | strato --source=/packages/ add dhcpcd && dhcpcd --version 2 | -------------------------------------------------------------------------------- /tests/eudev.sh: -------------------------------------------------------------------------------- 1 | strato --source=/packages/ add eudev && udevd --version 2 | -------------------------------------------------------------------------------- /tests/mdadm.sh: -------------------------------------------------------------------------------- 1 | strato --source=/packages/ add mdadm && mdadm --version 2 | -------------------------------------------------------------------------------- /tests/openssh.sh: -------------------------------------------------------------------------------- 1 | strato --source=/packages/ add openssh && /usr/sbin/sshd 2 | -------------------------------------------------------------------------------- /tests/parted.sh: -------------------------------------------------------------------------------- 1 | strato --source=/packages/ add parted && parted --version 2 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/.gitignore: -------------------------------------------------------------------------------- 1 | *.coverprofile 2 | node_modules/ 3 | -------------------------------------------------------------------------------- /tests/e2fsprogs.sh: -------------------------------------------------------------------------------- 1 | strato --source=/packages/ add e2fsprogs && which resize2fs 2 | -------------------------------------------------------------------------------- /tests/iptables.sh: -------------------------------------------------------------------------------- 1 | strato --source=/packages/ add iptables && iptables --version 2 | -------------------------------------------------------------------------------- /tests/syslinux.sh: -------------------------------------------------------------------------------- 1 | strato --source=/packages/ add syslinux && extlinux --version 2 | -------------------------------------------------------------------------------- /packages/base-layout/shells: -------------------------------------------------------------------------------- 1 | # /etc/shells: valid login shells 2 | /bin/sh 3 | /bin/ash 4 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/.dockerignore: -------------------------------------------------------------------------------- 1 | bundles 2 | .gopath 3 | vendor/pkg 4 | .go-pkg-cache 5 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM scratch 2 | ADD rootfs.tar / 3 | COPY bin/strato /sbin/ 4 | ENTRYPOINT ["/bin/sh", "-c"] 5 | -------------------------------------------------------------------------------- /packages/acpi/strato.yml: -------------------------------------------------------------------------------- 1 | exclude: 2 | - usr/include 3 | - usr/share/doc 4 | - usr/share/info 5 | - usr/share/man 6 | -------------------------------------------------------------------------------- /packages/bash/strato.yml: -------------------------------------------------------------------------------- 1 | exclude: 2 | - usr/include 3 | - usr/share/doc 4 | - usr/share/info 5 | - usr/share/man 6 | -------------------------------------------------------------------------------- /packages/dhcpcd/strato.yml: -------------------------------------------------------------------------------- 1 | exclude: 2 | - usr/include 3 | - usr/share/doc 4 | - usr/share/info 5 | - usr/share/man 6 | -------------------------------------------------------------------------------- /packages/glibc/strato.yml: -------------------------------------------------------------------------------- 1 | exclude: 2 | - usr/include 3 | - usr/share/doc 4 | - usr/share/info 5 | - usr/share/man 6 | -------------------------------------------------------------------------------- /packages/jq/strato.yml: -------------------------------------------------------------------------------- 1 | exclude: 2 | - usr/include 3 | - usr/share/doc 4 | - usr/share/info 5 | - usr/share/man 6 | -------------------------------------------------------------------------------- /packages/kmod/strato.yml: -------------------------------------------------------------------------------- 1 | exclude: 2 | - usr/include 3 | - usr/share/doc 4 | - usr/share/info 5 | - usr/share/man 6 | -------------------------------------------------------------------------------- /packages/mdadm/strato.yml: -------------------------------------------------------------------------------- 1 | exclude: 2 | - usr/include 3 | - usr/share/doc 4 | - usr/share/info 5 | - usr/share/man 6 | -------------------------------------------------------------------------------- /packages/rsync/strato.yml: -------------------------------------------------------------------------------- 1 | exclude: 2 | - usr/include 3 | - usr/share/doc 4 | - usr/share/info 5 | - usr/share/man 6 | -------------------------------------------------------------------------------- /packages/sudo/strato.yml: -------------------------------------------------------------------------------- 1 | exclude: 2 | - usr/include 3 | - usr/share/doc 4 | - usr/share/info 5 | - usr/share/man 6 | -------------------------------------------------------------------------------- /src/buildorder/testpackages/a/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM strato-build 2 | 3 | RUN touch /1 4 | RUN touch /2 5 | RUN touch /3 6 | -------------------------------------------------------------------------------- /packages/busybox/strato.yml: -------------------------------------------------------------------------------- 1 | exclude: 2 | - usr/include 3 | - usr/share/doc 4 | - usr/share/info 5 | - usr/share/man 6 | -------------------------------------------------------------------------------- /packages/e2fsprogs/strato.yml: -------------------------------------------------------------------------------- 1 | exclude: 2 | - usr/include 3 | - usr/share/doc 4 | - usr/share/info 5 | - usr/share/man 6 | -------------------------------------------------------------------------------- /packages/iproute2/strato.yml: -------------------------------------------------------------------------------- 1 | exclude: 2 | - usr/include 3 | - usr/share/doc 4 | - usr/share/info 5 | - usr/share/man 6 | -------------------------------------------------------------------------------- /packages/iptables/strato.yml: -------------------------------------------------------------------------------- 1 | exclude: 2 | - usr/include 3 | - usr/share/doc 4 | - usr/share/info 5 | - usr/share/man 6 | -------------------------------------------------------------------------------- /packages/openssl/strato.yml: -------------------------------------------------------------------------------- 1 | exclude: 2 | - usr/include 3 | - usr/share/doc 4 | - usr/share/info 5 | - usr/share/man 6 | -------------------------------------------------------------------------------- /packages/syslinux/strato.yml: -------------------------------------------------------------------------------- 1 | exclude: 2 | - usr/include 3 | - usr/share/doc 4 | - usr/share/info 5 | - usr/share/man 6 | -------------------------------------------------------------------------------- /packages/ca-certificates/strato.yml: -------------------------------------------------------------------------------- 1 | exclude: 2 | - usr/include 3 | - usr/share/doc 4 | - usr/share/info 5 | - usr/share/man 6 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/.gitignore: -------------------------------------------------------------------------------- 1 | # Add no patterns to .hgignore except for files generated by the build. 2 | last-change 3 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/.gitignore: -------------------------------------------------------------------------------- 1 | # Add no patterns to .hgignore except for files generated by the build. 2 | last-change 3 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/runc/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM runc_test 2 | ADD . /go/src/github.com/opencontainers/runc 3 | RUN make 4 | -------------------------------------------------------------------------------- /packages/rsyslog/strato.yml: -------------------------------------------------------------------------------- 1 | exclude: 2 | - usr/include 3 | - usr/share/doc 4 | - usr/share/info 5 | - usr/share/man 6 | - lib/systemd 7 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/runc/.gitignore: -------------------------------------------------------------------------------- 1 | vendor/pkg 2 | /runc 3 | Godeps/_workspace/src/github.com/opencontainers/runc 4 | man/man8 5 | -------------------------------------------------------------------------------- /packages/ntp/strato.yml: -------------------------------------------------------------------------------- 1 | exclude: 2 | - usr/include 3 | - usr/share/doc 4 | - usr/share/info 5 | - usr/share/man 6 | dependencies: 7 | - openssl 8 | -------------------------------------------------------------------------------- /src/buildorder/testpackages/b/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM strato-build 2 | 3 | RUN strato add a 4 | 5 | RUN touch /1 6 | RUN touch /2 7 | RUN touch /3 8 | -------------------------------------------------------------------------------- /src/buildorder/testpackages/c/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM strato-build 2 | 3 | RUN strato add d 4 | 5 | RUN touch /1 6 | RUN touch /2 7 | RUN touch /3 8 | -------------------------------------------------------------------------------- /src/buildorder/testpackages/d/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM strato-build 2 | 3 | RUN strato add a b 4 | 5 | RUN touch /1 6 | RUN touch /2 7 | RUN touch /3 8 | -------------------------------------------------------------------------------- /packages/openssh/strato.yml: -------------------------------------------------------------------------------- 1 | exclude: 2 | - usr/include 3 | - usr/share/doc 4 | - usr/share/info 5 | - usr/share/man 6 | dependencies: 7 | - openssl 8 | - zlib 9 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/runc/libcontainer/user/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Tianon Gravi (@tianon) 2 | Aleksa Sarai (@cyphar) 3 | -------------------------------------------------------------------------------- /packages/parted/strato.yml: -------------------------------------------------------------------------------- 1 | exclude: 2 | - usr/include 3 | - usr/share/doc 4 | - usr/share/info 5 | - usr/share/man 6 | dependencies: 7 | - libuuid 8 | - libblkid 9 | -------------------------------------------------------------------------------- /assets/install-deb: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | wget -P /usr/src/ $1 5 | cd /usr/src/ 6 | ar vx *.deb 7 | unxz data.tar.xz 8 | strato xf data.tar 9 | rm * 10 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.4 5 | - 1.5 6 | - 1.6 7 | - tip 8 | 9 | go_import_path: gopkg.in/yaml.v2 10 | -------------------------------------------------------------------------------- /packages/eudev/strato.yml: -------------------------------------------------------------------------------- 1 | exclude: 2 | - usr/include 3 | - usr/share/doc 4 | - usr/share/info 5 | - usr/share/man 6 | dependencies: 7 | - zlib 8 | - xz 9 | - kmod 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/README: -------------------------------------------------------------------------------- 1 | This repository holds supplementary Go networking libraries. 2 | 3 | To submit changes to this repository, see http://golang.org/doc/contribute.html. 4 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/errors.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | // ErrorResponse is the response body of API errors. 4 | type ErrorResponse struct { 5 | Message string `json:"message"` 6 | } 7 | -------------------------------------------------------------------------------- /packages/popt/strato.yml: -------------------------------------------------------------------------------- 1 | exclude: 2 | - usr/share/doc 3 | - usr/share/info 4 | - usr/share/man 5 | subpackages: 6 | popt-dev: 7 | include: 8 | - usr/include 9 | dependencies: 10 | - popt 11 | -------------------------------------------------------------------------------- /packages/zlib/strato.yml: -------------------------------------------------------------------------------- 1 | exclude: 2 | - usr/share/doc 3 | - usr/share/info 4 | - usr/share/man 5 | subpackages: 6 | zlib-dev: 7 | include: 8 | - usr/include 9 | dependencies: 10 | - zlib 11 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go_import_path: github.com/pkg/errors 3 | go: 4 | - 1.4.3 5 | - 1.5.4 6 | - 1.6.2 7 | - tip 8 | 9 | script: 10 | - go test -v ./... 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /scripts/ci: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | cd $(dirname $0)/.. 5 | 6 | ./scripts/build-bin 7 | 8 | #./scripts/build-images 9 | 10 | #echo 11 | #echo "Images ready to push:" 12 | #cat dist/images 13 | #echo 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/client_windows.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | // DefaultDockerHost defines os specific default if DOCKER_HOST is unset 4 | const DefaultDockerHost = "npipe:////./pipe/docker_engine" 5 | -------------------------------------------------------------------------------- /.drone.yml: -------------------------------------------------------------------------------- 1 | --- 2 | pipeline: 3 | build: 4 | privileged: true 5 | image: rancher/dapper:1.11.2 6 | volumes: 7 | - /var/run/docker.sock:/var/run/docker.sock 8 | commands: 9 | - dapper ci 10 | -------------------------------------------------------------------------------- /packages/json-c/strato.yml: -------------------------------------------------------------------------------- 1 | exclude: 2 | - usr/share/doc 3 | - usr/share/info 4 | - usr/share/man 5 | subpackages: 6 | json-c-dev: 7 | include: 8 | - usr/include 9 | dependencies: 10 | - json-c 11 | -------------------------------------------------------------------------------- /packages/libestr/strato.yml: -------------------------------------------------------------------------------- 1 | exclude: 2 | - usr/share/doc 3 | - usr/share/info 4 | - usr/share/man 5 | subpackages: 6 | libestr-dev: 7 | include: 8 | - usr/include 9 | dependencies: 10 | - libestr 11 | -------------------------------------------------------------------------------- /scripts/clean: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd $(dirname $0)/.. 4 | 5 | rm -rf build dist 6 | docker rmi $(docker images --format "{{.Repository}}:{{.Tag}}" | grep -E '^(stratopkg|build)/') || true 7 | docker image prune -f || true 8 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/README: -------------------------------------------------------------------------------- 1 | This repository holds supplemental Go packages for low-level interactions with the operating system. 2 | 3 | To submit changes to this repository, see http://golang.org/doc/contribute.html. 4 | -------------------------------------------------------------------------------- /packages/readline/strato.yml: -------------------------------------------------------------------------------- 1 | exclude: 2 | - usr/share/doc 3 | - usr/share/info 4 | - usr/share/man 5 | subpackages: 6 | readline-dev: 7 | include: 8 | - usr/include 9 | dependencies: 10 | - readline 11 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.3 4 | - 1.4 5 | - 1.5 6 | - tip 7 | install: 8 | - go get -t ./... 9 | script: GOMAXPROCS=4 GORACE="halt_on_error=1" go test -race -v ./... 10 | -------------------------------------------------------------------------------- /scripts/entry: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | mkdir -p bin dist build 4 | if [ -e ./scripts/$1 ]; then 5 | ./scripts/"$@" 6 | else 7 | "$@" 8 | fi 9 | 10 | EXIT=$? 11 | 12 | chown -R $DAPPER_UID:$DAPPER_GID . 13 | 14 | exit $EXIT 15 | -------------------------------------------------------------------------------- /scripts/run: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | #source $(dirname $0)/version 5 | cd $(dirname $0)/.. 6 | 7 | docker run -it \ 8 | -v ${PWD}/dist:/packages \ 9 | strato sh -c "echo /packages/ > /etc/strato/repositories; exec sh" 10 | -------------------------------------------------------------------------------- /packages/ncurses/strato.yml: -------------------------------------------------------------------------------- 1 | exclude: 2 | - usr/include 3 | - usr/share/doc 4 | - usr/share/info 5 | - usr/share/man 6 | subpackages: 7 | ncurses-dev: 8 | include: 9 | - usr/include 10 | dependencies: 11 | - ncurses 12 | -------------------------------------------------------------------------------- /scripts/test: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | BASE=tests 5 | 6 | #source $(dirname $0)/version 7 | cd $(dirname $0)/.. 8 | 9 | for i in tests/*.sh; do 10 | docker run -v ${PWD}/dist:/packages strato sh -c "$(cat ${i})" 11 | done 12 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/terminal_bsd.go: -------------------------------------------------------------------------------- 1 | // +build darwin freebsd openbsd netbsd dragonfly 2 | 3 | package logrus 4 | 5 | import "syscall" 6 | 7 | const ioctlReadTermios = syscall.TIOCGETA 8 | 9 | type Termios syscall.Termios 10 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/README.md: -------------------------------------------------------------------------------- 1 | This directory contains code pertaining to the Docker API: 2 | 3 | - Used by the docker client when communicating with the docker daemon 4 | 5 | - Used by third party tools wishing to interface with the docker daemon 6 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/client_unix.go: -------------------------------------------------------------------------------- 1 | // +build linux freebsd solaris openbsd darwin 2 | 3 | package client 4 | 5 | // DefaultDockerHost defines os specific default if DOCKER_HOST is unset 6 | const DefaultDockerHost = "unix:///var/run/docker.sock" 7 | -------------------------------------------------------------------------------- /packages/ca-certificates/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM strato-build 2 | 3 | RUN install-deb http://http.us.debian.org/debian/pool/main/c/ca-certificates/ca-certificates_20161130+nmu1_all.deb 4 | RUN mkdir -p /etc/ssl/certs \ 5 | && cp -r /usr/share/ca-certificates/mozilla/* /etc/ssl/certs/ 6 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/runc/.pullapprove.yml: -------------------------------------------------------------------------------- 1 | approve_by_comment: true 2 | approve_regex: ^LGTM 3 | reject_regex: ^Rejected 4 | reset_on_push: true 5 | author_approval: ignored 6 | reviewers: 7 | teams: 8 | - runc-maintainers 9 | name: default 10 | required: 2 11 | -------------------------------------------------------------------------------- /packages/bash/fetch-patches: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | _i=1 4 | _pad="00" 5 | while [ $_i -le 48 ]; do 6 | [ $_i -ge 10 ] && _pad="0" 7 | [ $_i -ge 100 ] && _pad= 8 | wget -O bash43-${_pad}${_i}.patch "http://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-${_pad}${_i}" 9 | _i=$(( $_i + 1)) 10 | done 11 | -------------------------------------------------------------------------------- /packages/acl/strato.yml: -------------------------------------------------------------------------------- 1 | exclude: 2 | - usr/share/doc 3 | - usr/share/info 4 | - usr/share/man 5 | dependencies: 6 | - libacl 7 | subpackages: 8 | libacl: 9 | include: 10 | - lib 11 | - usr/lib 12 | acl-dev: 13 | include: 14 | - usr/include 15 | dependencies: 16 | - libacl 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | TEXT ·use(SB),NOSPLIT,$0 10 | RET 11 | -------------------------------------------------------------------------------- /packages/xz/strato.yml: -------------------------------------------------------------------------------- 1 | exclude: 2 | - usr/share/doc 3 | - usr/share/info 4 | - usr/share/man 5 | dependencies: 6 | - xz-libs 7 | subpackages: 8 | xz-libs: 9 | include: 10 | - lib 11 | - usr/lib 12 | xz-dev: 13 | include: 14 | - usr/include 15 | dependencies: 16 | - xz-libs 17 | -------------------------------------------------------------------------------- /packages/lvm2/strato.yml: -------------------------------------------------------------------------------- 1 | exclude: 2 | - usr/share/doc 3 | - usr/share/info 4 | - usr/share/man 5 | dependencies: 6 | - lvm2-libs 7 | subpackages: 8 | lvm2-libs: 9 | include: 10 | - lib 11 | - usr/lib 12 | lvm2-dev: 13 | include: 14 | - usr/include 15 | dependencies: 16 | - lvm2-libs 17 | -------------------------------------------------------------------------------- /packages/base-layout/profile: -------------------------------------------------------------------------------- 1 | export CHARSET=UTF-8 2 | export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 3 | export PAGER=less 4 | export PS1='\h:\w\$ ' 5 | umask 022 6 | 7 | for script in /etc/profile.d/*.sh ; do 8 | if [ -r $script ] ; then 9 | . $script 10 | fi 11 | done 12 | -------------------------------------------------------------------------------- /packages/mdadm/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM strato-build 2 | 3 | ENV VERSION 3.4 4 | ENV LDFLAGS -s 5 | RUN wget -P /usr/src/ http://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-${VERSION}.tar.gz 6 | RUN cd /usr/src/ && tar xf mdadm* 7 | RUN cd /usr/src/mdadm* \ 8 | && make 9 | 10 | RUN cd /usr/src/mdadm* \ 11 | && make install 12 | -------------------------------------------------------------------------------- /packages/syslinux/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM strato-build 2 | 3 | ENV LDFLAGS -s 4 | RUN wget -P /usr/src/ https://www.kernel.org/pub/linux/utils/boot/syslinux/6.xx/syslinux-6.03.tar.xz 5 | RUN cd /usr/src/ && tar xf syslinux* 6 | RUN cd /usr/src/syslinux* \ 7 | && make 8 | 9 | RUN cd /usr/src/syslinux* \ 10 | && make install 11 | -------------------------------------------------------------------------------- /scripts/build-packages: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | BASE=packages 5 | 6 | if [ -n "$1" ]; then 7 | BASE=$1 8 | fi 9 | 10 | source $(dirname $0)/version 11 | cd $(dirname $0)/.. 12 | 13 | dapper -d --build -f Dockerfile.build -- -t strato-build . 14 | 15 | ./bin/strato index ${BASE} dist 16 | ./bin/strato build-all ${BASE} dist 17 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-units/circle.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | post: 3 | # install golint 4 | - go get github.com/golang/lint/golint 5 | 6 | test: 7 | pre: 8 | # run analysis before tests 9 | - go vet ./... 10 | - test -z "$(golint ./... | tee /dev/stderr)" 11 | - test -z "$(gofmt -s -l . | tee /dev/stderr)" 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | /assets/ca.crt 3 | assets/repositories-build 4 | /bin 5 | /build 6 | /dist 7 | /gopath 8 | /images/*/build 9 | .dockerfile 10 | *.swp 11 | /tests/integration/MANIFEST 12 | /tests/integration/.venv* 13 | /tests/integration/.tox 14 | /tests/integration/.idea 15 | *.pyc 16 | __pycache__ 17 | /.dapper 18 | /.trash-cache 19 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-connections/sockets/sockets_windows.go: -------------------------------------------------------------------------------- 1 | package sockets 2 | 3 | import ( 4 | "net" 5 | "time" 6 | 7 | "github.com/Microsoft/go-winio" 8 | ) 9 | 10 | // DialPipe connects to a Windows named pipe. 11 | func DialPipe(addr string, timeout time.Duration) (net.Conn, error) { 12 | return winio.DialPipe(addr, &timeout) 13 | } 14 | -------------------------------------------------------------------------------- /packages/acpi/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM strato-build 2 | 3 | ENV VERSION 1.7 4 | ENV LDFLAGS -s 5 | RUN wget -P /usr/src/ http://downloads.sourceforge.net/acpiclient/acpi-${VERSION}.tar.gz 6 | RUN cd /usr/src/ && tar xf acpi* 7 | RUN cd /usr/src/acpi* \ 8 | && ./configure --prefix=/usr \ 9 | && make 10 | 11 | RUN cd /usr/src/acpi* \ 12 | && make install 13 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/interface_stable.go: -------------------------------------------------------------------------------- 1 | // +build !experimental 2 | 3 | package client 4 | 5 | // APIClient is an interface that clients that talk with a docker server must implement. 6 | type APIClient interface { 7 | CommonAPIClient 8 | } 9 | 10 | // Ensure that Client always implements APIClient. 11 | var _ APIClient = &Client{} 12 | -------------------------------------------------------------------------------- /packages/glibc/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM strato-build 2 | 3 | RUN install-deb http://mirrors.kernel.org/ubuntu/pool/main/g/gccgo-6/libgcc1_6.0.1-0ubuntu1_amd64.deb \ 4 | && install-deb http://mirrors.kernel.org/ubuntu/pool/main/g/gccgo-6/gcc-6-base_6.0.1-0ubuntu1_amd64.deb \ 5 | && install-deb http://mirrors.kernel.org/ubuntu/pool/main/g/glibc/libc6_2.23-0ubuntu3_amd64.deb 6 | -------------------------------------------------------------------------------- /packages/zlib/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM strato-build 2 | 3 | ENV LDFLAGS -s 4 | RUN wget -P /usr/src/ http://zlib.net/zlib-1.2.11.tar.gz 5 | RUN cd /usr/src/ && tar xf zlib* 6 | RUN cd /usr/src/zlib* \ 7 | && ./configure \ 8 | --prefix=/usr \ 9 | --libdir=/lib \ 10 | --shared \ 11 | && make 12 | 13 | RUN cd /usr/src/zlib* \ 14 | && make install 15 | -------------------------------------------------------------------------------- /src/utils/args.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | import ( 4 | "os" 5 | "path/filepath" 6 | "runtime" 7 | ) 8 | 9 | // GetOutDir returns the output dir for this arch (makes it if it needs to) 10 | func GetOutDir(dir string) (string, error) { 11 | outDir := filepath.Join(dir, runtime.GOARCH) 12 | err := os.MkdirAll(outDir, 0755) 13 | 14 | return outDir, err 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/tlsconfig/tlsconfig_clone.go: -------------------------------------------------------------------------------- 1 | // +build go1.8 2 | 3 | package tlsconfig 4 | 5 | import "crypto/tls" 6 | 7 | // Clone returns a clone of tls.Config. This function is provided for 8 | // compatibility for go1.7 that doesn't include this method in stdlib. 9 | func Clone(c *tls.Config) *tls.Config { 10 | return c.Clone() 11 | } 12 | -------------------------------------------------------------------------------- /packages/openssl/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM strato-build 2 | 3 | # TODO: this shouldn't need to be removed 4 | RUN rm /usr/share/doc/openssl/changelog.gz 5 | 6 | RUN install-deb http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.0.0_1.0.2g-1ubuntu4.10_amd64.deb \ 7 | && install-deb http://security.ubuntu.com/ubuntu/pool/main/o/openssl/openssl_1.0.2g-1ubuntu4.10_amd64.deb 8 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/service_remove.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import "golang.org/x/net/context" 4 | 5 | // ServiceRemove kills and removes a service. 6 | func (cli *Client) ServiceRemove(ctx context.Context, serviceID string) error { 7 | resp, err := cli.delete(ctx, "/services/"+serviceID, nil, nil) 8 | ensureReaderClosed(resp) 9 | return err 10 | } 11 | -------------------------------------------------------------------------------- /packages/ntp/ntp.conf: -------------------------------------------------------------------------------- 1 | server 0.pool.ntp.org iburst 2 | server 1.pool.ntp.org iburst 3 | server 2.pool.ntp.org iburst 4 | server 3.pool.ntp.org iburst 5 | 6 | # Allow only time queries, at a limited rate, sending KoD when in excess. 7 | # Allow all local queries (IPv4, IPv6) 8 | restrict default nomodify nopeer noquery limited kod 9 | restrict 127.0.0.1 10 | restrict [::1] 11 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/terminal_solaris.go: -------------------------------------------------------------------------------- 1 | // +build solaris 2 | 3 | package logrus 4 | 5 | import ( 6 | "os" 7 | 8 | "golang.org/x/sys/unix" 9 | ) 10 | 11 | // IsTerminal returns true if the given file descriptor is a terminal. 12 | func IsTerminal() bool { 13 | _, err := unix.IoctlGetTermios(int(os.Stdout.Fd()), unix.TCGETA) 14 | return err == nil 15 | } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/constants.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | const ( 10 | R_OK = 0x4 11 | W_OK = 0x2 12 | X_OK = 0x1 13 | ) 14 | -------------------------------------------------------------------------------- /src/buildorder/convert_test.go: -------------------------------------------------------------------------------- 1 | package buildorder 2 | 3 | import ( 4 | "reflect" 5 | "testing" 6 | ) 7 | 8 | func TestBuildOrder(t *testing.T) { 9 | buildOrder, err := Get("./testpackages") 10 | if err != nil { 11 | t.Fatal(err) 12 | } 13 | if !reflect.DeepEqual(buildOrder, []string{ 14 | "a", 15 | "b", 16 | "d", 17 | "c", 18 | }) { 19 | t.Fail() 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-connections/sockets/sockets_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package sockets 4 | 5 | import ( 6 | "net" 7 | "syscall" 8 | "time" 9 | ) 10 | 11 | // DialPipe connects to a Windows named pipe. 12 | // This is not supported on other OSes. 13 | func DialPipe(_ string, _ time.Duration) (net.Conn, error) { 14 | return nil, syscall.EAFNOSUPPORT 15 | } 16 | -------------------------------------------------------------------------------- /packages/libestr/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM strato-build 2 | 3 | ENV VERSION 0.1.10 4 | ENV LDFLAGS -s 5 | RUN wget -P /usr/src/ http://libestr.adiscon.com/files/download/libestr-${VERSION}.tar.gz 6 | RUN cd /usr/src/ && tar xf libestr* 7 | RUN cd /usr/src/libestr* \ 8 | && ./configure \ 9 | --prefix=/usr \ 10 | && make 11 | 12 | RUN cd /usr/src/libestr* \ 13 | && make install 14 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/terminal_linux.go: -------------------------------------------------------------------------------- 1 | // Based on ssh/terminal: 2 | // Copyright 2013 The Go Authors. All rights reserved. 3 | // Use of this source code is governed by a BSD-style 4 | // license that can be found in the LICENSE file. 5 | 6 | package logrus 7 | 8 | import "syscall" 9 | 10 | const ioctlReadTermios = syscall.TCGETS 11 | 12 | type Termios syscall.Termios 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_no_getwd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build dragonfly freebsd netbsd openbsd 6 | 7 | package unix 8 | 9 | const ImplementsGetwd = false 10 | 11 | func Getwd() (string, error) { return "", ENOTSUP } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zsysnum_solaris_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,solaris 6 | 7 | package unix 8 | 9 | // TODO(aram): remove these before Go 1.3. 10 | const ( 11 | SYS_EXECVE = 59 12 | SYS_FCNTL = 62 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/network_remove.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import "golang.org/x/net/context" 4 | 5 | // NetworkRemove removes an existent network from the docker host. 6 | func (cli *Client) NetworkRemove(ctx context.Context, networkID string) error { 7 | resp, err := cli.delete(ctx, "/networks/"+networkID, nil, nil) 8 | ensureReaderClosed(resp) 9 | return err 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/time/duration_convert.go: -------------------------------------------------------------------------------- 1 | package time 2 | 3 | import ( 4 | "strconv" 5 | "time" 6 | ) 7 | 8 | // DurationToSecondsString converts the specified duration to the number 9 | // seconds it represents, formatted as a string. 10 | func DurationToSecondsString(duration time.Duration) string { 11 | return strconv.FormatFloat(duration.Seconds(), 'f', 0, 64) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/env_unset.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.4 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | func Unsetenv(key string) error { 12 | // This was added in Go 1.4. 13 | return syscall.Unsetenv(key) 14 | } 15 | -------------------------------------------------------------------------------- /packages/popt/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM strato-build 2 | 3 | ENV VERSION 1.16 4 | ENV LDFLAGS -s 5 | RUN wget -P /usr/src/ http://rpm5.org/files/popt/popt-${VERSION}.tar.gz 6 | RUN cd /usr/src/ && tar xf popt* 7 | RUN cd /usr/src/popt* \ 8 | && ./configure \ 9 | --prefix=/usr \ 10 | --libdir=/lib \ 11 | --disable-static \ 12 | && make 13 | 14 | RUN cd /usr/src/popt* \ 15 | && make install 16 | -------------------------------------------------------------------------------- /scripts/version: -------------------------------------------------------------------------------- 1 | if [ -z "${ARCH}" ]; then 2 | echo "ARCH must be set" 3 | exit 1 4 | fi 5 | 6 | export SUFFIX="" 7 | if [ -n "${ARCH}" ] && [ "${ARCH}" != "amd64" ]; then 8 | SUFFIX="_${ARCH}" 9 | fi 10 | 11 | if [ -z "${VERSION}" ]; then 12 | echo "Using \"dev\" as version" 13 | VERSION=dev 14 | fi 15 | 16 | export TAG="${VERSION}${SUFFIX}" 17 | 18 | export DOCKER_API_VERSION=1.22 19 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/plugin_enable.go: -------------------------------------------------------------------------------- 1 | // +build experimental 2 | 3 | package client 4 | 5 | import ( 6 | "golang.org/x/net/context" 7 | ) 8 | 9 | // PluginEnable enables a plugin 10 | func (cli *Client) PluginEnable(ctx context.Context, name string) error { 11 | resp, err := cli.post(ctx, "/plugins/"+name+"/enable", nil, nil, nil) 12 | ensureReaderClosed(resp) 13 | return err 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/swarm_join.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "github.com/docker/docker/api/types/swarm" 5 | "golang.org/x/net/context" 6 | ) 7 | 8 | // SwarmJoin joins the Swarm. 9 | func (cli *Client) SwarmJoin(ctx context.Context, req swarm.JoinRequest) error { 10 | resp, err := cli.post(ctx, "/swarm/join", nil, req, nil) 11 | ensureReaderClosed(resp) 12 | return err 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/plugin_disable.go: -------------------------------------------------------------------------------- 1 | // +build experimental 2 | 3 | package client 4 | 5 | import ( 6 | "golang.org/x/net/context" 7 | ) 8 | 9 | // PluginDisable disables a plugin 10 | func (cli *Client) PluginDisable(ctx context.Context, name string) error { 11 | resp, err := cli.post(ctx, "/plugins/"+name+"/disable", nil, nil, nil) 12 | ensureReaderClosed(resp) 13 | return err 14 | } 15 | -------------------------------------------------------------------------------- /src/version/version.go: -------------------------------------------------------------------------------- 1 | package version 2 | 3 | import "runtime" 4 | 5 | var ( 6 | Arch string 7 | Suffix string 8 | Tag string 9 | Version string 10 | ) 11 | 12 | func init() { 13 | if Arch == "" { 14 | Arch = runtime.GOARCH 15 | } 16 | if Suffix == "" && Arch != "amd64" { 17 | Suffix = "_" + Arch 18 | } 19 | if Version == "" { 20 | Version = "dev" 21 | } 22 | Tag = Version + Suffix 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_unpause.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import "golang.org/x/net/context" 4 | 5 | // ContainerUnpause resumes the process execution within a container 6 | func (cli *Client) ContainerUnpause(ctx context.Context, containerID string) error { 7 | resp, err := cli.post(ctx, "/containers/"+containerID+"/unpause", nil, nil, nil) 8 | ensureReaderClosed(resp) 9 | return err 10 | } 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/.gitattributes: -------------------------------------------------------------------------------- 1 | # Treat all files in this repo as binary, with no git magic updating 2 | # line endings. Windows users contributing to Go will need to use a 3 | # modern version of git and editors capable of LF line endings. 4 | # 5 | # We'll prevent accidental CRLF line endings from entering the repo 6 | # via the git-review gofmt checks. 7 | # 8 | # See golang.org/issue/9281 9 | 10 | * -text 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/.gitattributes: -------------------------------------------------------------------------------- 1 | # Treat all files in this repo as binary, with no git magic updating 2 | # line endings. Windows users contributing to Go will need to use a 3 | # modern version of git and editors capable of LF line endings. 4 | # 5 | # We'll prevent accidental CRLF line endings from entering the repo 6 | # via the git-review gofmt checks. 7 | # 8 | # See golang.org/issue/9281 9 | 10 | * -text 11 | -------------------------------------------------------------------------------- /scripts/build-bin: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | source $(dirname $0)/version 5 | cd $(dirname $0)/.. 6 | 7 | LDFLAGS="-X github.com/rancher/strato/src/version.Version=${VERSION} -s -w" 8 | ARCHES=(amd64 arm arm64) 9 | 10 | go build -ldflags="${LDFLAGS}" -o bin/strato src/main.go 11 | for ARCH in ${ARCHES[@]}; do 12 | GOOS=linux GOARCH=${ARCH} go build -ldflags="${LDFLAGS}" -o bin/strato_${ARCH} src/main.go 13 | done 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_pause.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import "golang.org/x/net/context" 4 | 5 | // ContainerPause pauses the main process of a given container without terminating it. 6 | func (cli *Client) ContainerPause(ctx context.Context, containerID string) error { 7 | resp, err := cli.post(ctx, "/containers/"+containerID+"/pause", nil, nil, nil) 8 | ensureReaderClosed(resp) 9 | return err 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/plugin_set.go: -------------------------------------------------------------------------------- 1 | // +build experimental 2 | 3 | package client 4 | 5 | import ( 6 | "golang.org/x/net/context" 7 | ) 8 | 9 | // PluginSet modifies settings for an existing plugin 10 | func (cli *Client) PluginSet(ctx context.Context, name string, args []string) error { 11 | resp, err := cli.post(ctx, "/plugins/"+name+"/set", nil, args, nil) 12 | ensureReaderClosed(resp) 13 | return err 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/swarm_leave.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "net/url" 5 | 6 | "golang.org/x/net/context" 7 | ) 8 | 9 | // SwarmLeave leaves the Swarm. 10 | func (cli *Client) SwarmLeave(ctx context.Context, force bool) error { 11 | query := url.Values{} 12 | if force { 13 | query.Set("force", "1") 14 | } 15 | resp, err := cli.post(ctx, "/swarm/leave", query, nil, nil) 16 | ensureReaderClosed(resp) 17 | return err 18 | } 19 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/flock_linux_32bit.go: -------------------------------------------------------------------------------- 1 | // +build linux,386 linux,arm 2 | 3 | // Copyright 2014 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package unix 8 | 9 | func init() { 10 | // On 32-bit Linux systems, the fcntl syscall that matches Go's 11 | // Flock_t type is SYS_FCNTL64, not SYS_FCNTL. 12 | fcntl64Syscall = SYS_FCNTL64 13 | } 14 | -------------------------------------------------------------------------------- /packages/ncurses/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM strato-build 2 | 3 | ENV VERSION 6.0 4 | RUN wget -P /usr/src/ https://ftp.gnu.org/gnu/ncurses/ncurses-${VERSION}.tar.gz 5 | RUN cd /usr/src/ && tar xf ncurses* 6 | RUN cd /usr/src/ncurses* \ 7 | && CPPFLAGS=-P ./configure \ 8 | --with-shared \ 9 | --without-debug \ 10 | --without-ada \ 11 | --enable-widec \ 12 | --enable-overwrite \ 13 | && make 14 | 15 | RUN cd /usr/src/ncurses* \ 16 | && make install 17 | -------------------------------------------------------------------------------- /packages/acl/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM strato-build 2 | 3 | ENV VERSION 2.2.52 4 | ENV LDFLAGS -s 5 | RUN wget -P /usr/src/ http://download.savannah.gnu.org/releases/acl/acl-${VERSION}.src.tar.gz 6 | RUN cd /usr/src/ && tar xf acl* 7 | RUN cd /usr/src/acl* \ 8 | && ./configure \ 9 | --prefix=/usr \ 10 | --libdir=/lib \ 11 | --libexecdir=/usr/lib \ 12 | --disable-gettext \ 13 | && make 14 | 15 | RUN cd /usr/src/acl* \ 16 | && make install install-lib install-dev 17 | -------------------------------------------------------------------------------- /packages/iproute2/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM strato-build 2 | 3 | ENV VERSION 4.7.0 4 | ENV LDFLAGS -s 5 | RUN wget -P /usr/src/ http://kernel.org/pub/linux/utils/net/iproute2/iproute2-${VERSION}.tar.xz 6 | RUN cd /usr/src/ && tar xf iproute2* 7 | RUN cd /usr/src/iproute2* \ 8 | && ./configure \ 9 | --prefix=/usr \ 10 | --sysconfdir=/etc \ 11 | --mandir=/usr/share/man \ 12 | --localstatedir=/var \ 13 | && make 14 | 15 | RUN cd /usr/src/iproute2* \ 16 | && make install 17 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/checkpoint_delete.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "golang.org/x/net/context" 5 | ) 6 | 7 | // CheckpointDelete deletes the checkpoint with the given name from the given container 8 | func (cli *Client) CheckpointDelete(ctx context.Context, containerID string, checkpointID string) error { 9 | resp, err := cli.delete(ctx, "/containers/"+containerID+"/checkpoints/"+checkpointID, nil, nil) 10 | ensureReaderClosed(resp) 11 | return err 12 | } 13 | -------------------------------------------------------------------------------- /packages/rsync/Dockerfile: -------------------------------------------------------------------------------- 1 | # TODO: remove dependency on attr 2 | FROM strato-build 3 | 4 | ENV VERSION 3.1.2 5 | ENV LDFLAGS -s 6 | RUN wget -P /usr/src/ http://rsync.samba.org/ftp/rsync/rsync-${VERSION}.tar.gz 7 | RUN cd /usr/src/ && tar xf rsync* 8 | RUN cd /usr/src/rsync* \ 9 | && ./configure \ 10 | --prefix=/usr \ 11 | --sysconfdir=/etc \ 12 | --mandir=/usr/share/man \ 13 | --localstatedir=/var \ 14 | && make 15 | 16 | RUN cd /usr/src/rsync* \ 17 | && make install 18 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/runc/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Michael Crosby (@crosbymichael) 2 | Rohit Jnagal (@rjnagal) 3 | Victor Marmol (@vmarmol) 4 | Mrunal Patel (@mrunalp) 5 | Alexander Morozov (@LK4D4) 6 | Daniel, Dao Quang Minh (@dqminh) 7 | Andrey Vagin (@avagin) 8 | Qiang Huang (@hqhq) 9 | Aleksa Sarai (@cyphar) 10 | -------------------------------------------------------------------------------- /packages/readline/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM strato-build 2 | 3 | ENV VERSION 7.0 4 | ENV LDFLAGS -s 5 | RUN wget -P /usr/src/ https://ftp.gnu.org/gnu/readline/readline-${VERSION}.tar.gz 6 | RUN cd /usr/src/ && tar xf readline* 7 | RUN cd /usr/src/readline* \ 8 | && ./configure \ 9 | --prefix=/usr \ 10 | --mandir=/usr/share/man \ 11 | --infodir=/usr/share/info \ 12 | --disable-static \ 13 | --enable-shared \ 14 | && make 15 | 16 | RUN cd /usr/src/readline* \ 17 | && make install 18 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-connections/circle.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | pre: 3 | # setup ipv6 4 | - sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=0 net.ipv6.conf.default.disable_ipv6=0 net.ipv6.conf.all.disable_ipv6=0 5 | post: 6 | # install golint 7 | - go get github.com/golang/lint/golint 8 | 9 | test: 10 | pre: 11 | # run analysis before tests 12 | - go vet ./... 13 | - test -z "$(golint ./... | tee /dev/stderr)" 14 | - test -z "$(gofmt -s -l . | tee /dev/stderr)" 15 | -------------------------------------------------------------------------------- /packages/jq/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM strato-build 2 | 3 | ENV VERSION 1.5 4 | ENV LDFLAGS -s 5 | RUN wget -P /usr/src/ https://github.com/stedolan/jq/releases/download/jq-${VERSION}/jq-${VERSION}.tar.gz 6 | COPY CVE-2015-8863.patch /usr/src/ 7 | RUN cd /usr/src/ && tar xf jq* 8 | RUN cd /usr/src/jq* && for i in ../*.patch; do patch -p1 < ${i}; done 9 | RUN cd /usr/src/jq* \ 10 | && ./configure --prefix=/usr --disable-docs \ 11 | && make 12 | 13 | RUN cd /usr/src/jq* \ 14 | && make prefix=/usr install 15 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/plugin_push.go: -------------------------------------------------------------------------------- 1 | // +build experimental 2 | 3 | package client 4 | 5 | import ( 6 | "golang.org/x/net/context" 7 | ) 8 | 9 | // PluginPush pushes a plugin to a registry 10 | func (cli *Client) PluginPush(ctx context.Context, name string, registryAuth string) error { 11 | headers := map[string][]string{"X-Registry-Auth": {registryAuth}} 12 | resp, err := cli.post(ctx, "/plugins/"+name+"/push", nil, nil, headers) 13 | ensureReaderClosed(resp) 14 | return err 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/volume_remove.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "net/url" 5 | 6 | "golang.org/x/net/context" 7 | ) 8 | 9 | // VolumeRemove removes a volume from the docker host. 10 | func (cli *Client) VolumeRemove(ctx context.Context, volumeID string, force bool) error { 11 | query := url.Values{} 12 | if force { 13 | query.Set("force", "1") 14 | } 15 | resp, err := cli.delete(ctx, "/volumes/"+volumeID, query, nil) 16 | ensureReaderClosed(resp) 17 | return err 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/docker/distribution/coverpkg.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Given a subpackage and the containing package, figures out which packages 3 | # need to be passed to `go test -coverpkg`: this includes all of the 4 | # subpackage's dependencies within the containing package, as well as the 5 | # subpackage itself. 6 | DEPENDENCIES="$(go list -f $'{{range $f := .Deps}}{{$f}}\n{{end}}' ${1} | grep ${2} | grep -v github.com/docker/distribution/vendor)" 7 | echo "${1} ${DEPENDENCIES}" | xargs echo -n | tr ' ' ',' 8 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/proxy/direct.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package proxy 6 | 7 | import ( 8 | "net" 9 | ) 10 | 11 | type direct struct{} 12 | 13 | // Direct is a direct proxy: one that makes network connections directly. 14 | var Direct = direct{} 15 | 16 | func (direct) Dial(network, addr string) (net.Conn, error) { 17 | return net.Dial(network, addr) 18 | } 19 | -------------------------------------------------------------------------------- /packages/dhcpcd/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM strato-build 2 | 3 | ENV VERSION 6.11.5 4 | ENV LDFLAGS -s 5 | RUN wget -P /usr/src/ http://roy.marples.name/downloads/dhcpcd/dhcpcd-${VERSION}.tar.xz 6 | RUN cd /usr/src/ && tar xf dhcpcd* 7 | RUN cd /usr/src/dhcpcd* \ 8 | && ./configure \ 9 | --sysconfdir=/etc \ 10 | --mandir=/usr/share/man \ 11 | --localstatedir=/var \ 12 | --libexecdir=/usr/lib/dhcpcd \ 13 | --dbdir=/var/lib/dhcpcd \ 14 | && make 15 | 16 | RUN cd /usr/src/dhcpcd* \ 17 | && make install 18 | -------------------------------------------------------------------------------- /packages/xz/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM strato-build 2 | 3 | ENV VERSION 5.2.2 4 | ENV LDFLAGS -s 5 | RUN wget -P /usr/src/ http://tukaani.org/xz/xz-${VERSION}.tar.gz 6 | RUN cd /usr/src/ && tar xf xz* 7 | RUN cd /usr/src/xz* \ 8 | && ./configure \ 9 | --prefix=/usr \ 10 | --sysconfdir=/etc \ 11 | --mandir=/usr/share/man \ 12 | --infodir=/usr/share/info \ 13 | --localstatedir=/var \ 14 | --disable-rpath \ 15 | --disable-werror \ 16 | && make 17 | 18 | RUN cd /usr/src/xz* \ 19 | && make install 20 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-connections/tlsconfig/config_legacy_client_ciphers.go: -------------------------------------------------------------------------------- 1 | // +build !go1.5 2 | 3 | // Package tlsconfig provides primitives to retrieve secure-enough TLS configurations for both clients and servers. 4 | // 5 | package tlsconfig 6 | 7 | import ( 8 | "crypto/tls" 9 | ) 10 | 11 | // Client TLS cipher suites (dropping CBC ciphers for client preferred suite set) 12 | var clientCipherSuites = []uint16{ 13 | tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, 14 | tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_rename.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "net/url" 5 | 6 | "golang.org/x/net/context" 7 | ) 8 | 9 | // ContainerRename changes the name of a given container. 10 | func (cli *Client) ContainerRename(ctx context.Context, containerID, newContainerName string) error { 11 | query := url.Values{} 12 | query.Set("name", newContainerName) 13 | resp, err := cli.post(ctx, "/containers/"+containerID+"/rename", query, nil, nil) 14 | ensureReaderClosed(resp) 15 | return err 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/checkpoint_create.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "github.com/docker/docker/api/types" 5 | "golang.org/x/net/context" 6 | ) 7 | 8 | // CheckpointCreate creates a checkpoint from the given container with the given name 9 | func (cli *Client) CheckpointCreate(ctx context.Context, container string, options types.CheckpointCreateOptions) error { 10 | resp, err := cli.post(ctx, "/containers/"+container+"/checkpoints", nil, options, nil) 11 | ensureReaderClosed(resp) 12 | return err 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_solaris_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go 11 | // 12 | 13 | TEXT ·sysvicall6(SB),NOSPLIT,$0-64 14 | JMP syscall·sysvicall6(SB) 15 | 16 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-64 17 | JMP syscall·rawSysvicall6(SB) 18 | -------------------------------------------------------------------------------- /packages/busybox/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM strato-build 2 | 3 | ENV LDFLAGS -s 4 | RUN wget -P /usr/src/ https://busybox.net/downloads/busybox-1.25.1.tar.bz2 5 | COPY .config /usr/src/ 6 | RUN cd /usr/src/ && tar xf busybox* 7 | RUN cd /usr/src/busybox* \ 8 | && mv ../.config ./ \ 9 | && make silentoldconfig \ 10 | && make 11 | 12 | RUN cd /usr/src/busybox* \ 13 | && install -m 755 busybox /bin/busybox \ 14 | && cd / \ 15 | && for i in $(busybox --list-full); do [ -e $i ] && busybox rm $i; busybox ln -s /bin/busybox $i; done 16 | -------------------------------------------------------------------------------- /scripts/dev: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -ex 3 | 4 | # lets default ARCH 5 | if [ "$ARCH" == "" ]; then 6 | ARCH=$(go env | grep GOARCH) 7 | fi 8 | 9 | BASE=packages 10 | 11 | if [ -n "$1" ]; then 12 | BASE=$1 13 | fi 14 | 15 | cd $(dirname $0)/.. 16 | source scripts/version 17 | source scripts/webserver 18 | 19 | #dapper -d --build -f Dockerfile.build -- -t strato-build . 20 | docker build -f Dockerfile.build -t strato-build . 21 | 22 | ./bin/strato index ${BASE} dist 23 | ./bin/strato build-all ${BASE} dist 24 | 25 | ./scripts/build-base 26 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/runc/libcontainer/user/lookup_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris 2 | 3 | package user 4 | 5 | import "io" 6 | 7 | func GetPasswdPath() (string, error) { 8 | return "", ErrUnsupported 9 | } 10 | 11 | func GetPasswd() (io.ReadCloser, error) { 12 | return nil, ErrUnsupported 13 | } 14 | 15 | func GetGroupPath() (string, error) { 16 | return "", ErrUnsupported 17 | } 18 | 19 | func GetGroup() (io.ReadCloser, error) { 20 | return nil, ErrUnsupported 21 | } 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/context/ctxhttp/cancelreq.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.5 6 | 7 | package ctxhttp 8 | 9 | import "net/http" 10 | 11 | func canceler(client *http.Client, req *http.Request) func() { 12 | // TODO(djd): Respect any existing value of req.Cancel. 13 | ch := make(chan struct{}) 14 | req.Cancel = ch 15 | 16 | return func() { 17 | close(ch) 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /packages/iptables/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM strato-build 2 | 3 | ENV VERSION 1.6.0 4 | ENV LDFLAGS -s 5 | RUN wget -P /usr/src/ http://ftp.netfilter.org/pub/iptables/iptables-${VERSION}.tar.bz2 6 | RUN cd /usr/src/ && tar xf iptables* 7 | RUN cd /usr/src/iptables* \ 8 | && ./configure \ 9 | --prefix=/usr \ 10 | --mandir=/usr/share/man \ 11 | --sbindir=/sbin \ 12 | --without-kernel \ 13 | --enable-devel \ 14 | --enable-libipq \ 15 | --enable-shared \ 16 | && make 17 | 18 | RUN cd /usr/src/iptables* \ 19 | && make install 20 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/node_remove.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "net/url" 5 | 6 | "github.com/docker/docker/api/types" 7 | 8 | "golang.org/x/net/context" 9 | ) 10 | 11 | // NodeRemove removes a Node. 12 | func (cli *Client) NodeRemove(ctx context.Context, nodeID string, options types.NodeRemoveOptions) error { 13 | query := url.Values{} 14 | if options.Force { 15 | query.Set("force", "1") 16 | } 17 | 18 | resp, err := cli.delete(ctx, "/nodes/"+nodeID, query, nil) 19 | ensureReaderClosed(resp) 20 | return err 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_kill.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "net/url" 5 | 6 | "golang.org/x/net/context" 7 | ) 8 | 9 | // ContainerKill terminates the container process but does not remove the container from the docker host. 10 | func (cli *Client) ContainerKill(ctx context.Context, containerID, signal string) error { 11 | query := url.Values{} 12 | query.Set("signal", signal) 13 | 14 | resp, err := cli.post(ctx, "/containers/"+containerID+"/kill", query, nil, nil) 15 | ensureReaderClosed(resp) 16 | return err 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-connections/README.md: -------------------------------------------------------------------------------- 1 | [![GoDoc](https://godoc.org/github.com/docker/go-connections?status.svg)](https://godoc.org/github.com/docker/go-connections) 2 | 3 | # Introduction 4 | 5 | go-connections provides common package to work with network connections. 6 | 7 | ## Usage 8 | 9 | See the [docs in godoc](https://godoc.org/github.com/docker/go-connections) for examples and documentation. 10 | 11 | ## License 12 | 13 | go-connections is licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) for the full license text. 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gccgo,linux,amd64 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | //extern gettimeofday 12 | func realGettimeofday(*Timeval, *byte) int32 13 | 14 | func gettimeofday(tv *Timeval) (err syscall.Errno) { 15 | r := realGettimeofday(tv, nil) 16 | if r < 0 { 17 | return syscall.GetErrno() 18 | } 19 | return 0 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/docker/distribution/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:1.6-alpine 2 | 3 | ENV DISTRIBUTION_DIR /go/src/github.com/docker/distribution 4 | ENV DOCKER_BUILDTAGS include_oss include_gcs 5 | 6 | RUN set -ex \ 7 | && apk add --no-cache make git 8 | 9 | WORKDIR $DISTRIBUTION_DIR 10 | COPY . $DISTRIBUTION_DIR 11 | COPY cmd/registry/config-dev.yml /etc/docker/registry/config.yml 12 | 13 | RUN make PREFIX=/go clean binaries 14 | 15 | VOLUME ["/var/lib/registry"] 16 | EXPOSE 5000 17 | ENTRYPOINT ["registry"] 18 | CMD ["serve", "/etc/docker/registry/config.yml"] 19 | -------------------------------------------------------------------------------- /src/cmd/xf/xf.go: -------------------------------------------------------------------------------- 1 | package xf 2 | 3 | import ( 4 | "os" 5 | 6 | "github.com/urfave/cli" 7 | 8 | "github.com/rancher/strato/src/utils" 9 | ) 10 | 11 | var Command = cli.Command{ 12 | Name: "xf", 13 | HideHelp: true, 14 | SkipFlagParsing: true, 15 | Action: Action, 16 | Hidden: true, 17 | } 18 | 19 | func Action(c *cli.Context) error { 20 | filename := c.Args().Get(0) 21 | 22 | f, err := os.Open(filename) 23 | if err != nil { 24 | return err 25 | } 26 | 27 | defer f.Close() 28 | 29 | return utils.ExtractTar(f, "/", nil, nil) 30 | } 31 | -------------------------------------------------------------------------------- /Dockerfile.build: -------------------------------------------------------------------------------- 1 | FROM ubuntu 2 | # FROM amd64=ubuntu:16.04 arm64=aarch64/ubuntu:16.04 arm=armhf/ubuntu:16.04 3 | 4 | RUN apt-get update \ 5 | && apt-get install -y build-essential pkg-config wget bison \ 6 | flex iptables-dev libnftnl-dev libmnl-dev gperf libglib2.0-dev \ 7 | libkmod-dev uuid-dev libblkid-dev autoconf automake libtool libssl-dev nasm perl attr-dev 8 | 9 | COPY bin/strato /sbin/ 10 | COPY assets/repositories-build /etc/strato/repositories 11 | COPY assets/install-deb /usr/bin/install-deb 12 | RUN mkdir -p /var/lib/strato && touch /var/lib/strato/packages 13 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/network_disconnect.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "github.com/docker/docker/api/types" 5 | "golang.org/x/net/context" 6 | ) 7 | 8 | // NetworkDisconnect disconnects a container from an existent network in the docker host. 9 | func (cli *Client) NetworkDisconnect(ctx context.Context, networkID, containerID string, force bool) error { 10 | nd := types.NetworkDisconnect{Container: containerID, Force: force} 11 | resp, err := cli.post(ctx, "/networks/"+networkID+"/disconnect", nil, nd, nil) 12 | ensureReaderClosed(resp) 13 | return err 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/node_update.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "net/url" 5 | "strconv" 6 | 7 | "github.com/docker/docker/api/types/swarm" 8 | "golang.org/x/net/context" 9 | ) 10 | 11 | // NodeUpdate updates a Node. 12 | func (cli *Client) NodeUpdate(ctx context.Context, nodeID string, version swarm.Version, node swarm.NodeSpec) error { 13 | query := url.Values{} 14 | query.Set("version", strconv.FormatUint(version.Index, 10)) 15 | resp, err := cli.post(ctx, "/nodes/"+nodeID+"/update", query, node, nil) 16 | ensureReaderClosed(resp) 17 | return err 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/plugin_remove.go: -------------------------------------------------------------------------------- 1 | // +build experimental 2 | 3 | package client 4 | 5 | import ( 6 | "net/url" 7 | 8 | "github.com/docker/docker/api/types" 9 | "golang.org/x/net/context" 10 | ) 11 | 12 | // PluginRemove removes a plugin 13 | func (cli *Client) PluginRemove(ctx context.Context, name string, options types.PluginRemoveOptions) error { 14 | query := url.Values{} 15 | if options.Force { 16 | query.Set("force", "1") 17 | } 18 | 19 | resp, err := cli.delete(ctx, "/plugins/"+name, query, nil) 20 | ensureReaderClosed(resp) 21 | return err 22 | } 23 | -------------------------------------------------------------------------------- /packages/json-c/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM strato-build 2 | RUN strato add xz-dev 3 | 4 | ENV VERSION 0.12.1 5 | ENV LDFLAGS -s 6 | RUN wget -P /usr/src/ https://s3.amazonaws.com/json-c_releases/releases/json-c-${VERSION}.tar.gz 7 | RUN cd /usr/src/ && tar xf json-c* 8 | RUN cd /usr/src/json-c* \ 9 | && ./configure \ 10 | --prefix=/usr \ 11 | --sysconfdir=/etc \ 12 | --mandir=/usr/share/man \ 13 | --infodir=/usr/share/info \ 14 | --localstatedir=/var \ 15 | --disable-static \ 16 | --enable-shared \ 17 | && make 18 | 19 | RUN cd /usr/src/json-c* \ 20 | && make install 21 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: "{build}" 2 | 3 | os: Windows Server 2012 R2 4 | 5 | clone_folder: c:\gopath\src\github.com\urfave\cli 6 | 7 | environment: 8 | GOPATH: C:\gopath 9 | GOVERSION: 1.6 10 | PYTHON: C:\Python27-x64 11 | PYTHON_VERSION: 2.7.x 12 | PYTHON_ARCH: 64 13 | GFMXR_DEBUG: 1 14 | 15 | install: 16 | - set PATH=%GOPATH%\bin;C:\go\bin;%PATH% 17 | - go version 18 | - go env 19 | - go get github.com/urfave/gfmxr/... 20 | - go get -v -t ./... 21 | 22 | build_script: 23 | - python runtests vet 24 | - python runtests test 25 | - python runtests gfmxr 26 | -------------------------------------------------------------------------------- /packages/ntp/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM strato-build 2 | 3 | ENV LDFLAGS -s 4 | RUN wget -P /usr/src/ http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-4.2.8p9.tar.gz 5 | COPY ntp.conf config.guess config.sub /usr/src/ 6 | RUN cd /usr/src/ \ 7 | && tar xf ntp*.tar.gz \ 8 | && cd ntp* \ 9 | && cp ../config.guess ../config.sub sntp/libevent/build-aux 10 | RUN cd /usr/src/ntp* \ 11 | && ./configure \ 12 | --prefix=/usr \ 13 | --bindir=/usr/sbin \ 14 | && make 15 | 16 | RUN cd /usr/src/ntp* \ 17 | && make install \ 18 | && install -m644 -D /usr/src/ntp.conf /etc/ntp.conf 19 | -------------------------------------------------------------------------------- /packages/base-layout/shadow: -------------------------------------------------------------------------------- 1 | root:::0::::: 2 | bin:!::0::::: 3 | daemon:!::0::::: 4 | adm:!::0::::: 5 | lp:!::0::::: 6 | sync:!::0::::: 7 | shutdown:!::0::::: 8 | halt:!::0::::: 9 | mail:!::0::::: 10 | news:!::0::::: 11 | uucp:!::0::::: 12 | operator:!::0::::: 13 | man:!::0::::: 14 | postmaster:!::0::::: 15 | cron:!::0::::: 16 | ftp:!::0::::: 17 | sshd:!::0::::: 18 | at:!::0::::: 19 | squid:!::0::::: 20 | xfs:!::0::::: 21 | games:!::0::::: 22 | postgres:!::0::::: 23 | nut:!::0::::: 24 | cyrus:!::0::::: 25 | vpopmail:!::0::::: 26 | ntp:!::0::::: 27 | smmsp:!::0::::: 28 | guest:!::0::::: 29 | nobody:!::0::::: 30 | -------------------------------------------------------------------------------- /packages/sudo/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM strato-build 2 | 3 | ENV VERSION 1.8.18p1 4 | ENV LDFLAGS -s 5 | RUN wget -P /usr/src/ https://www.sudo.ws/dist/sudo-${VERSION}.tar.gz 6 | RUN cd /usr/src/ && tar xf sudo* 7 | RUN cd /usr/src/sudo* \ 8 | && ./configure \ 9 | --prefix=/usr \ 10 | --libexecdir=/usr/lib \ 11 | --mandir=/usr/share/man \ 12 | --disable-nls \ 13 | --enable-pie \ 14 | --without-env-editor \ 15 | --without-pam \ 16 | --without-skey \ 17 | --with-passprompt="[sudo] password for %p: " \ 18 | && make 19 | 20 | RUN cd /usr/src/sudo* \ 21 | && make install 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/swarm_inspect.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "encoding/json" 5 | 6 | "github.com/docker/docker/api/types/swarm" 7 | "golang.org/x/net/context" 8 | ) 9 | 10 | // SwarmInspect inspects the Swarm. 11 | func (cli *Client) SwarmInspect(ctx context.Context) (swarm.Swarm, error) { 12 | serverResp, err := cli.get(ctx, "/swarm", nil, nil) 13 | if err != nil { 14 | return swarm.Swarm{}, err 15 | } 16 | 17 | var response swarm.Swarm 18 | err = json.NewDecoder(serverResp.body).Decode(&response) 19 | ensureReaderClosed(serverResp) 20 | return response, err 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-units/README.md: -------------------------------------------------------------------------------- 1 | [![GoDoc](https://godoc.org/github.com/docker/go-units?status.svg)](https://godoc.org/github.com/docker/go-units) 2 | 3 | # Introduction 4 | 5 | go-units is a library to transform human friendly measurements into machine friendly values. 6 | 7 | ## Usage 8 | 9 | See the [docs in godoc](https://godoc.org/github.com/docker/go-units) for examples and documentation. 10 | 11 | ## Copyright and license 12 | 13 | Copyright © 2015 Docker, Inc. 14 | 15 | go-units is licensed under the Apache License, Version 2.0. 16 | See [LICENSE](LICENSE) for the full text of the license. 17 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/blkiodev/blkio.go: -------------------------------------------------------------------------------- 1 | package blkiodev 2 | 3 | import "fmt" 4 | 5 | // WeightDevice is a structure that holds device:weight pair 6 | type WeightDevice struct { 7 | Path string 8 | Weight uint16 9 | } 10 | 11 | func (w *WeightDevice) String() string { 12 | return fmt.Sprintf("%s:%d", w.Path, w.Weight) 13 | } 14 | 15 | // ThrottleDevice is a structure that holds device:rate_per_second pair 16 | type ThrottleDevice struct { 17 | Path string 18 | Rate uint64 19 | } 20 | 21 | func (t *ThrottleDevice) String() string { 22 | return fmt.Sprintf("%s:%d", t.Path, t.Rate) 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_export.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "io" 5 | "net/url" 6 | 7 | "golang.org/x/net/context" 8 | ) 9 | 10 | // ContainerExport retrieves the raw contents of a container 11 | // and returns them as an io.ReadCloser. It's up to the caller 12 | // to close the stream. 13 | func (cli *Client) ContainerExport(ctx context.Context, containerID string) (io.ReadCloser, error) { 14 | serverResp, err := cli.get(ctx, "/containers/"+containerID+"/export", url.Values{}, nil) 15 | if err != nil { 16 | return nil, err 17 | } 18 | 19 | return serverResp.body, nil 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/swarm_init.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "encoding/json" 5 | 6 | "github.com/docker/docker/api/types/swarm" 7 | "golang.org/x/net/context" 8 | ) 9 | 10 | // SwarmInit initializes the Swarm. 11 | func (cli *Client) SwarmInit(ctx context.Context, req swarm.InitRequest) (string, error) { 12 | serverResp, err := cli.post(ctx, "/swarm/init", nil, req, nil) 13 | if err != nil { 14 | return "", err 15 | } 16 | 17 | var response string 18 | err = json.NewDecoder(serverResp.body).Decode(&response) 19 | ensureReaderClosed(serverResp) 20 | return response, err 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-connections/tlsconfig/config_client_ciphers.go: -------------------------------------------------------------------------------- 1 | // +build go1.5 2 | 3 | // Package tlsconfig provides primitives to retrieve secure-enough TLS configurations for both clients and servers. 4 | // 5 | package tlsconfig 6 | 7 | import ( 8 | "crypto/tls" 9 | ) 10 | 11 | // Client TLS cipher suites (dropping CBC ciphers for client preferred suite set) 12 | var clientCipherSuites = []uint16{ 13 | tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, 14 | tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, 15 | tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, 16 | tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, 17 | } 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/context/ctxhttp/cancelreq_go14.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !go1.5 6 | 7 | package ctxhttp 8 | 9 | import "net/http" 10 | 11 | type requestCanceler interface { 12 | CancelRequest(*http.Request) 13 | } 14 | 15 | func canceler(client *http.Client, req *http.Request) func() { 16 | rc, ok := client.Transport.(requestCanceler) 17 | if !ok { 18 | return func() {} 19 | } 20 | return func() { 21 | rc.CancelRequest(req) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /packages/util-linux/strato.yml: -------------------------------------------------------------------------------- 1 | exclude: 2 | - usr/share/doc 3 | - usr/share/info 4 | - usr/share/man 5 | subpackages: 6 | sfdisk: 7 | include: 8 | - sbin/sfdisk 9 | - lib/libfdisk 10 | - lib/libsmartcols 11 | agetty: 12 | include: 13 | - sbin/agetty 14 | partx: 15 | include: 16 | - usr/sbin/partx 17 | libuuid: 18 | include: 19 | - lib/libuuid 20 | - usr/lib/libuuid 21 | libblkid: 22 | include: 23 | - lib/libblkid 24 | - usr/lib/libblkid 25 | util-linux-dev: 26 | include: 27 | - usr/include 28 | dependencies: 29 | - libuuid 30 | - libblkid 31 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/image_save.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "io" 5 | "net/url" 6 | 7 | "golang.org/x/net/context" 8 | ) 9 | 10 | // ImageSave retrieves one or more images from the docker host as an io.ReadCloser. 11 | // It's up to the caller to store the images and close the stream. 12 | func (cli *Client) ImageSave(ctx context.Context, imageIDs []string) (io.ReadCloser, error) { 13 | query := url.Values{ 14 | "names": imageIDs, 15 | } 16 | 17 | resp, err := cli.get(ctx, "/images/get", query, nil) 18 | if err != nil { 19 | return nil, err 20 | } 21 | return resp.body, nil 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/version.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "encoding/json" 5 | 6 | "github.com/docker/docker/api/types" 7 | "golang.org/x/net/context" 8 | ) 9 | 10 | // ServerVersion returns information of the docker client and server host. 11 | func (cli *Client) ServerVersion(ctx context.Context) (types.Version, error) { 12 | resp, err := cli.get(ctx, "/version", nil, nil) 13 | if err != nil { 14 | return types.Version{}, err 15 | } 16 | 17 | var server types.Version 18 | err = json.NewDecoder(resp.body).Decode(&server) 19 | ensureReaderClosed(resp) 20 | return server, err 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/runc/NOTICE: -------------------------------------------------------------------------------- 1 | runc 2 | 3 | Copyright 2012-2015 Docker, Inc. 4 | 5 | This product includes software developed at Docker, Inc. (http://www.docker.com). 6 | 7 | The following is courtesy of our legal counsel: 8 | 9 | 10 | Use and transfer of Docker may be subject to certain restrictions by the 11 | United States and other governments. 12 | It is your responsibility to ensure that your use and/or transfer does not 13 | violate applicable laws. 14 | 15 | For more information, please see http://www.bis.doc.gov 16 | 17 | See also http://www.apache.org/dev/crypto.html and/or seek legal counsel. 18 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2011-2016 Canonical Ltd. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /scripts/build-base: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | source $(dirname $0)/version 5 | cd $(dirname $0)/.. 6 | 7 | BUILD=build 8 | 9 | mkdir -p ${BUILD} 10 | ./bin/strato --source=${PWD}/dist/${ARCH}/ add --dir=${BUILD} base-layout ca-certificates glibc busybox 11 | # TODO: this should be configurable 12 | echo "https://github.com/rancher/strato-packages/raw/master/${VERSION}/${ARCH}/" > ${BUILD}/etc/strato/repositories 13 | 14 | cd ${BUILD} 15 | tar -cvf rootfs.tar . 16 | cd - 17 | mv ${BUILD}/rootfs.tar . 18 | rm -rf ${BUILD} 19 | 20 | docker build -t strato -f Dockerfile . 21 | docker tag strato strato:${TAG} 22 | 23 | rm rootfs.tar 24 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/volume_create.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "encoding/json" 5 | 6 | "github.com/docker/docker/api/types" 7 | "golang.org/x/net/context" 8 | ) 9 | 10 | // VolumeCreate creates a volume in the docker host. 11 | func (cli *Client) VolumeCreate(ctx context.Context, options types.VolumeCreateRequest) (types.Volume, error) { 12 | var volume types.Volume 13 | resp, err := cli.post(ctx, "/volumes/create", nil, options, nil) 14 | if err != nil { 15 | return volume, err 16 | } 17 | err = json.NewDecoder(resp.body).Decode(&volume) 18 | ensureReaderClosed(resp) 19 | return volume, err 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/docker/distribution/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | 26 | # never checkin from the bin file (for now) 27 | bin/* 28 | 29 | # Test key files 30 | *.pem 31 | 32 | # Cover profiles 33 | *.out 34 | 35 | # Editor/IDE specific files. 36 | *.sublime-project 37 | *.sublime-workspace 38 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/plugin_list.go: -------------------------------------------------------------------------------- 1 | // +build experimental 2 | 3 | package client 4 | 5 | import ( 6 | "encoding/json" 7 | 8 | "github.com/docker/docker/api/types" 9 | "golang.org/x/net/context" 10 | ) 11 | 12 | // PluginList returns the installed plugins 13 | func (cli *Client) PluginList(ctx context.Context) (types.PluginsListResponse, error) { 14 | var plugins types.PluginsListResponse 15 | resp, err := cli.get(ctx, "/plugins", nil, nil) 16 | if err != nil { 17 | return plugins, err 18 | } 19 | 20 | err = json.NewDecoder(resp.body).Decode(&plugins) 21 | ensureReaderClosed(resp) 22 | return plugins, err 23 | } 24 | -------------------------------------------------------------------------------- /scripts/webserver: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | cd $(dirname $0)/.. 6 | 7 | if docker inspect --format "{{.State.Status}}" strato-server ; then 8 | # we don't know if this was started in a different dir.. 9 | docker rm -f strato-server 10 | fi 11 | 12 | mkdir -p dist 13 | 14 | # for rancher os test builds 15 | cp bin/strato* dist/ 16 | 17 | docker run -d --name strato-server -v $(pwd)/dist:/var/www/html:ro joshix/caddy 18 | IP=$(docker inspect --format "{{.NetworkSettings.Networks.bridge.IPAddress}}" strato-server) 19 | echo "http://$IP:2015/" > assets/repositories-build 20 | 21 | echo "Connect using $(cat assets/repositories-build)" 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin,!race linux,!race freebsd,!race netbsd openbsd solaris dragonfly 6 | 7 | package unix 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/swarm/common.go: -------------------------------------------------------------------------------- 1 | package swarm 2 | 3 | import "time" 4 | 5 | // Version represents the internal object version. 6 | type Version struct { 7 | Index uint64 `json:",omitempty"` 8 | } 9 | 10 | // Meta is a base object inherited by most of the other once. 11 | type Meta struct { 12 | Version Version `json:",omitempty"` 13 | CreatedAt time.Time `json:",omitempty"` 14 | UpdatedAt time.Time `json:",omitempty"` 15 | } 16 | 17 | // Annotations represents how to describe an object. 18 | type Annotations struct { 19 | Name string `json:",omitempty"` 20 | Labels map[string]string `json:",omitempty"` 21 | } 22 | -------------------------------------------------------------------------------- /packages/e2fsprogs/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM strato-build 2 | 3 | ENV VERSION 1.43.3 4 | RUN wget -P /usr/src/ https://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v${VERSION}/e2fsprogs-${VERSION}.tar.xz 5 | RUN cd /usr/src/ && tar xf e2fsprogs* 6 | ENV LDFLAGS -s 7 | RUN cd /usr/src/e2fsprogs* \ 8 | && ./configure \ 9 | --mandir=/usr/share/man \ 10 | --enable-elf-shlibs \ 11 | --enable-symlink-install \ 12 | --disable-fsck \ 13 | --disable-uuidd \ 14 | --disable-libuuid \ 15 | --disable-libblkid \ 16 | --disable-tls \ 17 | --disable-nls \ 18 | && make 19 | 20 | RUN cd /usr/src/e2fsprogs* \ 21 | && make install install-libs \ 22 | -------------------------------------------------------------------------------- /packages/eudev/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM strato-build 2 | 3 | ENV VERSION 3.2 4 | ENV LDFLAGS -s 5 | RUN wget -P /usr/src/ http://dev.gentoo.org/~blueness/eudev/eudev-${VERSION}.tar.gz 6 | RUN cd /usr/src/ && tar xf eudev* 7 | RUN cd /usr/src/eudev* \ 8 | && ./configure \ 9 | --sysconfdir=/etc \ 10 | --with-rootprefix= \ 11 | --with-rootrundir=/run \ 12 | --with-rootlibexecdir=/lib/udev \ 13 | --libdir=/usr/lib \ 14 | --enable-split-usr \ 15 | --enable-manpages \ 16 | --disable-hwdb \ 17 | --enable-kmod \ 18 | --exec-prefix=/ \ 19 | && make 20 | 21 | RUN cd /usr/src/eudev* \ 22 | && make sharepkgconfigdir=/usr/lib/pkgconfig install 23 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_start.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "net/url" 5 | 6 | "golang.org/x/net/context" 7 | 8 | "github.com/docker/docker/api/types" 9 | ) 10 | 11 | // ContainerStart sends a request to the docker daemon to start a container. 12 | func (cli *Client) ContainerStart(ctx context.Context, containerID string, options types.ContainerStartOptions) error { 13 | query := url.Values{} 14 | if len(options.CheckpointID) != 0 { 15 | query.Set("checkpoint", options.CheckpointID) 16 | } 17 | 18 | resp, err := cli.post(ctx, "/containers/"+containerID+"/start", query, nil, nil) 19 | ensureReaderClosed(resp) 20 | return err 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/network_connect.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "github.com/docker/docker/api/types" 5 | "github.com/docker/docker/api/types/network" 6 | "golang.org/x/net/context" 7 | ) 8 | 9 | // NetworkConnect connects a container to an existent network in the docker host. 10 | func (cli *Client) NetworkConnect(ctx context.Context, networkID, containerID string, config *network.EndpointSettings) error { 11 | nc := types.NetworkConnect{ 12 | Container: containerID, 13 | EndpointConfig: config, 14 | } 15 | resp, err := cli.post(ctx, "/networks/"+networkID+"/connect", nil, nc, nil) 16 | ensureReaderClosed(resp) 17 | return err 18 | } 19 | -------------------------------------------------------------------------------- /packages/parted/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM strato-build 2 | RUN strato add xz-dev 3 | 4 | ENV VERSION 3.2 5 | ENV LDFLAGS -s 6 | RUN wget -P /usr/src/ ftp://ftp.gnu.org/pub/gnu/parted/parted-${VERSION}.tar.xz 7 | COPY parted-3.2-device-mapper.patch /usr/src/ 8 | RUN cd /usr/src && tar xf parted*.xz 9 | RUN cd /usr/src/parted* && patch -p1 < ../parted-3.2-device-mapper.patch 10 | RUN cd /usr/src/parted* \ 11 | && ./configure \ 12 | --prefix=/usr \ 13 | --disable-debug \ 14 | --disable-nls \ 15 | --disable-device-mapper \ 16 | --without-readline \ 17 | --disable-static \ 18 | --enable-shared \ 19 | && make 20 | 21 | RUN cd /usr/src/parted* \ 22 | && make install 23 | -------------------------------------------------------------------------------- /packages/bash/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM strato-build 2 | RUN strato add xz-dev 3 | 4 | ENV VERSION 4.3 5 | ENV LDFLAGS -s 6 | COPY fetch-patches /usr/bin/ 7 | RUN wget -P /usr/src/ https://ftp.gnu.org/gnu/bash/bash-${VERSION}.tar.gz 8 | RUN cd /usr/src && tar xf bash*.tar.gz && fetch-patches 9 | RUN cd /usr/src/bash* && for i in ../*.patch; do patch -p0 < ${i}; done 10 | RUN cd /usr/src/bash* \ 11 | && ./configure \ 12 | --prefix=/usr \ 13 | --bindir=/bin \ 14 | --mandir=/usr/share/man \ 15 | --infodir=/usr/share/info \ 16 | --disable-nls \ 17 | --enable-readline \ 18 | --without-bash-malloc \ 19 | && make 20 | 21 | RUN cd /usr/src/bash* \ 22 | && make install 23 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/checkpoint_list.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "encoding/json" 5 | 6 | "github.com/docker/docker/api/types" 7 | "golang.org/x/net/context" 8 | ) 9 | 10 | // CheckpointList returns the volumes configured in the docker host. 11 | func (cli *Client) CheckpointList(ctx context.Context, container string) ([]types.Checkpoint, error) { 12 | var checkpoints []types.Checkpoint 13 | 14 | resp, err := cli.get(ctx, "/containers/"+container+"/checkpoints", nil, nil) 15 | if err != nil { 16 | return checkpoints, err 17 | } 18 | 19 | err = json.NewDecoder(resp.body).Decode(&checkpoints) 20 | ensureReaderClosed(resp) 21 | return checkpoints, err 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/env_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | // Unix environment variables. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getenv(key string) (value string, found bool) { 14 | return syscall.Getenv(key) 15 | } 16 | 17 | func Setenv(key, value string) error { 18 | return syscall.Setenv(key, value) 19 | } 20 | 21 | func Clearenv() { 22 | syscall.Clearenv() 23 | } 24 | 25 | func Environ() []string { 26 | return syscall.Environ() 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/image_history.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "encoding/json" 5 | "net/url" 6 | 7 | "github.com/docker/docker/api/types" 8 | "golang.org/x/net/context" 9 | ) 10 | 11 | // ImageHistory returns the changes in an image in history format. 12 | func (cli *Client) ImageHistory(ctx context.Context, imageID string) ([]types.ImageHistory, error) { 13 | var history []types.ImageHistory 14 | serverResp, err := cli.get(ctx, "/images/"+imageID+"/history", url.Values{}, nil) 15 | if err != nil { 16 | return history, err 17 | } 18 | 19 | err = json.NewDecoder(serverResp.body).Decode(&history) 20 | ensureReaderClosed(serverResp) 21 | return history, err 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/terminal_notwindows.go: -------------------------------------------------------------------------------- 1 | // Based on ssh/terminal: 2 | // Copyright 2011 The Go Authors. All rights reserved. 3 | // Use of this source code is governed by a BSD-style 4 | // license that can be found in the LICENSE file. 5 | 6 | // +build linux darwin freebsd openbsd netbsd dragonfly 7 | 8 | package logrus 9 | 10 | import ( 11 | "syscall" 12 | "unsafe" 13 | ) 14 | 15 | // IsTerminal returns true if stderr's file descriptor is a terminal. 16 | func IsTerminal() bool { 17 | fd := syscall.Stderr 18 | var termios Termios 19 | _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0) 20 | return err == 0 21 | } 22 | -------------------------------------------------------------------------------- /packages/util-linux/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM strato-build 2 | RUN strato add xz-dev 3 | 4 | ENV VERSION 2.29 5 | ENV LDFLAGS -s 6 | RUN wget -P /usr/src/ https://www.kernel.org/pub/linux/utils/util-linux/v${VERSION}/util-linux-${VERSION}.tar.gz 7 | RUN cd /usr/src/ && tar xf util-linux* 8 | RUN cd /usr/src/util-linux* \ 9 | && ./configure \ 10 | --prefix=/usr \ 11 | --without-python \ 12 | --without-systemdsystemunitdir \ 13 | --disable-uuidd \ 14 | --disable-nls \ 15 | --disable-tls \ 16 | --disable-kill \ 17 | --disable-login \ 18 | --disable-last \ 19 | --disable-sulogin \ 20 | --disable-su \ 21 | && make 22 | 23 | RUN cd /usr/src/util-linux* \ 24 | && make install 25 | -------------------------------------------------------------------------------- /src/cmd/extract/extract.go: -------------------------------------------------------------------------------- 1 | package extract 2 | 3 | import ( 4 | "github.com/rancher/strato/src/extract" 5 | "github.com/rancher/strato/src/utils" 6 | "github.com/urfave/cli" 7 | ) 8 | 9 | type info struct { 10 | Layers []string `json:"Layers"` 11 | } 12 | 13 | var Command = cli.Command{ 14 | Name: "extract", 15 | Usage: "Extract the last layer from the built image", 16 | HideHelp: true, 17 | SkipFlagParsing: true, 18 | Action: Action, 19 | } 20 | 21 | func Action(c *cli.Context) error { 22 | inDir := c.Args().Get(0) 23 | outDir, err := utils.GetOutDir(c.Args().Get(1)) 24 | if err != nil { 25 | return err 26 | } 27 | return extract.Extract(inDir, outDir) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/info.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "encoding/json" 5 | "fmt" 6 | "net/url" 7 | 8 | "github.com/docker/docker/api/types" 9 | "golang.org/x/net/context" 10 | ) 11 | 12 | // Info returns information about the docker server. 13 | func (cli *Client) Info(ctx context.Context) (types.Info, error) { 14 | var info types.Info 15 | serverResp, err := cli.get(ctx, "/info", url.Values{}, nil) 16 | if err != nil { 17 | return info, err 18 | } 19 | defer ensureReaderClosed(serverResp) 20 | 21 | if err := json.NewDecoder(serverResp.body).Decode(&info); err != nil { 22 | return info, fmt.Errorf("Error reading remote info: %v", err) 23 | } 24 | 25 | return info, nil 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/cli.go: -------------------------------------------------------------------------------- 1 | // Package cli provides a minimal framework for creating and organizing command line 2 | // Go applications. cli is designed to be easy to understand and write, the most simple 3 | // cli application can be written as follows: 4 | // func main() { 5 | // cli.NewApp().Run(os.Args) 6 | // } 7 | // 8 | // Of course this application does not do much, so let's make this an actual application: 9 | // func main() { 10 | // app := cli.NewApp() 11 | // app.Name = "greet" 12 | // app.Usage = "say a greeting" 13 | // app.Action = func(c *cli.Context) error { 14 | // println("Greetings") 15 | // } 16 | // 17 | // app.Run(os.Args) 18 | // } 19 | package cli 20 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/runc/libcontainer/user/lookup_unix.go: -------------------------------------------------------------------------------- 1 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 2 | 3 | package user 4 | 5 | import ( 6 | "io" 7 | "os" 8 | ) 9 | 10 | // Unix-specific path to the passwd and group formatted files. 11 | const ( 12 | unixPasswdPath = "/etc/passwd" 13 | unixGroupPath = "/etc/group" 14 | ) 15 | 16 | func GetPasswdPath() (string, error) { 17 | return unixPasswdPath, nil 18 | } 19 | 20 | func GetPasswd() (io.ReadCloser, error) { 21 | return os.Open(unixPasswdPath) 22 | } 23 | 24 | func GetGroupPath() (string, error) { 25 | return unixGroupPath, nil 26 | } 27 | 28 | func GetGroup() (io.ReadCloser, error) { 29 | return os.Open(unixGroupPath) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux 6 | // +build arm64 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-56 15 | B syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 18 | B syscall·Syscall6(SB) 19 | 20 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 21 | B syscall·RawSyscall(SB) 22 | 23 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 24 | B syscall·RawSyscall6(SB) 25 | -------------------------------------------------------------------------------- /src/cmd/build/build.go: -------------------------------------------------------------------------------- 1 | package build 2 | 3 | import ( 4 | "github.com/rancher/strato/src/build" 5 | "github.com/rancher/strato/src/utils" 6 | "github.com/urfave/cli" 7 | ) 8 | 9 | // Command definition 10 | var Command = cli.Command{ 11 | Name: "build", 12 | Usage: "Build image from source and extract the last layer from the built image", 13 | HideHelp: true, 14 | Action: buildAction, 15 | Flags: []cli.Flag{}, 16 | } 17 | 18 | // Build the package from Dockerfile, strato.yml and prebuild.sh 19 | func buildAction(c *cli.Context) error { 20 | inDir := c.Args().Get(0) 21 | outDir, err := utils.GetOutDir(c.Args().Get(1)) 22 | if err != nil { 23 | return err 24 | } 25 | return build.Build(inDir, outDir) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package logrus is a structured logger for Go, completely API compatible with the standard library logger. 3 | 4 | 5 | The simplest way to use Logrus is simply the package-level exported logger: 6 | 7 | package main 8 | 9 | import ( 10 | log "github.com/Sirupsen/logrus" 11 | ) 12 | 13 | func main() { 14 | log.WithFields(log.Fields{ 15 | "animal": "walrus", 16 | "number": 1, 17 | "size": 10, 18 | }).Info("A walrus appears") 19 | } 20 | 21 | Output: 22 | time="2015-09-07T08:48:33Z" level=info msg="A walrus appears" animal=walrus number=1 size=10 23 | 24 | For a full guide visit https://github.com/Sirupsen/logrus 25 | */ 26 | package logrus 27 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/disk_usage.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "encoding/json" 5 | "fmt" 6 | 7 | "github.com/docker/docker/api/types" 8 | "golang.org/x/net/context" 9 | ) 10 | 11 | // DiskUsage requests the current data usage from the daemon 12 | func (cli *Client) DiskUsage(ctx context.Context) (types.DiskUsage, error) { 13 | var du types.DiskUsage 14 | 15 | serverResp, err := cli.get(ctx, "/system/df", nil, nil) 16 | if err != nil { 17 | return du, err 18 | } 19 | defer ensureReaderClosed(serverResp) 20 | 21 | if err := json.NewDecoder(serverResp.body).Decode(&du); err != nil { 22 | return du, fmt.Errorf("Error retrieving disk usage: %v", err) 23 | } 24 | 25 | return du, nil 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/writer.go: -------------------------------------------------------------------------------- 1 | package logrus 2 | 3 | import ( 4 | "bufio" 5 | "io" 6 | "runtime" 7 | ) 8 | 9 | func (logger *Logger) Writer() *io.PipeWriter { 10 | reader, writer := io.Pipe() 11 | 12 | go logger.writerScanner(reader) 13 | runtime.SetFinalizer(writer, writerFinalizer) 14 | 15 | return writer 16 | } 17 | 18 | func (logger *Logger) writerScanner(reader *io.PipeReader) { 19 | scanner := bufio.NewScanner(reader) 20 | for scanner.Scan() { 21 | logger.Print(scanner.Text()) 22 | } 23 | if err := scanner.Err(); err != nil { 24 | logger.Errorf("Error while reading from Writer: %s", err) 25 | } 26 | reader.Close() 27 | } 28 | 29 | func writerFinalizer(writer *io.PipeWriter) { 30 | writer.Close() 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/NOTICE: -------------------------------------------------------------------------------- 1 | Docker 2 | Copyright 2012-2016 Docker, Inc. 3 | 4 | This product includes software developed at Docker, Inc. (https://www.docker.com). 5 | 6 | This product contains software (https://github.com/kr/pty) developed 7 | by Keith Rarick, licensed under the MIT License. 8 | 9 | The following is courtesy of our legal counsel: 10 | 11 | 12 | Use and transfer of Docker may be subject to certain restrictions by the 13 | United States and other governments. 14 | It is your responsibility to ensure that your use and/or transfer does not 15 | violate applicable laws. 16 | 17 | For more information, please see https://www.bis.doc.gov 18 | 19 | See also https://www.apache.org/dev/crypto.html and/or seek legal counsel. 20 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_diff.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "encoding/json" 5 | "net/url" 6 | 7 | "github.com/docker/docker/api/types" 8 | "golang.org/x/net/context" 9 | ) 10 | 11 | // ContainerDiff shows differences in a container filesystem since it was started. 12 | func (cli *Client) ContainerDiff(ctx context.Context, containerID string) ([]types.ContainerChange, error) { 13 | var changes []types.ContainerChange 14 | 15 | serverResp, err := cli.get(ctx, "/containers/"+containerID+"/changes", url.Values{}, nil) 16 | if err != nil { 17 | return changes, err 18 | } 19 | 20 | err = json.NewDecoder(serverResp.body).Decode(&changes) 21 | ensureReaderClosed(serverResp) 22 | return changes, err 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_stop.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "net/url" 5 | "time" 6 | 7 | timetypes "github.com/docker/docker/api/types/time" 8 | "golang.org/x/net/context" 9 | ) 10 | 11 | // ContainerStop stops a container without terminating the process. 12 | // The process is blocked until the container stops or the timeout expires. 13 | func (cli *Client) ContainerStop(ctx context.Context, containerID string, timeout *time.Duration) error { 14 | query := url.Values{} 15 | if timeout != nil { 16 | query.Set("t", timetypes.DurationToSecondsString(*timeout)) 17 | } 18 | resp, err := cli.post(ctx, "/containers/"+containerID+"/stop", query, nil, nil) 19 | ensureReaderClosed(resp) 20 | return err 21 | } 22 | -------------------------------------------------------------------------------- /packages/kmod/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM strato-build 2 | RUN strato add xz-dev 3 | 4 | ENV VERSION 23 5 | ENV LDFLAGS -s 6 | RUN wget -P /usr/src/ http://www.kernel.org/pub/linux/utils/kernel/kmod/kmod-${VERSION}.tar.xz 7 | RUN cd /usr/src/ && tar xf kmod* 8 | RUN cd /usr/src/kmod* \ 9 | && ./configure \ 10 | --prefix=/usr \ 11 | --bindir=/bin \ 12 | --sysconfdir=/etc \ 13 | --with-rootlibdir=/lib \ 14 | --with-zlib \ 15 | --with-xz \ 16 | && make 17 | 18 | RUN cd /usr/src/kmod* \ 19 | && make install \ 20 | && for i in lsmod rmmod insmod modinfo modprobe depmod; do [ -e /bin/$i ] && rm /bin/$i; ln -s kmod /bin/$i; done \ 21 | && for i in lsmod modinfo; do [ -e /bin/$i ] && rm /bin/$i; ln -s kmod "$pkgdir"/bin/$i; done 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/str.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency 10 | if val < 0 { 11 | return "-" + uitoa(uint(-val)) 12 | } 13 | return uitoa(uint(val)) 14 | } 15 | 16 | func uitoa(val uint) string { 17 | var buf [32]byte // big enough for int64 18 | i := len(buf) - 1 19 | for val >= 10 { 20 | buf[i] = byte(val%10 + '0') 21 | i-- 22 | val /= 10 23 | } 24 | buf[i] = byte(val + '0') 25 | return string(buf[i:]) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-connections/sockets/tcp_socket.go: -------------------------------------------------------------------------------- 1 | // Package sockets provides helper functions to create and configure Unix or TCP sockets. 2 | package sockets 3 | 4 | import ( 5 | "crypto/tls" 6 | "net" 7 | ) 8 | 9 | // NewTCPSocket creates a TCP socket listener with the specified address and 10 | // and the specified tls configuration. If TLSConfig is set, will encapsulate the 11 | // TCP listener inside a TLS one. 12 | func NewTCPSocket(addr string, tlsConfig *tls.Config) (net.Listener, error) { 13 | l, err := net.Listen("tcp", addr) 14 | if err != nil { 15 | return nil, err 16 | } 17 | if tlsConfig != nil { 18 | tlsConfig.NextProtos = []string{"http/1.1"} 19 | l = tls.NewListener(l, tlsConfig) 20 | } 21 | return l, nil 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_remove.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "net/url" 5 | 6 | "github.com/docker/docker/api/types" 7 | "golang.org/x/net/context" 8 | ) 9 | 10 | // ContainerRemove kills and removes a container from the docker host. 11 | func (cli *Client) ContainerRemove(ctx context.Context, containerID string, options types.ContainerRemoveOptions) error { 12 | query := url.Values{} 13 | if options.RemoveVolumes { 14 | query.Set("v", "1") 15 | } 16 | if options.RemoveLinks { 17 | query.Set("link", "1") 18 | } 19 | 20 | if options.Force { 21 | query.Set("force", "1") 22 | } 23 | 24 | resp, err := cli.delete(ctx, "/containers/"+containerID, query, nil) 25 | ensureReaderClosed(resp) 26 | return err 27 | } 28 | -------------------------------------------------------------------------------- /vendor.conf: -------------------------------------------------------------------------------- 1 | github.com/urfave/cli v1.18.0 2 | gopkg.in/yaml.v2 e4d366fc3c7938e2958e662b4258c7a89e1f0e3e 3 | github.com/docker/docker 8658748ef716e43a5f6d834825d818012ed6e2c4 4 | github.com/Sirupsen/logrus v0.10.0 5 | github.com/docker/distribution 77b9d2997abcded79a5314970fe69a44c93c25fb 6 | github.com/docker/go-connections 988efe982fdecb46f01d53465878ff1f2ff411ce 7 | golang.org/x/net 2beffdc2e92c8a3027590f898fe88f69af48a3f8 https://github.com/tonistiigi/net.git 8 | golang.org/x/sys eb2c74142fd19a79b3f237334c7384d5167b1b46 https://github.com/golang/sys.git 9 | github.com/opencontainers/runc cc29e3dded8e27ba8f65738f40d251c885030a28 10 | github.com/docker/go-units f2145db703495b2e525c59662db69a7344b00bb8 11 | github.com/pkg/errors 01fa4104b9c248c8945d14d9f128454d5b28d595 12 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/swarm_update.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "fmt" 5 | "net/url" 6 | "strconv" 7 | 8 | "github.com/docker/docker/api/types/swarm" 9 | "golang.org/x/net/context" 10 | ) 11 | 12 | // SwarmUpdate updates the Swarm. 13 | func (cli *Client) SwarmUpdate(ctx context.Context, version swarm.Version, swarm swarm.Spec, flags swarm.UpdateFlags) error { 14 | query := url.Values{} 15 | query.Set("version", strconv.FormatUint(version.Index, 10)) 16 | query.Set("rotateWorkerToken", fmt.Sprintf("%v", flags.RotateWorkerToken)) 17 | query.Set("rotateManagerToken", fmt.Sprintf("%v", flags.RotateManagerToken)) 18 | resp, err := cli.post(ctx, "/swarm/update", query, swarm, nil) 19 | ensureReaderClosed(resp) 20 | return err 21 | } 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin,race linux,race freebsd,race 6 | 7 | package unix 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/.gitignore: -------------------------------------------------------------------------------- 1 | # Docker project generated files to ignore 2 | # if you want to ignore files created by your editor/tools, 3 | # please consider a global .gitignore https://help.github.com/articles/ignoring-files 4 | *.exe 5 | *.exe~ 6 | *.orig 7 | *.test 8 | .*.swp 9 | .DS_Store 10 | # a .bashrc may be added to customize the build environment 11 | .bashrc 12 | .gopath/ 13 | .go-pkg-cache/ 14 | autogen/ 15 | bundles/ 16 | cmd/dockerd/dockerd 17 | cmd/docker/docker 18 | dockerversion/version_autogen.go 19 | docs/AWS_S3_BUCKET 20 | docs/GITCOMMIT 21 | docs/GIT_BRANCH 22 | docs/VERSION 23 | docs/_build 24 | docs/_static 25 | docs/_templates 26 | docs/changed-files 27 | # generated by man/md2man-all.sh 28 | man/man1 29 | man/man5 30 | man/man8 31 | vendor/pkg/ 32 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_restart.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "net/url" 5 | "time" 6 | 7 | timetypes "github.com/docker/docker/api/types/time" 8 | "golang.org/x/net/context" 9 | ) 10 | 11 | // ContainerRestart stops and starts a container again. 12 | // It makes the daemon to wait for the container to be up again for 13 | // a specific amount of time, given the timeout. 14 | func (cli *Client) ContainerRestart(ctx context.Context, containerID string, timeout *time.Duration) error { 15 | query := url.Values{} 16 | if timeout != nil { 17 | query.Set("t", timetypes.DurationToSecondsString(*timeout)) 18 | } 19 | resp, err := cli.post(ctx, "/containers/"+containerID+"/restart", query, nil, nil) 20 | ensureReaderClosed(resp) 21 | return err 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_wait.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "encoding/json" 5 | 6 | "golang.org/x/net/context" 7 | 8 | "github.com/docker/docker/api/types" 9 | ) 10 | 11 | // ContainerWait pauses execution until a container exits. 12 | // It returns the API status code as response of its readiness. 13 | func (cli *Client) ContainerWait(ctx context.Context, containerID string) (int, error) { 14 | resp, err := cli.post(ctx, "/containers/"+containerID+"/wait", nil, nil, nil) 15 | if err != nil { 16 | return -1, err 17 | } 18 | defer ensureReaderClosed(resp) 19 | 20 | var res types.ContainerWaitResponse 21 | if err := json.NewDecoder(resp.body).Decode(&res); err != nil { 22 | return -1, err 23 | } 24 | 25 | return res.StatusCode, nil 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | sudo: false 4 | 5 | cache: 6 | directories: 7 | - node_modules 8 | 9 | go: 10 | - 1.2.2 11 | - 1.3.3 12 | - 1.4 13 | - 1.5.4 14 | - 1.6.2 15 | - master 16 | 17 | matrix: 18 | allow_failures: 19 | - go: master 20 | include: 21 | - go: 1.6.2 22 | os: osx 23 | - go: 1.1.2 24 | install: go get -v . 25 | before_script: echo skipping gfmxr on $TRAVIS_GO_VERSION 26 | script: 27 | - ./runtests vet 28 | - ./runtests test 29 | 30 | before_script: 31 | - go get github.com/urfave/gfmxr/... 32 | - if [ ! -f node_modules/.bin/markdown-toc ] ; then 33 | npm install markdown-toc ; 34 | fi 35 | 36 | script: 37 | - ./runtests vet 38 | - ./runtests test 39 | - ./runtests gfmxr 40 | - ./runtests toc 41 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/terminal_windows.go: -------------------------------------------------------------------------------- 1 | // Based on ssh/terminal: 2 | // Copyright 2011 The Go Authors. All rights reserved. 3 | // Use of this source code is governed by a BSD-style 4 | // license that can be found in the LICENSE file. 5 | 6 | // +build windows 7 | 8 | package logrus 9 | 10 | import ( 11 | "syscall" 12 | "unsafe" 13 | ) 14 | 15 | var kernel32 = syscall.NewLazyDLL("kernel32.dll") 16 | 17 | var ( 18 | procGetConsoleMode = kernel32.NewProc("GetConsoleMode") 19 | ) 20 | 21 | // IsTerminal returns true if stderr's file descriptor is a terminal. 22 | func IsTerminal() bool { 23 | fd := syscall.Stderr 24 | var st uint32 25 | r, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, uintptr(fd), uintptr(unsafe.Pointer(&st)), 0) 26 | return r != 0 && e == 0 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux 6 | // +build ppc64 ppc64le 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // 12 | // System calls for ppc64, Linux 13 | // 14 | 15 | // Just jump to package syscall's implementation for all these functions. 16 | // The runtime may know about them. 17 | 18 | TEXT ·Syscall(SB),NOSPLIT,$0-56 19 | BR syscall·Syscall(SB) 20 | 21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 22 | BR syscall·Syscall6(SB) 23 | 24 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 25 | BR syscall·RawSyscall(SB) 26 | 27 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 28 | BR syscall·RawSyscall6(SB) 29 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/image_prune.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "encoding/json" 5 | "fmt" 6 | 7 | "github.com/docker/docker/api/types" 8 | "golang.org/x/net/context" 9 | ) 10 | 11 | // ImagesPrune requests the daemon to delete unused data 12 | func (cli *Client) ImagesPrune(ctx context.Context, cfg types.ImagesPruneConfig) (types.ImagesPruneReport, error) { 13 | var report types.ImagesPruneReport 14 | 15 | serverResp, err := cli.post(ctx, "/images/prune", nil, cfg, nil) 16 | if err != nil { 17 | return report, err 18 | } 19 | defer ensureReaderClosed(serverResp) 20 | 21 | if err := json.NewDecoder(serverResp.body).Decode(&report); err != nil { 22 | return report, fmt.Errorf("Error retrieving disk usage: %v", err) 23 | } 24 | 25 | return report, nil 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for arm, Linux 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 23 | B syscall·RawSyscall(SB) 24 | 25 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 26 | B syscall·RawSyscall6(SB) 27 | 28 | TEXT ·seek(SB),NOSPLIT,$0-32 29 | B syscall·seek(SB) 30 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/volume_prune.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "encoding/json" 5 | "fmt" 6 | 7 | "github.com/docker/docker/api/types" 8 | "golang.org/x/net/context" 9 | ) 10 | 11 | // VolumesPrune requests the daemon to delete unused data 12 | func (cli *Client) VolumesPrune(ctx context.Context, cfg types.VolumesPruneConfig) (types.VolumesPruneReport, error) { 13 | var report types.VolumesPruneReport 14 | 15 | serverResp, err := cli.post(ctx, "/volumes/prune", nil, cfg, nil) 16 | if err != nil { 17 | return report, err 18 | } 19 | defer ensureReaderClosed(serverResp) 20 | 21 | if err := json.NewDecoder(serverResp.body).Decode(&report); err != nil { 22 | return report, fmt.Errorf("Error retrieving disk usage: %v", err) 23 | } 24 | 25 | return report, nil 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_update.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "encoding/json" 5 | 6 | "github.com/docker/docker/api/types" 7 | "github.com/docker/docker/api/types/container" 8 | "golang.org/x/net/context" 9 | ) 10 | 11 | // ContainerUpdate updates resources of a container 12 | func (cli *Client) ContainerUpdate(ctx context.Context, containerID string, updateConfig container.UpdateConfig) (types.ContainerUpdateResponse, error) { 13 | var response types.ContainerUpdateResponse 14 | serverResp, err := cli.post(ctx, "/containers/"+containerID+"/update", nil, updateConfig, nil) 15 | if err != nil { 16 | return response, err 17 | } 18 | 19 | err = json.NewDecoder(serverResp.body).Decode(&response) 20 | 21 | ensureReaderClosed(serverResp) 22 | return response, err 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: build-{build}.{branch} 2 | 3 | clone_folder: C:\gopath\src\github.com\pkg\errors 4 | shallow_clone: true # for startup speed 5 | 6 | environment: 7 | GOPATH: C:\gopath 8 | 9 | platform: 10 | - x64 11 | 12 | # http://www.appveyor.com/docs/installed-software 13 | install: 14 | # some helpful output for debugging builds 15 | - go version 16 | - go env 17 | # pre-installed MinGW at C:\MinGW is 32bit only 18 | # but MSYS2 at C:\msys64 has mingw64 19 | - set PATH=C:\msys64\mingw64\bin;%PATH% 20 | - gcc --version 21 | - g++ --version 22 | 23 | build_script: 24 | - go install -v ./... 25 | 26 | test_script: 27 | - set PATH=C:\gopath\bin;%PATH% 28 | - go test -v ./... 29 | 30 | #artifacts: 31 | # - path: '%GOPATH%\bin\*.exe' 32 | deploy: off 33 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_freebsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_netbsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/plugin_inspect.go: -------------------------------------------------------------------------------- 1 | // +build experimental 2 | 3 | package client 4 | 5 | import ( 6 | "bytes" 7 | "encoding/json" 8 | "io/ioutil" 9 | 10 | "github.com/docker/docker/api/types" 11 | "golang.org/x/net/context" 12 | ) 13 | 14 | // PluginInspectWithRaw inspects an existing plugin 15 | func (cli *Client) PluginInspectWithRaw(ctx context.Context, name string) (*types.Plugin, []byte, error) { 16 | resp, err := cli.get(ctx, "/plugins/"+name, nil, nil) 17 | if err != nil { 18 | return nil, nil, err 19 | } 20 | 21 | defer ensureReaderClosed(resp) 22 | body, err := ioutil.ReadAll(resp.body) 23 | if err != nil { 24 | return nil, nil, err 25 | } 26 | var p types.Plugin 27 | rdr := bytes.NewReader(body) 28 | err = json.NewDecoder(rdr).Decode(&p) 29 | return &p, body, err 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_prune.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "encoding/json" 5 | "fmt" 6 | 7 | "github.com/docker/docker/api/types" 8 | "golang.org/x/net/context" 9 | ) 10 | 11 | // ContainersPrune requests the daemon to delete unused data 12 | func (cli *Client) ContainersPrune(ctx context.Context, cfg types.ContainersPruneConfig) (types.ContainersPruneReport, error) { 13 | var report types.ContainersPruneReport 14 | 15 | serverResp, err := cli.post(ctx, "/containers/prune", nil, cfg, nil) 16 | if err != nil { 17 | return report, err 18 | } 19 | defer ensureReaderClosed(serverResp) 20 | 21 | if err := json.NewDecoder(serverResp.body).Decode(&report); err != nil { 22 | return report, fmt.Errorf("Error retrieving disk usage: %v", err) 23 | } 24 | 25 | return report, nil 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, Darwin 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_freebsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_netbsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | TARGETS := $(shell ls scripts | grep -vE '(webserver|build-packages|clean|dev)') 2 | 3 | .dapper: 4 | @echo Downloading dapper 5 | @curl -sL https://releases.rancher.com/dapper/latest/dapper-`uname -s`-`uname -m|sed 's/v7l//'` > .dapper.tmp 6 | @@chmod +x .dapper.tmp 7 | @./.dapper.tmp -v 8 | @mv .dapper.tmp .dapper 9 | 10 | $(TARGETS): .dapper 11 | ./.dapper $@ 12 | 13 | build-packages: .dapper stopweb webserver 14 | ./.dapper -m bind build-packages 2>&1 | tee dist/build-packages.log 15 | docker rm -f strato-server || true 16 | 17 | dev: build-bin 18 | ./scripts/dev 19 | 20 | webserver: 21 | ./scripts/webserver 22 | 23 | stopweb: 24 | docker rm -f strato-server || true 25 | 26 | strato: build-bin 27 | 28 | clean: 29 | ./scripts/clean 30 | 31 | .DEFAULT_GOAL := default 32 | 33 | .PHONY: $(TARGETS) clean 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, Darwin 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_dragonfly_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-32 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-44 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-56 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-32 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-44 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for AMD64, Linux 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 23 | JMP syscall·RawSyscall(SB) 24 | 25 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 26 | JMP syscall·RawSyscall6(SB) 27 | 28 | TEXT ·gettimeofday(SB),NOSPLIT,$0-16 29 | JMP syscall·gettimeofday(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, DragonFly 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-64 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-88 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-112 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-64 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-88 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/network_create.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "encoding/json" 5 | 6 | "github.com/docker/docker/api/types" 7 | "golang.org/x/net/context" 8 | ) 9 | 10 | // NetworkCreate creates a new network in the docker host. 11 | func (cli *Client) NetworkCreate(ctx context.Context, name string, options types.NetworkCreate) (types.NetworkCreateResponse, error) { 12 | networkCreateRequest := types.NetworkCreateRequest{ 13 | NetworkCreate: options, 14 | Name: name, 15 | } 16 | var response types.NetworkCreateResponse 17 | serverResp, err := cli.post(ctx, "/networks/create", nil, networkCreateRequest, nil) 18 | if err != nil { 19 | return response, err 20 | } 21 | 22 | json.NewDecoder(serverResp.body).Decode(&response) 23 | ensureReaderClosed(serverResp) 24 | return response, err 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | // +build arm,darwin 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System call support for ARM, Darwin 12 | // 13 | 14 | // Just jump to package syscall's implementation for all these functions. 15 | // The runtime may know about them. 16 | 17 | TEXT ·Syscall(SB),NOSPLIT,$0-28 18 | B syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 21 | B syscall·Syscall6(SB) 22 | 23 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 24 | B syscall·Syscall9(SB) 25 | 26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 27 | B syscall·RawSyscall(SB) 28 | 29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 30 | B syscall·RawSyscall6(SB) 31 | -------------------------------------------------------------------------------- /packages/lvm2/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM strato-build 2 | 3 | ENV VERSION 2.02.168 4 | ENV LDFLAGS -s 5 | RUN wget -P /usr/src/ https://mirrors.kernel.org/sourceware/lvm2/LVM2.${VERSION}.tgz 6 | RUN cd /usr/src/ && tar xf LVM2* 7 | RUN cd /usr/src/LVM2* \ 8 | && ./configure \ 9 | --prefix=/usr \ 10 | --sysconfdir=/etc \ 11 | --libdir=/lib \ 12 | --sbindir=/sbin \ 13 | --localstatedir=/var \ 14 | --disable-nls \ 15 | --disable-readline \ 16 | --enable-pkgconfig \ 17 | --enable-applib \ 18 | --with-thin=internal \ 19 | --enable-dmeventd \ 20 | --enable-cmdlib \ 21 | --with-thin-check=/sbin/thin_check \ 22 | --with-thin-dump=/sbin/thin_dump \ 23 | --with-thin-repair=/sbin/thin_repair \ 24 | --with-dmeventd-path=/sbin/dmeventd \ 25 | && make 26 | 27 | RUN cd /usr/src/LVM2* \ 28 | && make install 29 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/image_remove.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "encoding/json" 5 | "net/url" 6 | 7 | "github.com/docker/docker/api/types" 8 | "golang.org/x/net/context" 9 | ) 10 | 11 | // ImageRemove removes an image from the docker host. 12 | func (cli *Client) ImageRemove(ctx context.Context, imageID string, options types.ImageRemoveOptions) ([]types.ImageDelete, error) { 13 | query := url.Values{} 14 | 15 | if options.Force { 16 | query.Set("force", "1") 17 | } 18 | if !options.PruneChildren { 19 | query.Set("noprune", "1") 20 | } 21 | 22 | resp, err := cli.delete(ctx, "/images/"+imageID, query, nil) 23 | if err != nil { 24 | return nil, err 25 | } 26 | 27 | var dels []types.ImageDelete 28 | err = json.NewDecoder(resp.body).Decode(&dels) 29 | ensureReaderClosed(resp) 30 | return dels, err 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | // +build arm64,darwin 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System call support for AMD64, Darwin 12 | // 13 | 14 | // Just jump to package syscall's implementation for all these functions. 15 | // The runtime may know about them. 16 | 17 | TEXT ·Syscall(SB),NOSPLIT,$0-56 18 | B syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 21 | B syscall·Syscall6(SB) 22 | 23 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 24 | B syscall·Syscall9(SB) 25 | 26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 27 | B syscall·RawSyscall(SB) 28 | 29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 30 | B syscall·RawSyscall6(SB) 31 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_stats.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "net/url" 5 | 6 | "github.com/docker/docker/api/types" 7 | "golang.org/x/net/context" 8 | ) 9 | 10 | // ContainerStats returns near realtime stats for a given container. 11 | // It's up to the caller to close the io.ReadCloser returned. 12 | func (cli *Client) ContainerStats(ctx context.Context, containerID string, stream bool) (types.ContainerStats, error) { 13 | query := url.Values{} 14 | query.Set("stream", "0") 15 | if stream { 16 | query.Set("stream", "1") 17 | } 18 | 19 | resp, err := cli.get(ctx, "/containers/"+containerID+"/stats", query, nil) 20 | if err != nil { 21 | return types.ContainerStats{}, err 22 | } 23 | 24 | osType := GetDockerOS(resp.header.Get("Server")) 25 | return types.ContainerStats{Body: resp.body, OSType: osType}, err 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_top.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "encoding/json" 5 | "net/url" 6 | "strings" 7 | 8 | "github.com/docker/docker/api/types" 9 | "golang.org/x/net/context" 10 | ) 11 | 12 | // ContainerTop shows process information from within a container. 13 | func (cli *Client) ContainerTop(ctx context.Context, containerID string, arguments []string) (types.ContainerProcessList, error) { 14 | var response types.ContainerProcessList 15 | query := url.Values{} 16 | if len(arguments) > 0 { 17 | query.Set("ps_args", strings.Join(arguments, " ")) 18 | } 19 | 20 | resp, err := cli.get(ctx, "/containers/"+containerID+"/top", query, nil) 21 | if err != nil { 22 | return response, err 23 | } 24 | 25 | err = json.NewDecoder(resp.body).Decode(&response) 26 | ensureReaderClosed(resp) 27 | return response, err 28 | } 29 | -------------------------------------------------------------------------------- /packages/openssh/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM strato-build 2 | 3 | ENV VERSION 7.3p1 4 | ENV LDFLAGS -s 5 | RUN wget -P /usr/src/ http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${VERSION}.tar.gz 6 | RUN cd /usr/src && tar xf openssh* 7 | RUN cd /usr/src/openssh* \ 8 | && ./configure \ 9 | --prefix=/usr \ 10 | --sysconfdir=/etc/ssh \ 11 | --datadir=/usr/share/openssh \ 12 | --libexecdir=/usr/lib/ssh \ 13 | --mandir=/usr/share/man \ 14 | --with-pid-dir=/run \ 15 | --with-mantype=man \ 16 | --with-ldflags="${LDFLAGS}" \ 17 | --disable-strip \ 18 | --disable-lastlog \ 19 | --disable-wtmp \ 20 | --with-privsep-path=/var/empty \ 21 | --with-privsep-user=sshd \ 22 | --with-md5-passwords \ 23 | --with-ssl-engine \ 24 | --without-pam \ 25 | && make 26 | 27 | RUN cd /usr/src/openssh* \ 28 | && make install 29 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/transport.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "crypto/tls" 5 | "errors" 6 | "net/http" 7 | ) 8 | 9 | var errTLSConfigUnavailable = errors.New("TLSConfig unavailable") 10 | 11 | // transportFunc allows us to inject a mock transport for testing. We define it 12 | // here so we can detect the tlsconfig and return nil for only this type. 13 | type transportFunc func(*http.Request) (*http.Response, error) 14 | 15 | func (tf transportFunc) RoundTrip(req *http.Request) (*http.Response, error) { 16 | return tf(req) 17 | } 18 | 19 | // resolveTLSConfig attempts to resolve the tls configuration from the 20 | // RoundTripper. 21 | func resolveTLSConfig(transport http.RoundTripper) *tls.Config { 22 | switch tr := transport.(type) { 23 | case *http.Transport: 24 | return tr.TLSClientConfig 25 | default: 26 | return nil 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/flock.go: -------------------------------------------------------------------------------- 1 | // +build linux darwin freebsd openbsd netbsd dragonfly 2 | 3 | // Copyright 2014 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // +build darwin dragonfly freebsd linux netbsd openbsd 8 | 9 | package unix 10 | 11 | import "unsafe" 12 | 13 | // fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux 14 | // systems by flock_linux_32bit.go to be SYS_FCNTL64. 15 | var fcntl64Syscall uintptr = SYS_FCNTL 16 | 17 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. 18 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { 19 | _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk))) 20 | if errno == 0 { 21 | return nil 22 | } 23 | return errno 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/auth.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | // AuthConfig contains authorization information for connecting to a Registry 4 | type AuthConfig struct { 5 | Username string `json:"username,omitempty"` 6 | Password string `json:"password,omitempty"` 7 | Auth string `json:"auth,omitempty"` 8 | 9 | // Email is an optional value associated with the username. 10 | // This field is deprecated and will be removed in a later 11 | // version of docker. 12 | Email string `json:"email,omitempty"` 13 | 14 | ServerAddress string `json:"serveraddress,omitempty"` 15 | 16 | // IdentityToken is used to authenticate the user and get 17 | // an access token for the registry. 18 | IdentityToken string `json:"identitytoken,omitempty"` 19 | 20 | // RegistryToken is a bearer token to be sent to a registry 21 | RegistryToken string `json:"registrytoken,omitempty"` 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/login.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "encoding/json" 5 | "net/http" 6 | "net/url" 7 | 8 | "github.com/docker/docker/api/types" 9 | "golang.org/x/net/context" 10 | ) 11 | 12 | // RegistryLogin authenticates the docker server with a given docker registry. 13 | // It returns UnauthorizerError when the authentication fails. 14 | func (cli *Client) RegistryLogin(ctx context.Context, auth types.AuthConfig) (types.AuthResponse, error) { 15 | resp, err := cli.post(ctx, "/auth", url.Values{}, auth, nil) 16 | 17 | if resp.statusCode == http.StatusUnauthorized { 18 | return types.AuthResponse{}, unauthorizedError{err} 19 | } 20 | if err != nil { 21 | return types.AuthResponse{}, err 22 | } 23 | 24 | var response types.AuthResponse 25 | err = json.NewDecoder(resp.body).Decode(&response) 26 | ensureReaderClosed(resp) 27 | return response, err 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/README.md: -------------------------------------------------------------------------------- 1 | pkg/ is a collection of utility packages used by the Docker project without being specific to its internals. 2 | 3 | Utility packages are kept separate from the docker core codebase to keep it as small and concise as possible. 4 | If some utilities grow larger and their APIs stabilize, they may be moved to their own repository under the 5 | Docker organization, to facilitate re-use by other projects. However that is not the priority. 6 | 7 | The directory `pkg` is named after the same directory in the camlistore project. Since Brad is a core 8 | Go maintainer, we thought it made sense to copy his methods for organizing Go code :) Thanks Brad! 9 | 10 | Because utility packages are small and neatly separated from the rest of the codebase, they are a good 11 | place to start for aspiring maintainers and contributors. Get in touch if you want to help maintain them! 12 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/swarm/container.go: -------------------------------------------------------------------------------- 1 | package swarm 2 | 3 | import ( 4 | "time" 5 | 6 | "github.com/docker/docker/api/types/mount" 7 | ) 8 | 9 | // ContainerSpec represents the spec of a container. 10 | type ContainerSpec struct { 11 | Image string `json:",omitempty"` 12 | Labels map[string]string `json:",omitempty"` 13 | Command []string `json:",omitempty"` 14 | Args []string `json:",omitempty"` 15 | Env []string `json:",omitempty"` 16 | Dir string `json:",omitempty"` 17 | User string `json:",omitempty"` 18 | Groups []string `json:",omitempty"` 19 | TTY bool `json:",omitempty"` 20 | Mounts []mount.Mount `json:",omitempty"` 21 | StopGracePeriod *time.Duration `json:",omitempty"` 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/service_update.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "net/url" 5 | "strconv" 6 | 7 | "github.com/docker/docker/api/types" 8 | "github.com/docker/docker/api/types/swarm" 9 | "golang.org/x/net/context" 10 | ) 11 | 12 | // ServiceUpdate updates a Service. 13 | func (cli *Client) ServiceUpdate(ctx context.Context, serviceID string, version swarm.Version, service swarm.ServiceSpec, options types.ServiceUpdateOptions) error { 14 | var ( 15 | headers map[string][]string 16 | query = url.Values{} 17 | ) 18 | 19 | if options.EncodedRegistryAuth != "" { 20 | headers = map[string][]string{ 21 | "X-Registry-Auth": {options.EncodedRegistryAuth}, 22 | } 23 | } 24 | 25 | query.Set("version", strconv.FormatUint(version.Index, 10)) 26 | 27 | resp, err := cli.post(ctx, "/services/"+serviceID+"/update", query, service, headers) 28 | ensureReaderClosed(resp) 29 | return err 30 | } 31 | -------------------------------------------------------------------------------- /packages/base-layout/group: -------------------------------------------------------------------------------- 1 | root:x:0:root 2 | bin:x:1:root,bin,daemon 3 | daemon:x:2:root,bin,daemon 4 | sys:x:3:root,bin,adm 5 | adm:x:4:root,adm,daemon 6 | tty:x:5: 7 | disk:x:6:root,adm 8 | lp:x:7:lp 9 | mem:x:8: 10 | kmem:x:9: 11 | wheel:x:10:root 12 | floppy:x:11:root 13 | mail:x:12:mail 14 | news:x:13:news 15 | uucp:x:14:uucp 16 | man:x:15:man 17 | cron:x:16:cron 18 | console:x:17: 19 | audio:x:18: 20 | cdrom:x:19: 21 | dialout:x:20:root 22 | ftp:x:21: 23 | sshd:x:22: 24 | input:x:23: 25 | at:x:25:at 26 | tape:x:26:root 27 | video:x:27:root 28 | netdev:x:28: 29 | readproc:x:30: 30 | squid:x:31:squid 31 | xfs:x:33:xfs 32 | kvm:x:34:kvm 33 | games:x:35: 34 | shadow:x:42: 35 | postgres:x:70: 36 | cdrw:x:80: 37 | usb:x:85: 38 | vpopmail:x:89: 39 | users:x:100:games 40 | ntp:x:123: 41 | nofiles:x:200: 42 | smmsp:x:209:smmsp 43 | locate:x:245: 44 | abuild:x:300: 45 | utmp:x:406: 46 | ping:x:999: 47 | nogroup:x:65533: 48 | nobody:x:65534: 49 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-units/MAINTAINERS: -------------------------------------------------------------------------------- 1 | # go-connections maintainers file 2 | # 3 | # This file describes who runs the docker/go-connections project and how. 4 | # This is a living document - if you see something out of date or missing, speak up! 5 | # 6 | # It is structured to be consumable by both humans and programs. 7 | # To extract its contents programmatically, use any TOML-compliant parser. 8 | # 9 | # This file is compiled into the MAINTAINERS file in docker/opensource. 10 | # 11 | [Org] 12 | [Org."Core maintainers"] 13 | people = [ 14 | "calavera", 15 | ] 16 | 17 | [people] 18 | 19 | # A reference list of all people associated with the project. 20 | # All other sections should refer to people by their canonical key 21 | # in the people section. 22 | 23 | # ADD YOURSELF HERE IN ALPHABETICAL ORDER 24 | [people.calavera] 25 | Name = "David Calavera" 26 | Email = "david.calavera@gmail.com" 27 | GitHub = "calavera" 28 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-connections/MAINTAINERS: -------------------------------------------------------------------------------- 1 | # go-connections maintainers file 2 | # 3 | # This file describes who runs the docker/go-connections project and how. 4 | # This is a living document - if you see something out of date or missing, speak up! 5 | # 6 | # It is structured to be consumable by both humans and programs. 7 | # To extract its contents programmatically, use any TOML-compliant parser. 8 | # 9 | # This file is compiled into the MAINTAINERS file in docker/opensource. 10 | # 11 | [Org] 12 | [Org."Core maintainers"] 13 | people = [ 14 | "calavera", 15 | ] 16 | 17 | [people] 18 | 19 | # A reference list of all people associated with the project. 20 | # All other sections should refer to people by their canonical key 21 | # in the people section. 22 | 23 | # ADD YOURSELF HERE IN ALPHABETICAL ORDER 24 | [people.calavera] 25 | Name = "David Calavera" 26 | Email = "david.calavera@gmail.com" 27 | GitHub = "calavera" 28 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/task_list.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "encoding/json" 5 | "net/url" 6 | 7 | "github.com/docker/docker/api/types" 8 | "github.com/docker/docker/api/types/filters" 9 | "github.com/docker/docker/api/types/swarm" 10 | "golang.org/x/net/context" 11 | ) 12 | 13 | // TaskList returns the list of tasks. 14 | func (cli *Client) TaskList(ctx context.Context, options types.TaskListOptions) ([]swarm.Task, error) { 15 | query := url.Values{} 16 | 17 | if options.Filter.Len() > 0 { 18 | filterJSON, err := filters.ToParam(options.Filter) 19 | if err != nil { 20 | return nil, err 21 | } 22 | 23 | query.Set("filters", filterJSON) 24 | } 25 | 26 | resp, err := cli.get(ctx, "/tasks", query, nil) 27 | if err != nil { 28 | return nil, err 29 | } 30 | 31 | var tasks []swarm.Task 32 | err = json.NewDecoder(resp.body).Decode(&tasks) 33 | ensureReaderClosed(resp) 34 | return tasks, err 35 | } 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/mksysnum_darwin.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env perl 2 | # Copyright 2009 The Go Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style 4 | # license that can be found in the LICENSE file. 5 | # 6 | # Generate system call table for Darwin from sys/syscall.h 7 | 8 | use strict; 9 | 10 | if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") { 11 | print STDERR "GOARCH or GOOS not defined in environment\n"; 12 | exit 1; 13 | } 14 | 15 | my $command = "mksysnum_darwin.pl " . join(' ', @ARGV); 16 | 17 | print <){ 29 | if(/^#define\s+SYS_(\w+)\s+([0-9]+)/){ 30 | my $name = $1; 31 | my $num = $2; 32 | $name =~ y/a-z/A-Z/; 33 | print " SYS_$name = $num;" 34 | } 35 | } 36 | 37 | print < 0 { 18 | filterJSON, err := filters.ToParam(options.Filter) 19 | 20 | if err != nil { 21 | return nil, err 22 | } 23 | 24 | query.Set("filters", filterJSON) 25 | } 26 | 27 | resp, err := cli.get(ctx, "/nodes", query, nil) 28 | if err != nil { 29 | return nil, err 30 | } 31 | 32 | var nodes []swarm.Node 33 | err = json.NewDecoder(resp.body).Decode(&nodes) 34 | ensureReaderClosed(resp) 35 | return nodes, err 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/service_create.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "encoding/json" 5 | 6 | "github.com/docker/docker/api/types" 7 | "github.com/docker/docker/api/types/swarm" 8 | "golang.org/x/net/context" 9 | ) 10 | 11 | // ServiceCreate creates a new Service. 12 | func (cli *Client) ServiceCreate(ctx context.Context, service swarm.ServiceSpec, options types.ServiceCreateOptions) (types.ServiceCreateResponse, error) { 13 | var headers map[string][]string 14 | 15 | if options.EncodedRegistryAuth != "" { 16 | headers = map[string][]string{ 17 | "X-Registry-Auth": {options.EncodedRegistryAuth}, 18 | } 19 | } 20 | 21 | var response types.ServiceCreateResponse 22 | resp, err := cli.post(ctx, "/services/create", nil, service, headers) 23 | if err != nil { 24 | return response, err 25 | } 26 | 27 | err = json.NewDecoder(resp.body).Decode(&response) 28 | ensureReaderClosed(resp) 29 | return response, err 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/volume_list.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "encoding/json" 5 | "net/url" 6 | 7 | "github.com/docker/docker/api/types" 8 | "github.com/docker/docker/api/types/filters" 9 | "golang.org/x/net/context" 10 | ) 11 | 12 | // VolumeList returns the volumes configured in the docker host. 13 | func (cli *Client) VolumeList(ctx context.Context, filter filters.Args) (types.VolumesListResponse, error) { 14 | var volumes types.VolumesListResponse 15 | query := url.Values{} 16 | 17 | if filter.Len() > 0 { 18 | filterJSON, err := filters.ToParamWithVersion(cli.version, filter) 19 | if err != nil { 20 | return volumes, err 21 | } 22 | query.Set("filters", filterJSON) 23 | } 24 | resp, err := cli.get(ctx, "/volumes", query, nil) 25 | if err != nil { 26 | return volumes, err 27 | } 28 | 29 | err = json.NewDecoder(resp.body).Decode(&volumes) 30 | ensureReaderClosed(resp) 31 | return volumes, err 32 | } 33 | -------------------------------------------------------------------------------- /src/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "os" 5 | 6 | "github.com/Sirupsen/logrus" 7 | "github.com/rancher/strato/src/cmd/add" 8 | "github.com/rancher/strato/src/cmd/build" 9 | "github.com/rancher/strato/src/cmd/buildall" 10 | "github.com/rancher/strato/src/cmd/extract" 11 | "github.com/rancher/strato/src/cmd/index" 12 | "github.com/rancher/strato/src/cmd/inspect" 13 | "github.com/rancher/strato/src/cmd/xf" 14 | "github.com/urfave/cli" 15 | ) 16 | 17 | func main() { 18 | app := cli.NewApp() 19 | app.Name = os.Args[0] 20 | app.Flags = []cli.Flag{ 21 | cli.BoolFlag{ 22 | Name: "verbose", 23 | }, 24 | cli.StringFlag{ 25 | Name: "source", 26 | }, 27 | } 28 | app.Commands = []cli.Command{ 29 | add.Command, 30 | build.Command, 31 | buildall.Command, 32 | extract.Command, 33 | index.Command, 34 | inspect.Command, 35 | xf.Command, 36 | } 37 | if err := app.Run(os.Args); err != nil { 38 | logrus.Fatal(err) 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for 386, Linux 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 23 | JMP syscall·RawSyscall(SB) 24 | 25 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 26 | JMP syscall·RawSyscall6(SB) 27 | 28 | TEXT ·socketcall(SB),NOSPLIT,$0-36 29 | JMP syscall·socketcall(SB) 30 | 31 | TEXT ·rawsocketcall(SB),NOSPLIT,$0-36 32 | JMP syscall·rawsocketcall(SB) 33 | 34 | TEXT ·seek(SB),NOSPLIT,$0-28 35 | JMP syscall·seek(SB) 36 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/image_load.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "io" 5 | "net/url" 6 | 7 | "golang.org/x/net/context" 8 | 9 | "github.com/docker/docker/api/types" 10 | ) 11 | 12 | // ImageLoad loads an image in the docker host from the client host. 13 | // It's up to the caller to close the io.ReadCloser in the 14 | // ImageLoadResponse returned by this function. 15 | func (cli *Client) ImageLoad(ctx context.Context, input io.Reader, quiet bool) (types.ImageLoadResponse, error) { 16 | v := url.Values{} 17 | v.Set("quiet", "0") 18 | if quiet { 19 | v.Set("quiet", "1") 20 | } 21 | headers := map[string][]string{"Content-Type": {"application/x-tar"}} 22 | resp, err := cli.postRaw(ctx, "/images/load", v, input, headers) 23 | if err != nil { 24 | return types.ImageLoadResponse{}, err 25 | } 26 | return types.ImageLoadResponse{ 27 | Body: resp.body, 28 | JSON: resp.header.Get("Content-Type") == "application/json", 29 | }, nil 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/service_list.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "encoding/json" 5 | "net/url" 6 | 7 | "github.com/docker/docker/api/types" 8 | "github.com/docker/docker/api/types/filters" 9 | "github.com/docker/docker/api/types/swarm" 10 | "golang.org/x/net/context" 11 | ) 12 | 13 | // ServiceList returns the list of services. 14 | func (cli *Client) ServiceList(ctx context.Context, options types.ServiceListOptions) ([]swarm.Service, error) { 15 | query := url.Values{} 16 | 17 | if options.Filter.Len() > 0 { 18 | filterJSON, err := filters.ToParam(options.Filter) 19 | if err != nil { 20 | return nil, err 21 | } 22 | 23 | query.Set("filters", filterJSON) 24 | } 25 | 26 | resp, err := cli.get(ctx, "/services", query, nil) 27 | if err != nil { 28 | return nil, err 29 | } 30 | 31 | var services []swarm.Service 32 | err = json.NewDecoder(resp.body).Decode(&services) 33 | ensureReaderClosed(resp) 34 | return services, err 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/node_inspect.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "bytes" 5 | "encoding/json" 6 | "io/ioutil" 7 | "net/http" 8 | 9 | "github.com/docker/docker/api/types/swarm" 10 | "golang.org/x/net/context" 11 | ) 12 | 13 | // NodeInspectWithRaw returns the node information. 14 | func (cli *Client) NodeInspectWithRaw(ctx context.Context, nodeID string) (swarm.Node, []byte, error) { 15 | serverResp, err := cli.get(ctx, "/nodes/"+nodeID, nil, nil) 16 | if err != nil { 17 | if serverResp.statusCode == http.StatusNotFound { 18 | return swarm.Node{}, nil, nodeNotFoundError{nodeID} 19 | } 20 | return swarm.Node{}, nil, err 21 | } 22 | defer ensureReaderClosed(serverResp) 23 | 24 | body, err := ioutil.ReadAll(serverResp.body) 25 | if err != nil { 26 | return swarm.Node{}, nil, err 27 | } 28 | 29 | var response swarm.Node 30 | rdr := bytes.NewReader(body) 31 | err = json.NewDecoder(rdr).Decode(&response) 32 | return response, body, err 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/network_list.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "encoding/json" 5 | "net/url" 6 | 7 | "github.com/docker/docker/api/types" 8 | "github.com/docker/docker/api/types/filters" 9 | "golang.org/x/net/context" 10 | ) 11 | 12 | // NetworkList returns the list of networks configured in the docker host. 13 | func (cli *Client) NetworkList(ctx context.Context, options types.NetworkListOptions) ([]types.NetworkResource, error) { 14 | query := url.Values{} 15 | if options.Filters.Len() > 0 { 16 | filterJSON, err := filters.ToParamWithVersion(cli.version, options.Filters) 17 | if err != nil { 18 | return nil, err 19 | } 20 | 21 | query.Set("filters", filterJSON) 22 | } 23 | var networkResources []types.NetworkResource 24 | resp, err := cli.get(ctx, "/networks", query, nil) 25 | if err != nil { 26 | return networkResources, err 27 | } 28 | err = json.NewDecoder(resp.body).Decode(&networkResources) 29 | ensureReaderClosed(resp) 30 | return networkResources, err 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/task_inspect.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "bytes" 5 | "encoding/json" 6 | "io/ioutil" 7 | "net/http" 8 | 9 | "github.com/docker/docker/api/types/swarm" 10 | 11 | "golang.org/x/net/context" 12 | ) 13 | 14 | // TaskInspectWithRaw returns the task information and its raw representation.. 15 | func (cli *Client) TaskInspectWithRaw(ctx context.Context, taskID string) (swarm.Task, []byte, error) { 16 | serverResp, err := cli.get(ctx, "/tasks/"+taskID, nil, nil) 17 | if err != nil { 18 | if serverResp.statusCode == http.StatusNotFound { 19 | return swarm.Task{}, nil, taskNotFoundError{taskID} 20 | } 21 | return swarm.Task{}, nil, err 22 | } 23 | defer ensureReaderClosed(serverResp) 24 | 25 | body, err := ioutil.ReadAll(serverResp.body) 26 | if err != nil { 27 | return swarm.Task{}, nil, err 28 | } 29 | 30 | var response swarm.Task 31 | rdr := bytes.NewReader(body) 32 | err = json.NewDecoder(rdr).Decode(&response) 33 | return response, body, err 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/service_inspect.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "bytes" 5 | "encoding/json" 6 | "io/ioutil" 7 | "net/http" 8 | 9 | "github.com/docker/docker/api/types/swarm" 10 | "golang.org/x/net/context" 11 | ) 12 | 13 | // ServiceInspectWithRaw returns the service information and the raw data. 14 | func (cli *Client) ServiceInspectWithRaw(ctx context.Context, serviceID string) (swarm.Service, []byte, error) { 15 | serverResp, err := cli.get(ctx, "/services/"+serviceID, nil, nil) 16 | if err != nil { 17 | if serverResp.statusCode == http.StatusNotFound { 18 | return swarm.Service{}, nil, serviceNotFoundError{serviceID} 19 | } 20 | return swarm.Service{}, nil, err 21 | } 22 | defer ensureReaderClosed(serverResp) 23 | 24 | body, err := ioutil.ReadAll(serverResp.body) 25 | if err != nil { 26 | return swarm.Service{}, nil, err 27 | } 28 | 29 | var response swarm.Service 30 | rdr := bytes.NewReader(body) 31 | err = json.NewDecoder(rdr).Decode(&response) 32 | return response, body, err 33 | } 34 | -------------------------------------------------------------------------------- /packages/rsyslog/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM strato-build 2 | RUN strato add xz-dev acl-dev popt-dev lvm2-dev json-c-dev libestr-dev 3 | 4 | ENV VERSION 8.16.0 5 | ENV LDFLAGS -s 6 | RUN wget -P /usr/src/ http://www.rsyslog.com/files/download/rsyslog/rsyslog-${VERSION}.tar.gz 7 | COPY rsyslog.conf /usr/src/ 8 | RUN cd /usr/src/ && tar xf rsyslog*.tar.gz 9 | RUN cd /usr/src/rsyslog* \ 10 | && ./configure \ 11 | --prefix=/usr \ 12 | --disable-rfc3195 \ 13 | --enable-largefile \ 14 | --disable-imdiag \ 15 | --disable-imfile \ 16 | --disable-mail \ 17 | --disable-omprog \ 18 | --disable-omstdout \ 19 | --disable-omudpspoof \ 20 | --disable-imptcp \ 21 | --disable-impstats \ 22 | --disable-mysql \ 23 | --disable-pgsql \ 24 | --disable-gnutls \ 25 | --disable-snmp \ 26 | --disable-omhiredis \ 27 | --disable-libgcrypt \ 28 | --disable-liblogging-stdlog \ 29 | && make 30 | 31 | RUN cd /usr/src/rsyslog* \ 32 | && make install \ 33 | && install -m644 -D /usr/src/rsyslog.conf /etc/rsyslog.conf 34 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/README.md: -------------------------------------------------------------------------------- 1 | ## Go client for the Docker Remote API 2 | 3 | The `docker` command uses this package to communicate with the daemon. It can also be used by your own Go applications to do anything the command-line interface does – running containers, pulling images, managing swarms, etc. 4 | 5 | For example, to list running containers (the equivalent of `docker ps`): 6 | 7 | ```go 8 | package main 9 | 10 | import ( 11 | "context" 12 | "fmt" 13 | 14 | "github.com/docker/docker/api/types" 15 | "github.com/docker/docker/client" 16 | ) 17 | 18 | func main() { 19 | cli, err := client.NewEnvClient() 20 | if err != nil { 21 | panic(err) 22 | } 23 | 24 | containers, err := cli.ContainerList(context.Background(), types.ContainerListOptions{}) 25 | if err != nil { 26 | panic(err) 27 | } 28 | 29 | for _, container := range containers { 30 | fmt.Printf("%s %s\n", container.ID[:10], container.Image) 31 | } 32 | } 33 | ``` 34 | 35 | [Full documentation is available on GoDoc.](https://godoc.org/github.com/docker/docker/client) 36 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/image_inspect.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "bytes" 5 | "encoding/json" 6 | "io/ioutil" 7 | "net/http" 8 | 9 | "github.com/docker/docker/api/types" 10 | "golang.org/x/net/context" 11 | ) 12 | 13 | // ImageInspectWithRaw returns the image information and its raw representation. 14 | func (cli *Client) ImageInspectWithRaw(ctx context.Context, imageID string) (types.ImageInspect, []byte, error) { 15 | serverResp, err := cli.get(ctx, "/images/"+imageID+"/json", nil, nil) 16 | if err != nil { 17 | if serverResp.statusCode == http.StatusNotFound { 18 | return types.ImageInspect{}, nil, imageNotFoundError{imageID} 19 | } 20 | return types.ImageInspect{}, nil, err 21 | } 22 | defer ensureReaderClosed(serverResp) 23 | 24 | body, err := ioutil.ReadAll(serverResp.body) 25 | if err != nil { 26 | return types.ImageInspect{}, nil, err 27 | } 28 | 29 | var response types.ImageInspect 30 | rdr := bytes.NewReader(body) 31 | err = json.NewDecoder(rdr).Decode(&response) 32 | return response, body, err 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/image_tag.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "errors" 5 | "fmt" 6 | "net/url" 7 | 8 | "golang.org/x/net/context" 9 | 10 | distreference "github.com/docker/distribution/reference" 11 | "github.com/docker/docker/api/types/reference" 12 | ) 13 | 14 | // ImageTag tags an image in the docker host 15 | func (cli *Client) ImageTag(ctx context.Context, imageID, ref string) error { 16 | distributionRef, err := distreference.ParseNamed(ref) 17 | if err != nil { 18 | return fmt.Errorf("Error parsing reference: %q is not a valid repository/tag", ref) 19 | } 20 | 21 | if _, isCanonical := distributionRef.(distreference.Canonical); isCanonical { 22 | return errors.New("refusing to create a tag with a digest reference") 23 | } 24 | 25 | tag := reference.GetTagFromNamedRef(distributionRef) 26 | 27 | query := url.Values{} 28 | query.Set("repo", distributionRef.Name()) 29 | query.Set("tag", tag) 30 | 31 | resp, err := cli.post(ctx, "/images/"+imageID+"/tag", query, nil, nil) 32 | ensureReaderClosed(resp) 33 | return err 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/api/types/reference/image_reference.go: -------------------------------------------------------------------------------- 1 | package reference 2 | 3 | import ( 4 | distreference "github.com/docker/distribution/reference" 5 | ) 6 | 7 | // Parse parses the given references and returns the repository and 8 | // tag (if present) from it. If there is an error during parsing, it will 9 | // return an error. 10 | func Parse(ref string) (string, string, error) { 11 | distributionRef, err := distreference.ParseNamed(ref) 12 | if err != nil { 13 | return "", "", err 14 | } 15 | 16 | tag := GetTagFromNamedRef(distributionRef) 17 | return distributionRef.Name(), tag, nil 18 | } 19 | 20 | // GetTagFromNamedRef returns a tag from the specified reference. 21 | // This function is necessary as long as the docker "server" api makes the distinction between repository 22 | // and tags. 23 | func GetTagFromNamedRef(ref distreference.Named) string { 24 | var tag string 25 | switch x := ref.(type) { 26 | case distreference.Digested: 27 | tag = x.Digest().String() 28 | case distreference.NamedTagged: 29 | tag = x.Tag() 30 | default: 31 | tag = "latest" 32 | } 33 | return tag 34 | } 35 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,solaris 6 | 7 | package unix 8 | 9 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } 10 | 11 | func NsecToTimespec(nsec int64) (ts Timespec) { 12 | ts.Sec = nsec / 1e9 13 | ts.Nsec = nsec % 1e9 14 | return 15 | } 16 | 17 | func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 } 18 | 19 | func NsecToTimeval(nsec int64) (tv Timeval) { 20 | nsec += 999 // round up to microsecond 21 | tv.Usec = nsec % 1e9 / 1e3 22 | tv.Sec = int64(nsec / 1e9) 23 | return 24 | } 25 | 26 | func (iov *Iovec) SetLen(length int) { 27 | iov.Len = uint64(length) 28 | } 29 | 30 | func (cmsg *Cmsghdr) SetLen(length int) { 31 | cmsg.Len = uint32(length) 32 | } 33 | 34 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { 35 | // TODO(aram): implement this, see issue 5847. 36 | panic("unimplemented") 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_resize.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "net/url" 5 | "strconv" 6 | 7 | "github.com/docker/docker/api/types" 8 | "golang.org/x/net/context" 9 | ) 10 | 11 | // ContainerResize changes the size of the tty for a container. 12 | func (cli *Client) ContainerResize(ctx context.Context, containerID string, options types.ResizeOptions) error { 13 | return cli.resize(ctx, "/containers/"+containerID, options.Height, options.Width) 14 | } 15 | 16 | // ContainerExecResize changes the size of the tty for an exec process running inside a container. 17 | func (cli *Client) ContainerExecResize(ctx context.Context, execID string, options types.ResizeOptions) error { 18 | return cli.resize(ctx, "/exec/"+execID, options.Height, options.Width) 19 | } 20 | 21 | func (cli *Client) resize(ctx context.Context, basePath string, height, width uint) error { 22 | query := url.Values{} 23 | query.Set("h", strconv.Itoa(int(height))) 24 | query.Set("w", strconv.Itoa(int(width))) 25 | 26 | resp, err := cli.post(ctx, basePath+"/resize", query, nil, nil) 27 | ensureReaderClosed(resp) 28 | return err 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/docker/distribution/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## 2.5.0 (2016-06-14) 4 | 5 | ### Storage 6 | - Ensure uploads directory is cleaned after upload is commited 7 | - Add ability to cap concurrent operations in filesystem driver 8 | - S3: Add 'us-gov-west-1' to the valid region list 9 | - Swift: Handle ceph not returning Last-Modified header for HEAD requests 10 | - Add redirect middleware 11 | 12 | #### Registry 13 | - Add support for blobAccessController middleware 14 | - Add support for layers from foreign sources 15 | - Remove signature store 16 | - Add support for Let's Encrypt 17 | - Correct yaml key names in configuration 18 | 19 | #### Client 20 | - Add option to get content digest from manifest get 21 | 22 | #### Spec 23 | - Update the auth spec scope grammar to reflect the fact that hostnames are optionally supported 24 | - Clarify API documentation around catalog fetch behavior 25 | 26 | ### API 27 | - Support returning HTTP 429 (Too Many Requests) 28 | 29 | ### Documentation 30 | - Update auth documentation examples to show "expires in" as int 31 | 32 | ### Docker Image 33 | - Use Alpine Linux as base image 34 | 35 | 36 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/image_import.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "io" 5 | "net/url" 6 | 7 | "golang.org/x/net/context" 8 | 9 | "github.com/docker/distribution/reference" 10 | "github.com/docker/docker/api/types" 11 | ) 12 | 13 | // ImageImport creates a new image based in the source options. 14 | // It returns the JSON content in the response body. 15 | func (cli *Client) ImageImport(ctx context.Context, source types.ImageImportSource, ref string, options types.ImageImportOptions) (io.ReadCloser, error) { 16 | if ref != "" { 17 | //Check if the given image name can be resolved 18 | if _, err := reference.ParseNamed(ref); err != nil { 19 | return nil, err 20 | } 21 | } 22 | 23 | query := url.Values{} 24 | query.Set("fromSrc", source.SourceName) 25 | query.Set("repo", ref) 26 | query.Set("tag", options.Tag) 27 | query.Set("message", options.Message) 28 | for _, change := range options.Changes { 29 | query.Add("changes", change) 30 | } 31 | 32 | resp, err := cli.postRaw(ctx, "/images/create", query, source.Source, nil) 33 | if err != nil { 34 | return nil, err 35 | } 36 | return resp.body, nil 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/json_formatter.go: -------------------------------------------------------------------------------- 1 | package logrus 2 | 3 | import ( 4 | "encoding/json" 5 | "fmt" 6 | ) 7 | 8 | type JSONFormatter struct { 9 | // TimestampFormat sets the format used for marshaling timestamps. 10 | TimestampFormat string 11 | } 12 | 13 | func (f *JSONFormatter) Format(entry *Entry) ([]byte, error) { 14 | data := make(Fields, len(entry.Data)+3) 15 | for k, v := range entry.Data { 16 | switch v := v.(type) { 17 | case error: 18 | // Otherwise errors are ignored by `encoding/json` 19 | // https://github.com/Sirupsen/logrus/issues/137 20 | data[k] = v.Error() 21 | default: 22 | data[k] = v 23 | } 24 | } 25 | prefixFieldClashes(data) 26 | 27 | timestampFormat := f.TimestampFormat 28 | if timestampFormat == "" { 29 | timestampFormat = DefaultTimestampFormat 30 | } 31 | 32 | data["time"] = entry.Time.Format(timestampFormat) 33 | data["msg"] = entry.Message 34 | data["level"] = entry.Level.String() 35 | 36 | serialized, err := json.Marshal(data) 37 | if err != nil { 38 | return nil, fmt.Errorf("Failed to marshal fields to JSON, %v", err) 39 | } 40 | return append(serialized, '\n'), nil 41 | } 42 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/image_create.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "io" 5 | "net/url" 6 | 7 | "golang.org/x/net/context" 8 | 9 | "github.com/docker/docker/api/types" 10 | "github.com/docker/docker/api/types/reference" 11 | ) 12 | 13 | // ImageCreate creates a new image based in the parent options. 14 | // It returns the JSON content in the response body. 15 | func (cli *Client) ImageCreate(ctx context.Context, parentReference string, options types.ImageCreateOptions) (io.ReadCloser, error) { 16 | repository, tag, err := reference.Parse(parentReference) 17 | if err != nil { 18 | return nil, err 19 | } 20 | 21 | query := url.Values{} 22 | query.Set("fromImage", repository) 23 | query.Set("tag", tag) 24 | resp, err := cli.tryImageCreate(ctx, query, options.RegistryAuth) 25 | if err != nil { 26 | return nil, err 27 | } 28 | return resp.body, nil 29 | } 30 | 31 | func (cli *Client) tryImageCreate(ctx context.Context, query url.Values, registryAuth string) (serverResponse, error) { 32 | headers := map[string][]string{"X-Registry-Auth": {registryAuth}} 33 | return cli.post(ctx, "/images/create", query, nil, headers) 34 | } 35 | -------------------------------------------------------------------------------- /src/cmd/buildall/buildall.go: -------------------------------------------------------------------------------- 1 | package buildall 2 | 3 | import ( 4 | "fmt" 5 | "os" 6 | "path" 7 | 8 | "github.com/rancher/strato/src/build" 9 | "github.com/rancher/strato/src/buildorder" 10 | "github.com/rancher/strato/src/utils" 11 | "github.com/urfave/cli" 12 | ) 13 | 14 | // Command definition 15 | var Command = cli.Command{ 16 | Name: "build-all", 17 | Usage: "Managing building a collection of packages", 18 | HideHelp: true, 19 | Action: buildAllAction, 20 | Flags: []cli.Flag{}, 21 | } 22 | 23 | func buildAllAction(c *cli.Context) error { 24 | inDir := c.Args().Get(0) 25 | if _, err := os.Stat(inDir); os.IsNotExist(err) { 26 | return err 27 | } 28 | outDir, err := utils.GetOutDir(c.Args().Get(1)) 29 | if err != nil { 30 | return err 31 | } 32 | 33 | buildOrder, err := buildorder.Get(inDir) 34 | if err != nil { 35 | return err 36 | } 37 | 38 | fmt.Println("Build order") 39 | for _, pkg := range buildOrder { 40 | fmt.Println(pkg) 41 | } 42 | 43 | for _, pkg := range buildOrder { 44 | if err = build.Build(path.Join(inDir, pkg), outDir); err != nil { 45 | return err 46 | } 47 | } 48 | 49 | return nil 50 | } 51 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/container_attach.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "net/url" 5 | 6 | "github.com/docker/docker/api/types" 7 | "golang.org/x/net/context" 8 | ) 9 | 10 | // ContainerAttach attaches a connection to a container in the server. 11 | // It returns a types.HijackedConnection with the hijacked connection 12 | // and the a reader to get output. It's up to the called to close 13 | // the hijacked connection by calling types.HijackedResponse.Close. 14 | func (cli *Client) ContainerAttach(ctx context.Context, container string, options types.ContainerAttachOptions) (types.HijackedResponse, error) { 15 | query := url.Values{} 16 | if options.Stream { 17 | query.Set("stream", "1") 18 | } 19 | if options.Stdin { 20 | query.Set("stdin", "1") 21 | } 22 | if options.Stdout { 23 | query.Set("stdout", "1") 24 | } 25 | if options.Stderr { 26 | query.Set("stderr", "1") 27 | } 28 | if options.DetachKeys != "" { 29 | query.Set("detachKeys", options.DetachKeys) 30 | } 31 | 32 | headers := map[string][]string{"Content-Type": {"text/plain"}} 33 | return cli.postHijacked(ctx, "/containers/"+container+"/attach", query, nil, headers) 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 Jeremy Saenz & Contributors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Go 2 | 3 | Go is an open source project. 4 | 5 | It is the work of hundreds of contributors. We appreciate your help! 6 | 7 | 8 | ## Filing issues 9 | 10 | When [filing an issue](https://golang.org/issue/new), make sure to answer these five questions: 11 | 12 | 1. What version of Go are you using (`go version`)? 13 | 2. What operating system and processor architecture are you using? 14 | 3. What did you do? 15 | 4. What did you expect to see? 16 | 5. What did you see instead? 17 | 18 | General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker. 19 | The gophers there will answer or ask you to file an issue if you've tripped over a bug. 20 | 21 | ## Contributing code 22 | 23 | Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html) 24 | before sending patches. 25 | 26 | **We do not accept GitHub pull requests** 27 | (we use [Gerrit](https://code.google.com/p/gerrit/) instead for code review). 28 | 29 | Unless otherwise noted, the Go source files are distributed under 30 | the BSD-style license found in the LICENSE file. 31 | 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Go 2 | 3 | Go is an open source project. 4 | 5 | It is the work of hundreds of contributors. We appreciate your help! 6 | 7 | 8 | ## Filing issues 9 | 10 | When [filing an issue](https://golang.org/issue/new), make sure to answer these five questions: 11 | 12 | 1. What version of Go are you using (`go version`)? 13 | 2. What operating system and processor architecture are you using? 14 | 3. What did you do? 15 | 4. What did you expect to see? 16 | 5. What did you see instead? 17 | 18 | General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker. 19 | The gophers there will answer or ask you to file an issue if you've tripped over a bug. 20 | 21 | ## Contributing code 22 | 23 | Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html) 24 | before sending patches. 25 | 26 | **We do not accept GitHub pull requests** 27 | (we use [Gerrit](https://code.google.com/p/gerrit/) instead for code review). 28 | 29 | Unless otherwise noted, the Go source files are distributed under 30 | the BSD-style license found in the LICENSE file. 31 | 32 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Simon Eskildsen 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/client/image_list.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "encoding/json" 5 | "net/url" 6 | 7 | "github.com/docker/docker/api/types" 8 | "github.com/docker/docker/api/types/filters" 9 | "golang.org/x/net/context" 10 | ) 11 | 12 | // ImageList returns a list of images in the docker host. 13 | func (cli *Client) ImageList(ctx context.Context, options types.ImageListOptions) ([]types.Image, error) { 14 | var images []types.Image 15 | query := url.Values{} 16 | 17 | if options.Filters.Len() > 0 { 18 | filterJSON, err := filters.ToParamWithVersion(cli.version, options.Filters) 19 | if err != nil { 20 | return images, err 21 | } 22 | query.Set("filters", filterJSON) 23 | } 24 | if options.MatchName != "" { 25 | // FIXME rename this parameter, to not be confused with the filters flag 26 | query.Set("filter", options.MatchName) 27 | } 28 | if options.All { 29 | query.Set("all", "1") 30 | } 31 | 32 | serverResp, err := cli.get(ctx, "/images/json", query, nil) 33 | if err != nil { 34 | return images, err 35 | } 36 | 37 | err = json.NewDecoder(serverResp.body).Decode(&images) 38 | ensureReaderClosed(serverResp) 39 | return images, err 40 | } 41 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/gccgo_c.c: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gccgo 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | #define _STRINGIFY2_(x) #x 12 | #define _STRINGIFY_(x) _STRINGIFY2_(x) 13 | #define GOSYM_PREFIX _STRINGIFY_(__USER_LABEL_PREFIX__) 14 | 15 | // Call syscall from C code because the gccgo support for calling from 16 | // Go to C does not support varargs functions. 17 | 18 | struct ret { 19 | uintptr_t r; 20 | uintptr_t err; 21 | }; 22 | 23 | struct ret 24 | gccgoRealSyscall(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9) 25 | { 26 | struct ret r; 27 | 28 | errno = 0; 29 | r.r = syscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9); 30 | r.err = errno; 31 | return r; 32 | } 33 | 34 | // Define the use function in C so that it is not inlined. 35 | 36 | extern void use(void *) __asm__ (GOSYM_PREFIX GOPKGPATH ".use") __attribute__((noinline)); 37 | 38 | void 39 | use(void *p __attribute__ ((unused))) 40 | { 41 | } 42 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/runc/PRINCIPLES.md: -------------------------------------------------------------------------------- 1 | # runc principles 2 | 3 | In the design and development of runc and libcontainer we try to follow these principles: 4 | 5 | (Work in progress) 6 | 7 | * Don't try to replace every tool. Instead, be an ingredient to improve them. 8 | * Less code is better. 9 | * Fewer components are better. Do you really need to add one more class? 10 | * 50 lines of straightforward, readable code is better than 10 lines of magic that nobody can understand. 11 | * Don't do later what you can do now. "//TODO: refactor" is not acceptable in new code. 12 | * When hesitating between two options, choose the one that is easier to reverse. 13 | * "No" is temporary; "Yes" is forever. If you're not sure about a new feature, say no. You can change your mind later. 14 | * Containers must be portable to the greatest possible number of machines. Be suspicious of any change which makes machines less interchangeable. 15 | * The fewer moving parts in a container, the better. 16 | * Don't merge it unless you document it. 17 | * Don't document it unless you can keep it up-to-date. 18 | * Don't merge it unless you test it! 19 | * Everyone's problem is slightly different. Focus on the part that is the same for everyone, and solve that. 20 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,openbsd 6 | 7 | package unix 8 | 9 | func Getpagesize() int { return 4096 } 10 | 11 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } 12 | 13 | func NsecToTimespec(nsec int64) (ts Timespec) { 14 | ts.Sec = nsec / 1e9 15 | ts.Nsec = nsec % 1e9 16 | return 17 | } 18 | 19 | func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 } 20 | 21 | func NsecToTimeval(nsec int64) (tv Timeval) { 22 | nsec += 999 // round up to microsecond 23 | tv.Usec = nsec % 1e9 / 1e3 24 | tv.Sec = nsec / 1e9 25 | return 26 | } 27 | 28 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 29 | k.Ident = uint64(fd) 30 | k.Filter = int16(mode) 31 | k.Flags = uint16(flags) 32 | } 33 | 34 | func (iov *Iovec) SetLen(length int) { 35 | iov.Len = uint64(length) 36 | } 37 | 38 | func (msghdr *Msghdr) SetControllen(length int) { 39 | msghdr.Controllen = uint32(length) 40 | } 41 | 42 | func (cmsg *Cmsghdr) SetLen(length int) { 43 | cmsg.Len = uint32(length) 44 | } 45 | -------------------------------------------------------------------------------- /vendor/github.com/docker/distribution/digest/verifiers.go: -------------------------------------------------------------------------------- 1 | package digest 2 | 3 | import ( 4 | "hash" 5 | "io" 6 | ) 7 | 8 | // Verifier presents a general verification interface to be used with message 9 | // digests and other byte stream verifications. Users instantiate a Verifier 10 | // from one of the various methods, write the data under test to it then check 11 | // the result with the Verified method. 12 | type Verifier interface { 13 | io.Writer 14 | 15 | // Verified will return true if the content written to Verifier matches 16 | // the digest. 17 | Verified() bool 18 | } 19 | 20 | // NewDigestVerifier returns a verifier that compares the written bytes 21 | // against a passed in digest. 22 | func NewDigestVerifier(d Digest) (Verifier, error) { 23 | if err := d.Validate(); err != nil { 24 | return nil, err 25 | } 26 | 27 | return hashVerifier{ 28 | hash: d.Algorithm().Hash(), 29 | digest: d, 30 | }, nil 31 | } 32 | 33 | type hashVerifier struct { 34 | digest Digest 35 | hash hash.Hash 36 | } 37 | 38 | func (hv hashVerifier) Write(p []byte) (n int, err error) { 39 | return hv.hash.Write(p) 40 | } 41 | 42 | func (hv hashVerifier) Verified() bool { 43 | return hv.digest == NewDigest(hv.digest.Algorithm(), hv.hash) 44 | } 45 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-units/duration.go: -------------------------------------------------------------------------------- 1 | // Package units provides helper function to parse and print size and time units 2 | // in human-readable format. 3 | package units 4 | 5 | import ( 6 | "fmt" 7 | "time" 8 | ) 9 | 10 | // HumanDuration returns a human-readable approximation of a duration 11 | // (eg. "About a minute", "4 hours ago", etc.). 12 | func HumanDuration(d time.Duration) string { 13 | if seconds := int(d.Seconds()); seconds < 1 { 14 | return "Less than a second" 15 | } else if seconds == 1 { 16 | return "1 second" 17 | } else if seconds < 60 { 18 | return fmt.Sprintf("%d seconds", seconds) 19 | } else if minutes := int(d.Minutes()); minutes == 1 { 20 | return "About a minute" 21 | } else if minutes < 60 { 22 | return fmt.Sprintf("%d minutes", minutes) 23 | } else if hours := int(d.Hours()); hours == 1 { 24 | return "About an hour" 25 | } else if hours < 48 { 26 | return fmt.Sprintf("%d hours", hours) 27 | } else if hours < 24*7*2 { 28 | return fmt.Sprintf("%d days", hours/24) 29 | } else if hours < 24*30*3 { 30 | return fmt.Sprintf("%d weeks", hours/24/7) 31 | } else if hours < 24*365*2 { 32 | return fmt.Sprintf("%d months", hours/24/30) 33 | } 34 | return fmt.Sprintf("%d years", int(d.Hours())/24/365) 35 | } 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sockcmsg_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Socket control messages 6 | 7 | package unix 8 | 9 | import "unsafe" 10 | 11 | // UnixCredentials encodes credentials into a socket control message 12 | // for sending to another process. This can be used for 13 | // authentication. 14 | func UnixCredentials(ucred *Ucred) []byte { 15 | b := make([]byte, CmsgSpace(SizeofUcred)) 16 | h := (*Cmsghdr)(unsafe.Pointer(&b[0])) 17 | h.Level = SOL_SOCKET 18 | h.Type = SCM_CREDENTIALS 19 | h.SetLen(CmsgLen(SizeofUcred)) 20 | *((*Ucred)(cmsgData(h))) = *ucred 21 | return b 22 | } 23 | 24 | // ParseUnixCredentials decodes a socket control message that contains 25 | // credentials in a Ucred structure. To receive such a message, the 26 | // SO_PASSCRED option must be enabled on the socket. 27 | func ParseUnixCredentials(m *SocketControlMessage) (*Ucred, error) { 28 | if m.Header.Level != SOL_SOCKET { 29 | return nil, EINVAL 30 | } 31 | if m.Header.Type != SCM_CREDENTIALS { 32 | return nil, EINVAL 33 | } 34 | ucred := *(*Ucred)(unsafe.Pointer(&m.Data[0])) 35 | return &ucred, nil 36 | } 37 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build 386,netbsd 6 | 7 | package unix 8 | 9 | func Getpagesize() int { return 4096 } 10 | 11 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } 12 | 13 | func NsecToTimespec(nsec int64) (ts Timespec) { 14 | ts.Sec = int64(nsec / 1e9) 15 | ts.Nsec = int32(nsec % 1e9) 16 | return 17 | } 18 | 19 | func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 } 20 | 21 | func NsecToTimeval(nsec int64) (tv Timeval) { 22 | nsec += 999 // round up to microsecond 23 | tv.Usec = int32(nsec % 1e9 / 1e3) 24 | tv.Sec = int64(nsec / 1e9) 25 | return 26 | } 27 | 28 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 29 | k.Ident = uint32(fd) 30 | k.Filter = uint32(mode) 31 | k.Flags = uint32(flags) 32 | } 33 | 34 | func (iov *Iovec) SetLen(length int) { 35 | iov.Len = uint32(length) 36 | } 37 | 38 | func (msghdr *Msghdr) SetControllen(length int) { 39 | msghdr.Controllen = uint32(length) 40 | } 41 | 42 | func (cmsg *Cmsghdr) SetLen(length int) { 43 | cmsg.Len = uint32(length) 44 | } 45 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build arm,netbsd 6 | 7 | package unix 8 | 9 | func Getpagesize() int { return 4096 } 10 | 11 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } 12 | 13 | func NsecToTimespec(nsec int64) (ts Timespec) { 14 | ts.Sec = int64(nsec / 1e9) 15 | ts.Nsec = int32(nsec % 1e9) 16 | return 17 | } 18 | 19 | func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 } 20 | 21 | func NsecToTimeval(nsec int64) (tv Timeval) { 22 | nsec += 999 // round up to microsecond 23 | tv.Usec = int32(nsec % 1e9 / 1e3) 24 | tv.Sec = int64(nsec / 1e9) 25 | return 26 | } 27 | 28 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 29 | k.Ident = uint32(fd) 30 | k.Filter = uint32(mode) 31 | k.Flags = uint32(flags) 32 | } 33 | 34 | func (iov *Iovec) SetLen(length int) { 35 | iov.Len = uint32(length) 36 | } 37 | 38 | func (msghdr *Msghdr) SetControllen(length int) { 39 | msghdr.Controllen = uint32(length) 40 | } 41 | 42 | func (cmsg *Cmsghdr) SetLen(length int) { 43 | cmsg.Len = uint32(length) 44 | } 45 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build 386,openbsd 6 | 7 | package unix 8 | 9 | func Getpagesize() int { return 4096 } 10 | 11 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } 12 | 13 | func NsecToTimespec(nsec int64) (ts Timespec) { 14 | ts.Sec = int64(nsec / 1e9) 15 | ts.Nsec = int32(nsec % 1e9) 16 | return 17 | } 18 | 19 | func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 } 20 | 21 | func NsecToTimeval(nsec int64) (tv Timeval) { 22 | nsec += 999 // round up to microsecond 23 | tv.Usec = int32(nsec % 1e9 / 1e3) 24 | tv.Sec = int64(nsec / 1e9) 25 | return 26 | } 27 | 28 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 29 | k.Ident = uint32(fd) 30 | k.Filter = int16(mode) 31 | k.Flags = uint16(flags) 32 | } 33 | 34 | func (iov *Iovec) SetLen(length int) { 35 | iov.Len = uint32(length) 36 | } 37 | 38 | func (msghdr *Msghdr) SetControllen(length int) { 39 | msghdr.Controllen = uint32(length) 40 | } 41 | 42 | func (cmsg *Cmsghdr) SetLen(length int) { 43 | cmsg.Len = uint32(length) 44 | } 45 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/hooks.go: -------------------------------------------------------------------------------- 1 | package logrus 2 | 3 | // A hook to be fired when logging on the logging levels returned from 4 | // `Levels()` on your implementation of the interface. Note that this is not 5 | // fired in a goroutine or a channel with workers, you should handle such 6 | // functionality yourself if your call is non-blocking and you don't wish for 7 | // the logging calls for levels returned from `Levels()` to block. 8 | type Hook interface { 9 | Levels() []Level 10 | Fire(*Entry) error 11 | } 12 | 13 | // Internal type for storing the hooks on a logger instance. 14 | type LevelHooks map[Level][]Hook 15 | 16 | // Add a hook to an instance of logger. This is called with 17 | // `log.Hooks.Add(new(MyHook))` where `MyHook` implements the `Hook` interface. 18 | func (hooks LevelHooks) Add(hook Hook) { 19 | for _, level := range hook.Levels() { 20 | hooks[level] = append(hooks[level], hook) 21 | } 22 | } 23 | 24 | // Fire all the hooks for the passed level. Used by `entry.log` to fire 25 | // appropriate hooks for a log entry. 26 | func (hooks LevelHooks) Fire(level Level, entry *Entry) error { 27 | for _, hook := range hooks[level] { 28 | if err := hook.Fire(entry); err != nil { 29 | return err 30 | } 31 | } 32 | 33 | return nil 34 | } 35 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,netbsd 6 | 7 | package unix 8 | 9 | func Getpagesize() int { return 4096 } 10 | 11 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } 12 | 13 | func NsecToTimespec(nsec int64) (ts Timespec) { 14 | ts.Sec = int64(nsec / 1e9) 15 | ts.Nsec = int64(nsec % 1e9) 16 | return 17 | } 18 | 19 | func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 } 20 | 21 | func NsecToTimeval(nsec int64) (tv Timeval) { 22 | nsec += 999 // round up to microsecond 23 | tv.Usec = int32(nsec % 1e9 / 1e3) 24 | tv.Sec = int64(nsec / 1e9) 25 | return 26 | } 27 | 28 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 29 | k.Ident = uint64(fd) 30 | k.Filter = uint32(mode) 31 | k.Flags = uint32(flags) 32 | } 33 | 34 | func (iov *Iovec) SetLen(length int) { 35 | iov.Len = uint64(length) 36 | } 37 | 38 | func (msghdr *Msghdr) SetControllen(length int) { 39 | msghdr.Controllen = uint32(length) 40 | } 41 | 42 | func (cmsg *Cmsghdr) SetLen(length int) { 43 | cmsg.Len = uint32(length) 44 | } 45 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env perl 2 | # Copyright 2009 The Go Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style 4 | # license that can be found in the LICENSE file. 5 | # 6 | # Generate system call table for DragonFly from master list 7 | # (for example, /usr/src/sys/kern/syscalls.master). 8 | 9 | use strict; 10 | 11 | if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") { 12 | print STDERR "GOARCH or GOOS not defined in environment\n"; 13 | exit 1; 14 | } 15 | 16 | my $command = "mksysnum_dragonfly.pl " . join(' ', @ARGV); 17 | 18 | print <){ 30 | if(/^([0-9]+)\s+STD\s+({ \S+\s+(\w+).*)$/){ 31 | my $num = $1; 32 | my $proto = $2; 33 | my $name = "SYS_$3"; 34 | $name =~ y/a-z/A-Z/; 35 | 36 | # There are multiple entries for enosys and nosys, so comment them out. 37 | if($name =~ /^SYS_E?NOSYS$/){ 38 | $name = "// $name"; 39 | } 40 | if($name eq 'SYS_SYS_EXIT'){ 41 | $name = 'SYS_EXIT'; 42 | } 43 | 44 | print " $name = $num; // $proto\n"; 45 | } 46 | } 47 | 48 | print <){ 30 | if(/^([0-9]+)\s+STD\s+(NOLOCK\s+)?({ \S+\s+\*?(\w+).*)$/){ 31 | my $num = $1; 32 | my $proto = $3; 33 | my $name = $4; 34 | $name =~ y/a-z/A-Z/; 35 | 36 | # There are multiple entries for enosys and nosys, so comment them out. 37 | if($name =~ /^SYS_E?NOSYS$/){ 38 | $name = "// $name"; 39 | } 40 | if($name eq 'SYS_SYS_EXIT'){ 41 | $name = 'SYS_EXIT'; 42 | } 43 | 44 | print " $name = $num; // $proto\n"; 45 | } 46 | } 47 | 48 | print <