aboutsummaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorSteve Wills <swills@FreeBSD.org>2015-05-06 17:12:45 +0000
committerSteve Wills <swills@FreeBSD.org>2015-05-06 17:12:45 +0000
commit2321fdeef7cba4dd64f0e997a49da859b396c984 (patch)
tree3383a234e24cf8d73b6b1534650160282a5e47aa /sysutils
parent03d312621237041f6f36bec7ba04efc07709795c (diff)
downloadports-2321fdeef7cba4dd64f0e997a49da859b396c984.tar.gz
ports-2321fdeef7cba4dd64f0e997a49da859b396c984.zip
Notes
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/Makefile1
-rw-r--r--sysutils/serf/Makefile102
-rw-r--r--sysutils/serf/distinfo26
-rw-r--r--sysutils/serf/files/patch-deps_v0-6-4.json67
-rw-r--r--sysutils/serf/files/serf.in46
-rw-r--r--sysutils/serf/pkg-descr4
6 files changed, 246 insertions, 0 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile
index 70bd445d3852..4f480893e005 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -885,6 +885,7 @@
SUBDIR += searchmonkey
SUBDIR += seatools
SUBDIR += sec
+ SUBDIR += serf
SUBDIR += setcdboot
SUBDIR += setquota
SUBDIR += sformat
diff --git a/sysutils/serf/Makefile b/sysutils/serf/Makefile
new file mode 100644
index 000000000000..25c232b20583
--- /dev/null
+++ b/sysutils/serf/Makefile
@@ -0,0 +1,102 @@
+# $FreeBSD$
+
+PORTNAME= serf
+PORTVERSION= 0.6.4
+CATEGORIES= sysutils
+MASTER_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/archive/${GH_TAGNAME}.tar.gz?dummy=/:group1 \
+ https://github.com/armon/circbuf/archive/f092b4f207b6e5cce0569056fba9e1a2735cb6cf.tar.gz?dummy=/:group2 \
+ https://github.com/armon/go-metrics/archive/eb0af217e5e9747e41dd5303755356b62d28e3ec.tar.gz?dummy=/:group3 \
+ https://github.com/hashicorp/go-msgpack/archive/71c2886f5a673a35f909803f38ece5810165097b.tar.gz?dummy=/:group4 \
+ https://github.com/hashicorp/go-syslog/archive/ac3963b72ac367e48b1e68a831e62b93fb69091c.tar.gz?dummy=/:group5 \
+ https://github.com/hashicorp/logutils/archive/23b0af5510a2d1442103ef83ffcf53eb82f3debc.tar.gz?dummy=/:group6 \
+ https://github.com/hashicorp/memberlist/archive/9a1e242e454d2443df330bdd51a436d5a9058fc4.tar.gz?dummy=/:group7 \
+ https://github.com/mitchellh/mapstructure/archive/442e588f213303bec7936deba67901f8fc8f18b1.tar.gz?dummy=/:group8 \
+ https://github.com/hashicorp/mdns/archive/eb98accb64ea232136b5344464ed1d66d40f6196.tar.gz?dummy=/:group9 \
+ https://github.com/mitchellh/cli/archive/e3c2e3d39391e9beb9660ccd6b4bd9a2f38dd8a0.tar.gz?dummy=/:group10 \
+ https://github.com/ryanuber/columnize/archive/44cb4788b2ec3c3d158dd3d1b50aba7d66f4b59a.tar.gz?dummy=/:group11 \
+ https://github.com/miekg/dns/archive/b65f52f3f0dd1afa25cbbf63f8e7eb15fb5c0641.tar.gz?dummy=/:group12 \
+ https://github.com/hashicorp/go.net/archive/cbad13bf000d0cbdbc71506b26e94bcc72bbe74d.tar.gz?dummy=/:group13
+PKGNAMEPREFIX= hashicorp-
+DISTFILES= ${PORTNAME}-${PORTVERSION}.tar.gz:group1 \
+ armon_circbuf_f092b4f207b6e5cce0569056fba9e1a2735cb6cf.tar.gz:group2 \
+ armon_go-metrics_eb0af217e5e9747e41dd5303755356b62d28e3ec.tar.gz:group3 \
+ hashicorp_go-msgpack_71c2886f5a673a35f909803f38ece5810165097b.tar.gz:group4 \
+ hashicorp_go-syslog_ac3963b72ac367e48b1e68a831e62b93fb69091c.tar.gz:group5 \
+ hashicorp_logutils_23b0af5510a2d1442103ef83ffcf53eb82f3debc.tar.gz:group6 \
+ hashicorp_memberlist_9a1e242e454d2443df330bdd51a436d5a9058fc4.tar.gz:group7 \
+ mitchellh_mapstructure_442e588f213303bec7936deba67901f8fc8f18b1.tar.gz:group8 \
+ hashicorp_mdns_eb98accb64ea232136b5344464ed1d66d40f6196.tar.gz:group9 \
+ mitchellh_cli_e3c2e3d39391e9beb9660ccd6b4bd9a2f38dd8a0.tar.gz:group10 \
+ ryanuber_columnize_44cb4788b2ec3c3d158dd3d1b50aba7d66f4b59a.tar.gz:group11 \
+ miekg_dns_b65f52f3f0dd1afa25cbbf63f8e7eb15fb5c0641.tar.gz:group12 \
+ hashicorp_go.net_cbad13bf000d0cbdbc71506b26e94bcc72bbe74d.tar.gz:group13
+
+MAINTAINER= swills@FreeBSD.org
+COMMENT= Service discovery and configuration made easy
+
+LICENSE= MPL
+
+BUILD_DEPENDS= ${LOCALBASE}/bin/go:${PORTSDIR}/lang/go
+
+USE_GITHUB= yes
+GH_ACCOUNT= hashicorp
+GH_TAGNAME= v${PORTVERSION}
+
+WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
+
+USE_RC_SUBR= serf
+
+USERS= serf
+GROUPS= serf
+
+PLIST_FILES= bin/serf
+
+STRIP= # stripping can break go binaries
+
+post-patch:
+ @${MKDIR} ${WRKSRC}/src/github.com/${GH_ACCOUNT}/${PORTNAME}
+.for src in .gitignore .travis.yml CHANGELOG.md LICENSE Makefile README.md \
+ client command commands.go demo deps main.go main_test.go ops-misc \
+ scripts serf testutil version.go website
+ @${MV} ${WRKSRC}/${src} \
+ ${WRKSRC}/src/github.com/hashicorp/${PORTNAME}
+.endfor
+ @${MKDIR} ${WRKSRC}/src/github.com/armon
+ @${MKDIR} ${WRKSRC}/src/github.com/mitchellh
+ @${MKDIR} ${WRKSRC}/src/github.com/miekg
+ @${MKDIR} ${WRKSRC}/src/github.com/ryanuber
+ @${MKDIR} ${WRKSRC}/src/code.google.com/p/go.net
+ @${MV} ${WRKDIR}/circbuf-f092b4f207b6e5cce0569056fba9e1a2735cb6cf \
+ ${WRKSRC}/src/github.com/armon/circbuf
+ @${MV} ${WRKDIR}/go-metrics-eb0af217e5e9747e41dd5303755356b62d28e3ec \
+ ${WRKSRC}/src/github.com/armon/go-metrics
+ @${MV} ${WRKDIR}/go-msgpack-71c2886f5a673a35f909803f38ece5810165097b \
+ ${WRKSRC}/src/github.com/hashicorp/go-msgpack
+ @${MV} ${WRKDIR}/go-syslog-ac3963b72ac367e48b1e68a831e62b93fb69091c \
+ ${WRKSRC}/src/github.com/hashicorp/go-syslog
+ @${MV} ${WRKDIR}/logutils-23b0af5510a2d1442103ef83ffcf53eb82f3debc \
+ ${WRKSRC}/src/github.com/hashicorp/logutils
+ @${MV} ${WRKDIR}/memberlist-9a1e242e454d2443df330bdd51a436d5a9058fc4 \
+ ${WRKSRC}/src/github.com/hashicorp/memberlist
+ @${MV} ${WRKDIR}/mapstructure-442e588f213303bec7936deba67901f8fc8f18b1 \
+ ${WRKSRC}/src/github.com/mitchellh/mapstructure
+ @${MV} ${WRKDIR}/mdns-eb98accb64ea232136b5344464ed1d66d40f6196 \
+ ${WRKSRC}/src/github.com/hashicorp/mdns
+ @${MV} ${WRKDIR}/cli-e3c2e3d39391e9beb9660ccd6b4bd9a2f38dd8a0 \
+ ${WRKSRC}/src/github.com/mitchellh/cli
+ @${MV} ${WRKDIR}/columnize-44cb4788b2ec3c3d158dd3d1b50aba7d66f4b59a \
+ ${WRKSRC}/src/github.com/ryanuber/columnize
+ @${MV} ${WRKDIR}/dns-b65f52f3f0dd1afa25cbbf63f8e7eb15fb5c0641 \
+ ${WRKSRC}/src/github.com/miekg/dns
+ @${MV} ${WRKDIR}/go.net-cbad13bf000d0cbdbc71506b26e94bcc72bbe74d \
+ ${WRKSRC}/src/github.com/hashicorp/go.net
+ @${CP} -r ${WRKSRC}/src/github.com/hashicorp/go.net/internal \
+ ${WRKSRC}/src/code.google.com/p/go.net
+
+do-build:
+ @cd ${WRKSRC}/src/github.com/${GH_ACCOUNT}/${PORTNAME}; ${SETENV} ${BUILD_ENV} GOPATH=${WRKSRC} go build -o bin/${PORTNAME}
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/src/github.com/${GH_ACCOUNT}/${PORTNAME}/bin/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
+
+.include <bsd.port.mk>
diff --git a/sysutils/serf/distinfo b/sysutils/serf/distinfo
new file mode 100644
index 000000000000..72bbe9e0f33e
--- /dev/null
+++ b/sysutils/serf/distinfo
@@ -0,0 +1,26 @@
+SHA256 (serf-0.6.4.tar.gz) = 452540c9a475b45cacb4a883108f41aab3198b8e9b41ba0ba957325c1d1fded8
+SIZE (serf-0.6.4.tar.gz) = 571489
+SHA256 (armon_circbuf_f092b4f207b6e5cce0569056fba9e1a2735cb6cf.tar.gz) = b67d2ffc0a725b6844895680d52ba4a63757987637c8dabbb2c3e4d836512d52
+SIZE (armon_circbuf_f092b4f207b6e5cce0569056fba9e1a2735cb6cf.tar.gz) = 2748
+SHA256 (armon_go-metrics_eb0af217e5e9747e41dd5303755356b62d28e3ec.tar.gz) = fd94820df854d11839891e6d7e8b63e816061d33f8bf45349486ef73482190db
+SIZE (armon_go-metrics_eb0af217e5e9747e41dd5303755356b62d28e3ec.tar.gz) = 10476
+SHA256 (hashicorp_go-msgpack_71c2886f5a673a35f909803f38ece5810165097b.tar.gz) = c32b90e67762a375981b38154cae65222bb1aaa7722727d0225d5f8de773e4c8
+SIZE (hashicorp_go-msgpack_71c2886f5a673a35f909803f38ece5810165097b.tar.gz) = 49485
+SHA256 (hashicorp_go-syslog_ac3963b72ac367e48b1e68a831e62b93fb69091c.tar.gz) = 089a6bda3f17d3a4c0545325581da29572d522a934fa601ff872709d1f2a7304
+SIZE (hashicorp_go-syslog_ac3963b72ac367e48b1e68a831e62b93fb69091c.tar.gz) = 4389
+SHA256 (hashicorp_logutils_23b0af5510a2d1442103ef83ffcf53eb82f3debc.tar.gz) = d07a719321f39c5095f7922888cd798c78bf0268499562de8de3fa30acd8cbb2
+SIZE (hashicorp_logutils_23b0af5510a2d1442103ef83ffcf53eb82f3debc.tar.gz) = 7686
+SHA256 (hashicorp_memberlist_9a1e242e454d2443df330bdd51a436d5a9058fc4.tar.gz) = 5ea2bb19997bce12b1d67a19611535233a76f84714ec8ecf5efb7e7f2faee5d8
+SIZE (hashicorp_memberlist_9a1e242e454d2443df330bdd51a436d5a9058fc4.tar.gz) = 49719
+SHA256 (mitchellh_mapstructure_442e588f213303bec7936deba67901f8fc8f18b1.tar.gz) = b4fa5d3b888734f849c5d6784fc1c5749e4ece168fda65c604676fca39c085d2
+SIZE (mitchellh_mapstructure_442e588f213303bec7936deba67901f8fc8f18b1.tar.gz) = 12220
+SHA256 (hashicorp_mdns_eb98accb64ea232136b5344464ed1d66d40f6196.tar.gz) = ec4752c85366184a3a2f02c3338540a16a6a8a6fd45f423a5c34e2dd5b11f87e
+SIZE (hashicorp_mdns_eb98accb64ea232136b5344464ed1d66d40f6196.tar.gz) = 10635
+SHA256 (mitchellh_cli_e3c2e3d39391e9beb9660ccd6b4bd9a2f38dd8a0.tar.gz) = 0a05aa6d4a4968c00689e6b28575140c3832812bfffe4e909ecbf05e7b7bce8a
+SIZE (mitchellh_cli_e3c2e3d39391e9beb9660ccd6b4bd9a2f38dd8a0.tar.gz) = 12189
+SHA256 (ryanuber_columnize_44cb4788b2ec3c3d158dd3d1b50aba7d66f4b59a.tar.gz) = 504519c9befbac3045a00a7a70e82cc437622294ece6ac19b85ffd4aa915369f
+SIZE (ryanuber_columnize_44cb4788b2ec3c3d158dd3d1b50aba7d66f4b59a.tar.gz) = 3680
+SHA256 (miekg_dns_b65f52f3f0dd1afa25cbbf63f8e7eb15fb5c0641.tar.gz) = e0ab641bcdc92fbba5f18e707f8e49e95a870eb8a69d9bb3171089a3a78a5eac
+SIZE (miekg_dns_b65f52f3f0dd1afa25cbbf63f8e7eb15fb5c0641.tar.gz) = 112698
+SHA256 (hashicorp_go.net_cbad13bf000d0cbdbc71506b26e94bcc72bbe74d.tar.gz) = f9ef1dd4099cda25b55fc50337bd2240a7a1e78ef4d7ca0c99eb3bf99f0cdee8
+SIZE (hashicorp_go.net_cbad13bf000d0cbdbc71506b26e94bcc72bbe74d.tar.gz) = 394297
diff --git a/sysutils/serf/files/patch-deps_v0-6-4.json b/sysutils/serf/files/patch-deps_v0-6-4.json
new file mode 100644
index 000000000000..58a51512f6dc
--- /dev/null
+++ b/sysutils/serf/files/patch-deps_v0-6-4.json
@@ -0,0 +1,67 @@
+--- deps/v0-6-4.json.orig 2015-04-26 02:07:13.280072000 +0000
++++ deps/v0-6-4.json 2015-04-26 02:07:13.280625000 +0000
+@@ -0,0 +1,64 @@
++{
++ "ImportPath": "github.com/hashicorp/serf",
++ "GoVersion": "go1.4.1",
++ "Deps": [
++ {
++ "ImportPath": "code.google.com/p/go.net/internal/iana",
++ "Comment": "null-240",
++ "Rev": "937a34c9de13c766c814510f76bca091dee06028"
++ },
++ {
++ "ImportPath": "github.com/armon/circbuf",
++ "Rev": "f092b4f207b6e5cce0569056fba9e1a2735cb6cf"
++ },
++ {
++ "ImportPath": "github.com/armon/go-metrics",
++ "Rev": "eb0af217e5e9747e41dd5303755356b62d28e3ec"
++ },
++ {
++ "ImportPath": "github.com/hashicorp/go-msgpack/codec",
++ "Rev": "71c2886f5a673a35f909803f38ece5810165097b"
++ },
++ {
++ "ImportPath": "github.com/hashicorp/go-syslog",
++ "Rev": "ac3963b72ac367e48b1e68a831e62b93fb69091c"
++ },
++ {
++ "ImportPath": "github.com/hashicorp/go.net/ipv4",
++ "Rev": "cbad13bf000d0cbdbc71506b26e94bcc72bbe74d"
++ },
++ {
++ "ImportPath": "github.com/hashicorp/go.net/ipv6",
++ "Rev": "cbad13bf000d0cbdbc71506b26e94bcc72bbe74d"
++ },
++ {
++ "ImportPath": "github.com/hashicorp/logutils",
++ "Rev": "23b0af5510a2d1442103ef83ffcf53eb82f3debc"
++ },
++ {
++ "ImportPath": "github.com/hashicorp/mdns",
++ "Rev": "eb98accb64ea232136b5344464ed1d66d40f6196"
++ },
++ {
++ "ImportPath": "github.com/hashicorp/memberlist",
++ "Rev": "9a1e242e454d2443df330bdd51a436d5a9058fc4"
++ },
++ {
++ "ImportPath": "github.com/miekg/dns",
++ "Rev": "b65f52f3f0dd1afa25cbbf63f8e7eb15fb5c0641"
++ },
++ {
++ "ImportPath": "github.com/mitchellh/cli",
++ "Rev": "e3c2e3d39391e9beb9660ccd6b4bd9a2f38dd8a0"
++ },
++ {
++ "ImportPath": "github.com/mitchellh/mapstructure",
++ "Rev": "442e588f213303bec7936deba67901f8fc8f18b1"
++ },
++ {
++ "ImportPath": "github.com/ryanuber/columnize",
++ "Comment": "v2.0.1-6-g44cb478",
++ "Rev": "44cb4788b2ec3c3d158dd3d1b50aba7d66f4b59a"
++ }
++ ]
++}
diff --git a/sysutils/serf/files/serf.in b/sysutils/serf/files/serf.in
new file mode 100644
index 000000000000..b38950b92b07
--- /dev/null
+++ b/sysutils/serf/files/serf.in
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+# $FreeBSD$
+#
+# PROVIDE: serf
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# serf_enable (bool): Set to NO by default.
+# Set it to YES to enable serf.
+# serf_user (user): Set user to run serf.
+# Default is "serf".
+# serf_group (group): Set group to run serf.
+# Default is "serf".
+
+. /etc/rc.subr
+
+name=serf
+rcvar=serf_enable
+
+load_rc_config $name
+
+: ${serf_enable:="NO"}
+: ${serf_user:="serf"}
+: ${serf_group:="serf"}
+: ${serf_dir:="/var/tmp/serf"}
+
+pidfile=/var/run/serf.pid
+procname="%%PREFIX%%/bin/serf"
+command="/usr/sbin/daemon"
+command_args="agent"
+command_args="-f -p ${pidfile} ${procname} agent ${serf_args}"
+
+start_precmd=serf_startprecmd
+
+serf_startprecmd()
+{
+ if [ ! -e ${pidfile} ]; then
+ install -o ${serf_user} -g ${serf_group} /dev/null ${pidfile};
+ fi
+}
+
+run_rc_command "$1"
diff --git a/sysutils/serf/pkg-descr b/sysutils/serf/pkg-descr
new file mode 100644
index 000000000000..e5630d30990b
--- /dev/null
+++ b/sysutils/serf/pkg-descr
@@ -0,0 +1,4 @@
+Serf is a decentralized solution for service discovery and orchestration that
+is lightweight, highly available, and fault tolerant.
+
+WWW: https://serfdom.io/