diff options
author | swills <swills@FreeBSD.org> | 2017-01-04 12:36:53 +0800 |
---|---|---|
committer | swills <swills@FreeBSD.org> | 2017-01-04 12:36:53 +0800 |
commit | ebeced6772e5442c58010e4f37427c2a29b08ad0 (patch) | |
tree | e737caf810ffe03330deeb18b8098f582e526fe7 /net-mgmt | |
parent | 098e87e9099372c5097bdeb97614b6b575523e7b (diff) | |
download | freebsd-ports-gnome-ebeced6772e5442c58010e4f37427c2a29b08ad0.tar.gz freebsd-ports-gnome-ebeced6772e5442c58010e4f37427c2a29b08ad0.tar.zst freebsd-ports-gnome-ebeced6772e5442c58010e4f37427c2a29b08ad0.zip |
devel/rubygem-oxidized: create port
Oxidized is a network device configuration backup tool. It's a RANCID
replacement.
WWW: https://github.com/ytti/oxidized
PR: 203374
Submitted by: Nick Hilliard <nick@foobar.org> (with modifications)
Diffstat (limited to 'net-mgmt')
-rw-r--r-- | net-mgmt/Makefile | 1 | ||||
-rw-r--r-- | net-mgmt/rubygem-oxidized/Makefile | 35 | ||||
-rw-r--r-- | net-mgmt/rubygem-oxidized/distinfo | 3 | ||||
-rw-r--r-- | net-mgmt/rubygem-oxidized/files/oxidized.in | 61 | ||||
-rw-r--r-- | net-mgmt/rubygem-oxidized/files/patch-gemspec | 11 | ||||
-rw-r--r-- | net-mgmt/rubygem-oxidized/pkg-descr | 4 |
6 files changed, 115 insertions, 0 deletions
diff --git a/net-mgmt/Makefile b/net-mgmt/Makefile index a72fd26cd808..c6f1c0bd79b0 100644 --- a/net-mgmt/Makefile +++ b/net-mgmt/Makefile @@ -299,6 +299,7 @@ SUBDIR += routers2-extras SUBDIR += rrdbot SUBDIR += rubygem-blimpy + SUBDIR += rubygem-oxidized SUBDIR += rubygem-snmp SUBDIR += rubygem-visage-app SUBDIR += sblim-wbemcli diff --git a/net-mgmt/rubygem-oxidized/Makefile b/net-mgmt/rubygem-oxidized/Makefile new file mode 100644 index 000000000000..d9ed5addf026 --- /dev/null +++ b/net-mgmt/rubygem-oxidized/Makefile @@ -0,0 +1,35 @@ +# Created by: Nick Hilliard <nick@foobar.org> +# $FreeBSD$ + +PORTNAME= oxidized +PORTVERSION= 0.19.0 +CATEGORIES= net-mgmt rubygems +MASTER_SITES= RG + +MAINTAINER= nick@foobar.org +COMMENT= Network device configuration backup tool + +LICENSE= APACHE20 + +RUN_DEPENDS= rubygem-asetus>=0.1:devel/rubygem-asetus \ + rubygem-net-ssh>=3.0.2:security/rubygem-net-ssh \ + rubygem-net-telnet>=0:security/rubygem-net-telnet \ + rubygem-rugged>=0.21.4:devel/rubygem-rugged \ + rubygem-slop3>=3.5:devel/rubygem-slop3 + +NO_ARCH= yes + +USE_RC_SUBR= oxidized + +USE_RUBY= yes +USES= gem + +USERS= oxidized +GROUPS= oxidized + +SUB_LIST= PREFIX=${PREFIX} \ + RUBY=${RUBY} + +PLIST_FILES= bin/oxidized + +.include <bsd.port.mk> diff --git a/net-mgmt/rubygem-oxidized/distinfo b/net-mgmt/rubygem-oxidized/distinfo new file mode 100644 index 000000000000..a8a9e5479f8b --- /dev/null +++ b/net-mgmt/rubygem-oxidized/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1483497492 +SHA256 (rubygem/oxidized-0.19.0.gem) = d91d77adc582452198093eeca30bf1a78026edbd6e5197b5906fa4501fc68637 +SIZE (rubygem/oxidized-0.19.0.gem) = 59392 diff --git a/net-mgmt/rubygem-oxidized/files/oxidized.in b/net-mgmt/rubygem-oxidized/files/oxidized.in new file mode 100644 index 000000000000..d56dcfca0558 --- /dev/null +++ b/net-mgmt/rubygem-oxidized/files/oxidized.in @@ -0,0 +1,61 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: oxidized +# REQUIRE: LOGIN +# KEYWORD: shutdown + +# +# Configuration settings for oxidized in /etc/rc.conf: +# +# oxidized_enable (bool): +# Set to "NO" by default. +# Set it to "YES" to enable oxidized +# +# oxidized_args (str): +# Extra arguments passed to start command +# +# oxidized_home (str) +# Set to "/var/db/oxidized" by default. +# Set the OXIDIZED_HOME variable for oxidized process +# +# oxidized_user (str): +# Set to "oxidized" by default. +# User to run oxidized as. +# +# oxidized_group (str): +# Set to "oxidized" by default. +# Group for data file ownership. +# + +. /etc/rc.subr + +name="oxidized" +rcvar=oxidized_enable + +load_rc_config "${name}" + +: ${oxidized_enable="NO"} +: ${oxidized_home="/var/db/oxidized"} +: ${oxidized_args=""} +: ${oxidized_user="oxidized"} +: ${oxidized_group="oxidized"} + +piddir="/var/run/${name}" +pidfile="${piddir}/${name}.pid" +procname=%%RUBY%% +command="/usr/sbin/daemon" +command_args="-f -p ${pidfile} %%PREFIX%%/bin/oxidized ${oxidized_args}" + +export HOME=${oxidized_home} + +start_precmd="oxidized_prestart" + +oxidized_prestart() { + if [ ! -d ${piddir} ]; then + install -d -o "${oxidized_user}" -g "${oxidized_group}" -m 750 ${piddir} + fi +} + +run_rc_command "$1" diff --git a/net-mgmt/rubygem-oxidized/files/patch-gemspec b/net-mgmt/rubygem-oxidized/files/patch-gemspec new file mode 100644 index 000000000000..6ec78bf01306 --- /dev/null +++ b/net-mgmt/rubygem-oxidized/files/patch-gemspec @@ -0,0 +1,11 @@ +--- oxidized.gemspec.orig 2017-01-03 21:39:05.804207000 -0500 ++++ oxidized.gemspec 2017-01-03 21:39:19.635551000 -0500 +@@ -26,7 +26,7 @@ + if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then + s.add_runtime_dependency(%q<asetus>.freeze, ["~> 0.1"]) + s.add_runtime_dependency(%q<slop>.freeze, ["~> 3.5"]) +- s.add_runtime_dependency(%q<net-ssh>.freeze, ["~> 3.0.2"]) ++ s.add_runtime_dependency(%q<net-ssh>.freeze, [">= 3.0.2"]) + s.add_runtime_dependency(%q<rugged>.freeze, [">= 0.21.4", "~> 0.21"]) + s.add_runtime_dependency(%q<net-telnet>.freeze, [">= 0"]) + s.add_development_dependency(%q<pry>.freeze, ["~> 0"]) diff --git a/net-mgmt/rubygem-oxidized/pkg-descr b/net-mgmt/rubygem-oxidized/pkg-descr new file mode 100644 index 000000000000..ad97da91ed9f --- /dev/null +++ b/net-mgmt/rubygem-oxidized/pkg-descr @@ -0,0 +1,4 @@ +Oxidized is a network device configuration backup tool. It's a RANCID +replacement. + +WWW: https://github.com/ytti/oxidized |