diff options
author | swills <swills@FreeBSD.org> | 2015-06-14 06:06:57 +0800 |
---|---|---|
committer | swills <swills@FreeBSD.org> | 2015-06-14 06:06:57 +0800 |
commit | 143095b1123f766f57f68b9527e5c3761d366c4c (patch) | |
tree | 0d11dd4cc309ebf0d6156ca9e4caf16366454146 /sysutils | |
parent | 3e725840dee901ed4faa82b8f3ad9577156e8146 (diff) | |
download | freebsd-ports-gnome-143095b1123f766f57f68b9527e5c3761d366c4c.tar.gz freebsd-ports-gnome-143095b1123f766f57f68b9527e5c3761d366c4c.tar.zst freebsd-ports-gnome-143095b1123f766f57f68b9527e5c3761d366c4c.zip |
sysutils/packer: create port
Packer is a tool for creating identical machine images for multiple platforms
from a single source configuration.
WWW: http://packer.io/
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/Makefile | 1 | ||||
-rw-r--r-- | sysutils/packer/Makefile | 120 | ||||
-rw-r--r-- | sysutils/packer/distinfo | 62 | ||||
-rw-r--r-- | sysutils/packer/files/patch-src_github.com_mitchellh_packer_post-processor_atlas_util.go | 18 | ||||
-rw-r--r-- | sysutils/packer/pkg-descr | 4 | ||||
-rw-r--r-- | sysutils/packer/pkg-plist | 33 |
6 files changed, 238 insertions, 0 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile index a6452f85f73c..1d3ddb3248dc 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -653,6 +653,7 @@ SUBDIR += p5-ZConf-Cron SUBDIR += p5-arclog SUBDIR += p5-reslog + SUBDIR += packer SUBDIR += pacman SUBDIR += paicc SUBDIR += pam_mount diff --git a/sysutils/packer/Makefile b/sysutils/packer/Makefile new file mode 100644 index 000000000000..762f73d7de26 --- /dev/null +++ b/sysutils/packer/Makefile @@ -0,0 +1,120 @@ +# $FreeBSD$ + +PORTNAME= packer +PORTVERSION= 0.7.5 +DISTVERSIONPREFIX= v +CATEGORIES= sysutils + +MAINTAINER= swills@FreeBSD.org +COMMENT= Tool for creating machine images + +BUILD_DEPENDS= ${LOCALBASE}/bin/go:${PORTSDIR}/lang/go + +USE_GITHUB= yes +GH_ACCOUNT= mitchellh:DEFAULT,cli,iochan,mapstructure,osext,panicwrap,prefixedio,gofs,gophercloud,goamz,multistep,govnc \ + hashicorp:atlas,checkpoint,msgpack,version,yamux golang:crypto,protobuf,net,oauth2,appengine \ + vaughan0:goini going:toolkit racker:perigee \ + ActiveState:tail howeyc:fsnotify zoutaiqi:gosshold \ + google:apiclient GoogleCloudPlatform:gcloud go-tomb:tomb +GH_PROJECT= cli:cli iochan:iochan mapstructure:mapstructure osext:osext \ + panicwrap:panicwrap prefixedio:prefixedio atlas-go:atlas \ + go-checkpoint:checkpoint go-msgpack:msgpack go-version:version \ + yamux:yamux crypto:crypto go-ini:goini protobuf:protobuf \ + toolkit:toolkit perigee:perigee tail:tail go-fs:gofs \ + gophercloud-fork-40444fb:gophercloud goamz:goamz \ + multistep:multistep go-vnc:govnc fsnotify:fsnotify net:net \ + oauth2:oauth2 gosshold:gosshold google-api-go-client:apiclient \ + appengine:appengine gcloud-golang:gcloud tomb:tomb +GH_TAGNAME= e3c2e3d:cli b584a32:iochan 740c764:mapstructure 0dd3f91:osext \ + 45cbfd3:panicwrap 89d9b53:prefixedio \ + 0008374:atlas efefdc6:checkpoint 71c2886:msgpack \ + bb92ddd:version 9feabe6:yamux 1fbbd62:crypto a98ad7e:goini \ + abd3b41:protobuf 6185c18:toolkit d281986:perigee \ + 068b729:tail 590e633:gofs 40444fb:gophercloud 52a0104:goamz \ + 162146f:multistep 6fca135:govnc 6b1ef89:fsnotify \ + 8aa6e20:net b3f9a68:oauth2 967f522:gosshold fa1ebc5:apiclient \ + c98f627:appengine eaf111a:gcloud dd63297:tomb + +STRIP= # stripping can break go binaries + +PLUGINS= builder-amazon-chroot builder-amazon-ebs builder-amazon-instance \ + builder-digitalocean builder-docker builder-googlecompute builder-null \ + builder-openstack builder-parallels-iso builder-parallels-pvm \ + builder-qemu builder-virtualbox-iso builder-virtualbox-ovf builder-vmware-iso \ + builder-vmware-vmx post-processor-atlas post-processor-compress \ + post-processor-docker-import post-processor-docker-push post-processor-docker-save \ + post-processor-docker-tag post-processor-vagrant post-processor-vagrant-cloud \ + post-processor-vsphere provisioner-ansible-local provisioner-chef-client \ + provisioner-chef-solo provisioner-file provisioner-puppet-masterless \ + provisioner-puppet-server provisioner-salt-masterless provisioner-shell + +post-extract: + @${MKDIR} ${WRKSRC}/src/github.com/${GH_ACCOUNT}/${PORTNAME} +.for src in .gitignore .travis.yml CHANGELOG.md CONTRIBUTING.md LICENSE \ + Makefile README.md Vagrantfile builder checkpoint.go command \ + commands.go common communicator config.go config_unix.go \ + config_windows.go fix log.go main.go main_test.go packer panic.go \ + plugin post-processor provisioner scripts signal.go stdin.go test \ + version.go website + @${MV} ${WRKSRC}/${src} \ + ${WRKSRC}/src/github.com/mitchellh/${PORTNAME} +.endfor + @${MKDIR} ${WRKSRC}/src/github.com/ActiveState + @${MKDIR} ${WRKSRC}/src/github.com/hashicorp + @${MKDIR} ${WRKSRC}/src/github.com/golang + @${MKDIR} ${WRKSRC}/src/github.com/going + @${MKDIR} ${WRKSRC}/src/github.com/howeyc + @${MKDIR} ${WRKSRC}/src/github.com/racker + @${MKDIR} ${WRKSRC}/src/github.com/vaughan0 + @${MKDIR} ${WRKSRC}/src/golang.org/x + @${MKDIR} ${WRKSRC}/src/gopkg.in + @${MKDIR} ${WRKSRC}/src/code.google.com/p + @${MKDIR} ${WRKSRC}/src/google.golang.org + @${MV} ${WRKSRC_tail} ${WRKSRC}/src/github.com/ActiveState/tail + @${MV} ${WRKSRC_cli} ${WRKSRC}/src/github.com/mitchellh/cli + @${MV} ${WRKSRC_iochan} ${WRKSRC}/src/github.com/mitchellh/iochan + @${MV} ${WRKSRC_mapstructure} ${WRKSRC}/src/github.com/mitchellh/mapstructure + @${MV} ${WRKSRC_osext} ${WRKSRC}/src/github.com/mitchellh/osext + @${MV} ${WRKSRC_panicwrap} ${WRKSRC}/src/github.com/mitchellh/panicwrap + @${MV} ${WRKSRC_prefixedio} ${WRKSRC}/src/github.com/mitchellh/prefixedio + @${MV} ${WRKSRC_gofs} ${WRKSRC}/src/github.com/mitchellh/go-fs + @${MV} ${WRKSRC_gophercloud} ${WRKSRC}/src/github.com/mitchellh/gophercloud-fork-40444fb + @${MV} ${WRKSRC_goamz} ${WRKSRC}/src/github.com/mitchellh/goamz + @${MV} ${WRKSRC_multistep} ${WRKSRC}/src/github.com/mitchellh/multistep + @${MV} ${WRKSRC_govnc} ${WRKSRC}/src/github.com/mitchellh/go-vnc + @${MV} ${WRKSRC_atlas} ${WRKSRC}/src/github.com/hashicorp/atlas-go + @${MV} ${WRKSRC_checkpoint} ${WRKSRC}/src/github.com/hashicorp/go-checkpoint + @${MV} ${WRKSRC_msgpack} ${WRKSRC}/src/github.com/hashicorp/go-msgpack + @${MV} ${WRKSRC_version} ${WRKSRC}/src/github.com/hashicorp/go-version + @${MV} ${WRKSRC_yamux} ${WRKSRC}/src/github.com/hashicorp/yamux + @${MV} ${WRKSRC_protobuf} ${WRKSRC}/src/github.com/golang/protobuf + @${MV} ${WRKSRC_goini} ${WRKSRC}/src/github.com/vaughan0/go-ini + @${MV} ${WRKSRC_fsnotify} ${WRKSRC}/src/github.com/howeyc/fsnotify + @${CP} -r ${WRKSRC_net} ${WRKSRC}/src/golang.org/x/net + @${MV} ${WRKSRC_net} ${WRKSRC}/src/github.com/golang/net + @${CP} -r ${WRKSRC_crypto} ${WRKSRC}/src/golang.org/x/crypto + @${MV} ${WRKSRC_oauth2} ${WRKSRC}/src/golang.org/x/oauth2 + @${MV} ${WRKSRC_gosshold} ${WRKSRC}/src/code.google.com/p/gosshold + @${MV} ${WRKSRC_crypto} ${WRKSRC}/src/code.google.com/p/go.crypto + @${MV} ${WRKSRC_apiclient} ${WRKSRC}/src/code.google.com/p/google-api-go-client + @${MV} ${WRKSRC_appengine} ${WRKSRC}/src/google.golang.org/appengine + @${MV} ${WRKSRC_gcloud} ${WRKSRC}/src/google.golang.org/cloud + @${MV} ${WRKSRC_tomb} ${WRKSRC}/src/gopkg.in/tomb.v1 + @${MV} ${WRKSRC_perigee} ${WRKSRC}/src/github.com/racker/perigee + @${MV} ${WRKSRC_toolkit} ${WRKSRC}/src/github.com/going/toolkit + @${FIND} ${WRKSRC}/src/code.google.com/p/go.crypto -type f -name '*.go' -exec \ + ${REINPLACE_CMD} -e 's,golang.org/x/crypto/ssh,code.google.com/p/go.crypto/ssh,g' {} + + +do-build: + cd ${WRKSRC}/src/github.com/${GH_ACCOUNT}/${PORTNAME}; ${SETENV} GOPATH=${WRKSRC} go build -o bin/${PORTNAME} +.for plugin in ${PLUGINS} + cd ${WRKSRC}/src/github.com/${GH_ACCOUNT}/${PORTNAME}; ${SETENV} GOPATH=${WRKSRC} go build -o bin/${PORTNAME}-${plugin} github.com/mitchellh/packer/plugin/${plugin} +.endfor + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/src/github.com/${GH_ACCOUNT}/${PORTNAME}/bin/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME} +.for plugin in ${PLUGINS} + ${INSTALL_PROGRAM} ${WRKSRC}/src/github.com/${GH_ACCOUNT}/${PORTNAME}/bin/${PORTNAME}-${plugin} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}-${plugin} +.endfor + +.include <bsd.port.mk> diff --git a/sysutils/packer/distinfo b/sysutils/packer/distinfo new file mode 100644 index 000000000000..e77827760e55 --- /dev/null +++ b/sysutils/packer/distinfo @@ -0,0 +1,62 @@ +SHA256 (mitchellh-packer-v0.7.5_GH0.tar.gz) = a245712c5b73c89cc5e97c00c270c8955c4b90ef7915c4fa93fc90e1adbdb645 +SIZE (mitchellh-packer-v0.7.5_GH0.tar.gz) = 899730 +SHA256 (mitchellh-cli-e3c2e3d_GH0.tar.gz) = 9042c6d2ad5da705c1ae7d0f12d07dc76e87f6dbea524df52edee0c00982cf36 +SIZE (mitchellh-cli-e3c2e3d_GH0.tar.gz) = 12178 +SHA256 (mitchellh-iochan-b584a32_GH0.tar.gz) = b03f64996f9d79505030532257e25f7a5af1de69babca35d4d3ed5b36278c209 +SIZE (mitchellh-iochan-b584a32_GH0.tar.gz) = 1106 +SHA256 (mitchellh-mapstructure-740c764_GH0.tar.gz) = d68a258cdb95fc5f2971cd50ad29c0c479f6c3420ddeec386077626e517b5f71 +SIZE (mitchellh-mapstructure-740c764_GH0.tar.gz) = 11943 +SHA256 (mitchellh-osext-0dd3f91_GH0.tar.gz) = 3e5374bf20fc761425a8845f05658f3219afd025a871de181ab28b5797a4b5fd +SIZE (mitchellh-osext-0dd3f91_GH0.tar.gz) = 2787 +SHA256 (mitchellh-panicwrap-45cbfd3_GH0.tar.gz) = 20587733dbdc7623dbe0e8bec3ef0b62e39ce10fe464c6204a74153fc43edf44 +SIZE (mitchellh-panicwrap-45cbfd3_GH0.tar.gz) = 7231 +SHA256 (mitchellh-prefixedio-89d9b53_GH0.tar.gz) = 144419c3adcfe38a90fd18f2c4a156d7e1267430103301cf95363dfa8515dfda +SIZE (mitchellh-prefixedio-89d9b53_GH0.tar.gz) = 3112 +SHA256 (mitchellh-go-fs-590e633_GH0.tar.gz) = 8ac84c9f0105514cdb65a23c7032edb8d9e129ea4a36b1735e1d0fc2510ec5c1 +SIZE (mitchellh-go-fs-590e633_GH0.tar.gz) = 15621 +SHA256 (mitchellh-gophercloud-fork-40444fb-40444fb_GH0.tar.gz) = 71e6f5e3124b6287a488ff65194e7600dc7da84807e30d4243f61955e0509648 +SIZE (mitchellh-gophercloud-fork-40444fb-40444fb_GH0.tar.gz) = 36401 +SHA256 (mitchellh-goamz-52a0104_GH0.tar.gz) = ba4291e087dfb0af0c51d9e51fe7d28461c02b5014d95aa836fb61d8794b629e +SIZE (mitchellh-goamz-52a0104_GH0.tar.gz) = 128548 +SHA256 (mitchellh-multistep-162146f_GH0.tar.gz) = 286aefea1cf82cccae06577310b1b7ceb11253c66dd1c9fcee966e09ba35e99b +SIZE (mitchellh-multistep-162146f_GH0.tar.gz) = 6135 +SHA256 (mitchellh-go-vnc-6fca135_GH0.tar.gz) = 2558ffbebd66254510f4ccec6279601237451a04f0b054c020d7059f6a7c6c12 +SIZE (mitchellh-go-vnc-6fca135_GH0.tar.gz) = 7442 +SHA256 (hashicorp-atlas-go-0008374_GH0.tar.gz) = 90d68517beeb07ab44665e864b84b609626a6ad843435bbfc326daed3150c7b5 +SIZE (hashicorp-atlas-go-0008374_GH0.tar.gz) = 32262 +SHA256 (hashicorp-go-checkpoint-efefdc6_GH0.tar.gz) = 1eb29284f788079f1ce99dc4d4e3275042d81c62452b6024978a837e076c9b68 +SIZE (hashicorp-go-checkpoint-efefdc6_GH0.tar.gz) = 9732 +SHA256 (hashicorp-go-msgpack-71c2886_GH0.tar.gz) = 052a52b77e262daa6f4bb618970d6673dd77713be031c6da18bd3aff5bc1448d +SIZE (hashicorp-go-msgpack-71c2886_GH0.tar.gz) = 49479 +SHA256 (hashicorp-go-version-bb92ddd_GH0.tar.gz) = b56e9cff11ea7950d6a10cee7df7dfd3e65ad078d5fee0070f0d620449d3120d +SIZE (hashicorp-go-version-bb92ddd_GH0.tar.gz) = 10384 +SHA256 (hashicorp-yamux-9feabe6_GH0.tar.gz) = 7d38c98227d61c02f455ed2a5a01f8627f20da7b03e1869ec36bc44d95933290 +SIZE (hashicorp-yamux-9feabe6_GH0.tar.gz) = 18592 +SHA256 (golang-crypto-1fbbd62_GH0.tar.gz) = 18d28dd6700907b19fca11affe7a4f97cd02addf82539896e64c3cc2d710760e +SIZE (golang-crypto-1fbbd62_GH0.tar.gz) = 852289 +SHA256 (golang-protobuf-abd3b41_GH0.tar.gz) = 4d3d8931fb57c5738f99458e70864b3f55b8d0000f5ea206c0bef7304aedd997 +SIZE (golang-protobuf-abd3b41_GH0.tar.gz) = 127498 +SHA256 (golang-net-8aa6e20_GH0.tar.gz) = 79c20fc3801127a8f61594fe9393cc972f02668f19dbde575c5b8ac05910cf5c +SIZE (golang-net-8aa6e20_GH0.tar.gz) = 413241 +SHA256 (golang-oauth2-b3f9a68_GH0.tar.gz) = 1aeb842f5a8161858c6896b8661380fea34db90bee493615eecba759cb990dc8 +SIZE (golang-oauth2-b3f9a68_GH0.tar.gz) = 17530 +SHA256 (golang-appengine-c98f627_GH0.tar.gz) = 4dceac412388e795f9b3b40bc34c8cc3e99ed7599a3e4ebcd273e85abd6fe343 +SIZE (golang-appengine-c98f627_GH0.tar.gz) = 166119 +SHA256 (vaughan0-go-ini-a98ad7e_GH0.tar.gz) = f8daa0afa08af1fdce4747074602078c72f49fd60c7d8dc3d07b6b7e70cd5f82 +SIZE (vaughan0-go-ini-a98ad7e_GH0.tar.gz) = 3694 +SHA256 (going-toolkit-6185c18_GH0.tar.gz) = 7a04f581fabb81e4dc0b52f22f72cde642195a9276fe3e3a6d6a10a452a98e6c +SIZE (going-toolkit-6185c18_GH0.tar.gz) = 1297671 +SHA256 (racker-perigee-d281986_GH0.tar.gz) = 9764760d435329d354fd2e67114d50d7be401af20102f4b5e9d626b170f7dd54 +SIZE (racker-perigee-d281986_GH0.tar.gz) = 10403 +SHA256 (ActiveState-tail-068b729_GH0.tar.gz) = 00714c04cd2af4ef5a360cb48ac81bdba8564f79f7242e805729602a755e7410 +SIZE (ActiveState-tail-068b729_GH0.tar.gz) = 13463 +SHA256 (howeyc-fsnotify-6b1ef89_GH0.tar.gz) = bcc1841b7c7d768111b27ea5c4af8137f058b03b23407aa30f59452602efc524 +SIZE (howeyc-fsnotify-6b1ef89_GH0.tar.gz) = 19296 +SHA256 (zoutaiqi-gosshold-967f522_GH0.tar.gz) = 25592a2b7c8ac3b79c0701dc2af2786aee986799e1512e9848c415dbc4200868 +SIZE (zoutaiqi-gosshold-967f522_GH0.tar.gz) = 82109 +SHA256 (google-google-api-go-client-fa1ebc5_GH0.tar.gz) = b047f8df8ceaf14bb4533bc68180e746dccaf8b5897fccdf943437431aafeaf4 +SIZE (google-google-api-go-client-fa1ebc5_GH0.tar.gz) = 1552984 +SHA256 (GoogleCloudPlatform-gcloud-golang-eaf111a_GH0.tar.gz) = ec9524123c9c588527128c0a00f9caa07adc508debe2d8047cc9c09484e46b7f +SIZE (GoogleCloudPlatform-gcloud-golang-eaf111a_GH0.tar.gz) = 81145 +SHA256 (go-tomb-tomb-dd63297_GH0.tar.gz) = 38f8b3d8b5f4ee0d7f48f0bd8fb5dad50afc23b1612c64f10bb711e70ad22235 +SIZE (go-tomb-tomb-dd63297_GH0.tar.gz) = 3627 diff --git a/sysutils/packer/files/patch-src_github.com_mitchellh_packer_post-processor_atlas_util.go b/sysutils/packer/files/patch-src_github.com_mitchellh_packer_post-processor_atlas_util.go new file mode 100644 index 000000000000..129e7c32d80b --- /dev/null +++ b/sysutils/packer/files/patch-src_github.com_mitchellh_packer_post-processor_atlas_util.go @@ -0,0 +1,18 @@ +--- src/github.com/mitchellh/packer/post-processor/atlas/util.go.orig 2014-12-10 02:57:03 UTC ++++ src/github.com/mitchellh/packer/post-processor/atlas/util.go +@@ -13,11 +13,12 @@ import ( + func longestCommonPrefix(vs []string) string { + // Find the shortest string + var shortest string +- length := math.MaxUint32 ++ var length int64 ++ length = math.MaxUint32 + for _, v := range vs { +- if len(v) < length { ++ if int64(len(v)) < length { + shortest = v +- length = len(v) ++ length = int64(len(v)) + } + } + diff --git a/sysutils/packer/pkg-descr b/sysutils/packer/pkg-descr new file mode 100644 index 000000000000..e9322430651a --- /dev/null +++ b/sysutils/packer/pkg-descr @@ -0,0 +1,4 @@ +Packer is a tool for creating identical machine images for multiple platforms +from a single source configuration. + +WWW: http://packer.io/ diff --git a/sysutils/packer/pkg-plist b/sysutils/packer/pkg-plist new file mode 100644 index 000000000000..610ea7248df4 --- /dev/null +++ b/sysutils/packer/pkg-plist @@ -0,0 +1,33 @@ +bin/packer +bin/packer-builder-amazon-chroot +bin/packer-builder-amazon-ebs +bin/packer-builder-amazon-instance +bin/packer-builder-digitalocean +bin/packer-builder-docker +bin/packer-builder-googlecompute +bin/packer-builder-null +bin/packer-builder-openstack +bin/packer-builder-parallels-iso +bin/packer-builder-parallels-pvm +bin/packer-builder-qemu +bin/packer-builder-virtualbox-iso +bin/packer-builder-virtualbox-ovf +bin/packer-builder-vmware-iso +bin/packer-builder-vmware-vmx +bin/packer-post-processor-atlas +bin/packer-post-processor-compress +bin/packer-post-processor-docker-import +bin/packer-post-processor-docker-push +bin/packer-post-processor-docker-save +bin/packer-post-processor-docker-tag +bin/packer-post-processor-vagrant +bin/packer-post-processor-vagrant-cloud +bin/packer-post-processor-vsphere +bin/packer-provisioner-ansible-local +bin/packer-provisioner-chef-client +bin/packer-provisioner-chef-solo +bin/packer-provisioner-file +bin/packer-provisioner-puppet-masterless +bin/packer-provisioner-puppet-server +bin/packer-provisioner-salt-masterless +bin/packer-provisioner-shell |