forked from Lainports/freebsd-ports
New port databases/puppetdb5
Copy databases/puppetdb4 to databases/puppetdb5 and update.
While here:
- Update/fix conflicts with databases/puppetdb[34];
- Remove broken indirect dependency in databases/puppetdb3 (no need to
rebuild, so not bumping PORTREVISION).
With hat: puppet
This commit is contained in:
parent
2c2eff30c6
commit
6fee691502
16 changed files with 309 additions and 4 deletions
|
|
@ -738,6 +738,7 @@
|
|||
SUBDIR += puppetdb-terminus4
|
||||
SUBDIR += puppetdb3
|
||||
SUBDIR += puppetdb4
|
||||
SUBDIR += puppetdb5
|
||||
SUBDIR += pure-sql3
|
||||
SUBDIR += puredb
|
||||
SUBDIR += pxlib
|
||||
|
|
|
|||
|
|
@ -13,12 +13,11 @@ LICENSE= APACHE20
|
|||
|
||||
RUN_DEPENDS= bash:shells/bash \
|
||||
puppet:sysutils/puppet4
|
||||
BUILD_DEPENDS= rubygem-facter>=0:sysutils/rubygem-facter \
|
||||
rubygem-rake>=0:devel/rubygem-rake
|
||||
BUILD_DEPENDS= rubygem-rake>=0:devel/rubygem-rake
|
||||
|
||||
USE_RC_SUBR= puppetdb
|
||||
|
||||
CONFLICTS_INSTALL= puppetdb-* puppetdb4-*
|
||||
CONFLICTS_INSTALL= puppetdb4-* puppetdb5-*
|
||||
USE_JAVA= yes
|
||||
NO_BUILD= yes
|
||||
JAVA_VERSION= 1.7+
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ RUN_DEPENDS= bash:shells/bash \
|
|||
|
||||
USE_RC_SUBR= puppetdb
|
||||
|
||||
CONFLICTS_INSTALL= puppetdb-* puppetdb3-*
|
||||
CONFLICTS_INSTALL= puppetdb3-* puppetdb5-*
|
||||
USES= shebangfix
|
||||
SHEBANG_FILES= ext/bin/puppetdb \
|
||||
ext/cli/anonymize \
|
||||
|
|
|
|||
53
databases/puppetdb5/Makefile
Normal file
53
databases/puppetdb5/Makefile
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
# $FreeBSD$
|
||||
|
||||
PORTNAME= puppetdb
|
||||
PORTVERSION= 5.0.1
|
||||
CATEGORIES= databases java
|
||||
MASTER_SITES= http://downloads.puppetlabs.com/puppetdb/
|
||||
PKGNAMESUFFIX= 5
|
||||
|
||||
MAINTAINER= puppet@FreeBSD.org
|
||||
COMMENT= PuppetDB storeconfigs backend
|
||||
|
||||
LICENSE= APACHE20
|
||||
|
||||
RUN_DEPENDS= bash:shells/bash \
|
||||
puppet:sysutils/puppet5
|
||||
|
||||
USE_RC_SUBR= puppetdb
|
||||
|
||||
CONFLICTS_INSTALL= puppetdb3-* puppetdb4-*
|
||||
USES= shebangfix
|
||||
SHEBANG_FILES= ext/bin/puppetdb \
|
||||
ext/cli/anonymize \
|
||||
ext/cli/config-migration \
|
||||
ext/cli/foreground \
|
||||
ext/cli/ssl-setup \
|
||||
ext/cli/start \
|
||||
ext/cli/stop \
|
||||
ext/cli/reload \
|
||||
ext/ezbake-functions.sh
|
||||
USE_JAVA= yes
|
||||
NO_ARCH= yes
|
||||
NO_BUILD= yes
|
||||
JAVA_VERSION= 1.7+
|
||||
|
||||
USERS= puppetdb
|
||||
GROUPS= puppetdb
|
||||
|
||||
SUB_LIST= JAVA_HOME=${JAVA_HOME}
|
||||
SUB_FILES= pkg-message
|
||||
|
||||
PKGMESSAGE= ${WRKDIR}/pkg-message
|
||||
|
||||
post-patch:
|
||||
.for file in Makefile ext/bin/puppetdb ext/cli/ssl-setup \
|
||||
ext/config/conf.d/jetty.ini ext/config/conf.d/config.ini
|
||||
@${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|" ${WRKSRC}/${file}
|
||||
.endfor
|
||||
@${REINPLACE_CMD} -e "s|%%DATADIR%%|${DATADIR}|" ${WRKSRC}/ext/bin/puppetdb
|
||||
|
||||
do-install:
|
||||
@cd ${WRKSRC} && ${SETENV} DESTDIR=${STAGEDIR} make install-puppetdb
|
||||
|
||||
.include <bsd.port.mk>
|
||||
3
databases/puppetdb5/distinfo
Normal file
3
databases/puppetdb5/distinfo
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
TIMESTAMP = 1499445330
|
||||
SHA256 (puppetdb-5.0.1.tar.gz) = ac75c40c16ecfd14a64c3122811adcceaa2f32c1874e07c763ad0b1ec7338a27
|
||||
SIZE (puppetdb-5.0.1.tar.gz) = 24055687
|
||||
37
databases/puppetdb5/files/patch-Makefile
Normal file
37
databases/puppetdb5/files/patch-Makefile
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
--- Makefile.orig
|
||||
+++ Makefile
|
||||
@@ -1,23 +1,23 @@
|
||||
-prefix = /usr/local
|
||||
+prefix = %%PREFIX%%
|
||||
datadir = $(prefix)/share
|
||||
-confdir = /etc
|
||||
+confdir = %%PREFIX%%/etc
|
||||
rubylibdir = $(shell ruby -rrbconfig -e "puts RbConfig::CONFIG['sitelibdir']")
|
||||
rundir = /var/run
|
||||
-bindir = /usr/bin
|
||||
+bindir = %%PREFIX%%/bin
|
||||
|
||||
install-puppetdb:
|
||||
install -d -m 0755 "$(DESTDIR)$(datadir)/puppetdb"
|
||||
install -m 0644 puppetdb.jar "$(DESTDIR)$(datadir)/puppetdb"
|
||||
install -m 0774 ext/ezbake-functions.sh "$(DESTDIR)$(datadir)/puppetdb"
|
||||
install -m 0644 ext/ezbake.manifest "$(DESTDIR)$(datadir)/puppetdb"
|
||||
- install -d -m 0755 "$(DESTDIR)$(confdir)/puppetlabs/puppetdb/conf.d"
|
||||
- install -m 0644 ext/config/bootstrap.cfg "$(DESTDIR)$(confdir)/puppetlabs/puppetdb/bootstrap.cfg"
|
||||
- install -m 0644 ext/config/conf.d/config.ini "$(DESTDIR)$(confdir)/puppetlabs/puppetdb/conf.d/config.ini"
|
||||
- install -m 0644 ext/config/conf.d/database.ini "$(DESTDIR)$(confdir)/puppetlabs/puppetdb/conf.d/database.ini"
|
||||
- install -m 0644 ext/config/conf.d/jetty.ini "$(DESTDIR)$(confdir)/puppetlabs/puppetdb/conf.d/jetty.ini"
|
||||
- install -m 0644 ext/config/conf.d/repl.ini "$(DESTDIR)$(confdir)/puppetlabs/puppetdb/conf.d/repl.ini"
|
||||
- install -m 0644 ext/config/logback.xml "$(DESTDIR)$(confdir)/puppetlabs/puppetdb/logback.xml"
|
||||
- install -m 0644 ext/config/request-logging.xml "$(DESTDIR)$(confdir)/puppetlabs/puppetdb/request-logging.xml"
|
||||
+ install -d -m 0755 "$(DESTDIR)$(confdir)/puppetdb/conf.d"
|
||||
+ install -m 0644 ext/config/bootstrap.cfg "$(DESTDIR)$(confdir)/puppetdb/bootstrap.cfg.sample"
|
||||
+ install -m 0644 ext/config/conf.d/config.ini "$(DESTDIR)$(confdir)/puppetdb/conf.d/config.ini.sample"
|
||||
+ install -m 0644 ext/config/conf.d/database.ini "$(DESTDIR)$(confdir)/puppetdb/conf.d/database.ini.sample"
|
||||
+ install -m 0644 ext/config/conf.d/jetty.ini "$(DESTDIR)$(confdir)/puppetdb/conf.d/jetty.ini.sample"
|
||||
+ install -m 0644 ext/config/conf.d/repl.ini "$(DESTDIR)$(confdir)/puppetdb/conf.d/repl.ini.sample"
|
||||
+ install -m 0644 ext/config/logback.xml "$(DESTDIR)$(confdir)/puppetdb/logback.xml.sample"
|
||||
+ install -m 0644 ext/config/request-logging.xml "$(DESTDIR)$(confdir)/puppetdb/request-logging.xml.sample"
|
||||
install -d -m 0755 "$(DESTDIR)$(datadir)/puppetdb/cli"
|
||||
install -d -m 0755 "$(DESTDIR)$(datadir)/puppetdb/cli/apps"
|
||||
install -d -m 0755 "$(DESTDIR)$(bindir)"
|
||||
15
databases/puppetdb5/files/patch-ext_bin_puppetdb
Normal file
15
databases/puppetdb5/files/patch-ext_bin_puppetdb
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
--- ext/bin/puppetdb.orig 2016-03-17 04:17:10 UTC
|
||||
+++ ext/bin/puppetdb
|
||||
@@ -5,6 +5,12 @@ if [ -r "/etc/default/puppetdb" ] ; then
|
||||
. /etc/default/puppetdb
|
||||
elif [ -r "/etc/sysconfig/puppetdb" ] ; then
|
||||
. /etc/sysconfig/puppetdb
|
||||
+elif [ `uname` == "FreeBSD" ] ; then
|
||||
+ CONFIG="%%PREFIX%%/etc/puppetdb/conf.d"
|
||||
+ INSTALL_DIR="%%DATADIR%%"
|
||||
+ JAVA_BIN="%%PREFIX%%/bin/java"
|
||||
+ JAVA_ARGS="-Xmx192m"
|
||||
+ USER="puppet"
|
||||
elif [ `uname` == "OpenBSD" ] ; then
|
||||
JAVA_BIN=$(javaPathHelper -c puppetdb)
|
||||
JAVA_ARGS="-Xmx192m"
|
||||
11
databases/puppetdb5/files/patch-ext_cli_ssl-setup
Normal file
11
databases/puppetdb5/files/patch-ext_cli_ssl-setup
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
--- ext/cli/ssl-setup.orig 2016-03-17 04:17:10 UTC
|
||||
+++ ext/cli/ssl-setup
|
||||
@@ -230,7 +230,7 @@ else
|
||||
user=puppetdb
|
||||
group=puppetdb
|
||||
|
||||
- puppetdb_confdir="/etc/puppetlabs/puppetdb"
|
||||
+ puppetdb_confdir="%%PREFIX%%/etc/puppetdb"
|
||||
fi
|
||||
|
||||
set -e
|
||||
15
databases/puppetdb5/files/patch-ext_config_conf.d_config.ini
Normal file
15
databases/puppetdb5/files/patch-ext_config_conf.d_config.ini
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
--- ext/config/conf.d/config.ini.orig 2016-03-17 04:17:06 UTC
|
||||
+++ ext/config/conf.d/config.ini
|
||||
@@ -3,10 +3,10 @@
|
||||
|
||||
[global]
|
||||
# Store mq/db data in a custom directory
|
||||
-vardir = /opt/puppetlabs/server/data/puppetdb
|
||||
+vardir = /var/db/puppetdb
|
||||
|
||||
# Use an external logback config file
|
||||
-logging-config = /etc/puppetlabs/puppetdb/logback.xml
|
||||
+logging-config = %%PREFIX%%/etc/puppetdb/logback.xml
|
||||
|
||||
[command-processing]
|
||||
# How many command-processing threads to use, defaults to (CPUs / 2)
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
--- ext/config/conf.d/jetty.ini.orig 2016-03-17 04:17:06 UTC
|
||||
+++ ext/config/conf.d/jetty.ini
|
||||
@@ -30,4 +30,4 @@ port = 8080
|
||||
|
||||
# Access logging configuration path. To turn off access logging
|
||||
# comment out the line with `access-log-config=...`
|
||||
-access-log-config = /etc/puppetlabs/puppetdb/request-logging.xml
|
||||
+access-log-config = %%PREFIX%%/etc/puppetdb/request-logging.xml
|
||||
29
databases/puppetdb5/files/patch-ext_config_logback.xml
Normal file
29
databases/puppetdb5/files/patch-ext_config_logback.xml
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
--- ext/config/logback.xml.orig 2017-04-24 12:27:57.366296793 -0700
|
||||
+++ ext/config/logback.xml 2017-04-24 12:28:48.723259627 -0700
|
||||
@@ -6,10 +6,10 @@
|
||||
</appender>
|
||||
|
||||
<appender name="F1" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
- <file>/var/log/puppetlabs/puppetdb/puppetdb.log</file>
|
||||
+ <file>/var/log/puppetdb/puppetdb.log</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
- <fileNamePattern>/var/log/puppetlabs/puppetdb/puppetdb-%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
|
||||
+ <fileNamePattern>/var/log/puppetdb/puppetdb-%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
|
||||
<!-- each file should be at most 200MB, keep 90 days worth of history, but at most 1GB total-->
|
||||
<maxFileSize>200MB</maxFileSize>
|
||||
<maxHistory>90</maxHistory>
|
||||
@@ -31,11 +31,11 @@
|
||||
level="info"/>
|
||||
|
||||
<appender name="STATUS" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
- <file>/var/log/puppetlabs/puppetdb/puppetdb-status.log</file>
|
||||
+ <file>/var/log/puppetdb/puppetdb-status.log</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<!-- rollover daily -->
|
||||
- <fileNamePattern>/var/log/puppetlabs/puppetdb/puppetdb-status-%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
|
||||
+ <fileNamePattern>/var/log/puppetdb/puppetdb-status-%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
|
||||
<!-- each file should be at most 200MB, keep 90 days worth of history, but at most 1GB total-->
|
||||
<maxFileSize>200MB</maxFileSize>
|
||||
<maxHistory>90</maxHistory>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
--- ext/config/request-logging.xml.orig 2017-04-24 12:32:16.604464262 -0700
|
||||
+++ ext/config/request-logging.xml 2017-04-24 12:32:46.404637027 -0700
|
||||
@@ -1,9 +1,9 @@
|
||||
<configuration debug="false">
|
||||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
- <file>/var/log/puppetlabs/puppetdb/puppetdb-access.log</file>
|
||||
+ <file>/var/log/puppetdb/puppetdb-access.log</file>
|
||||
<append>true</append>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
- <fileNamePattern>/var/log/puppetlabs/puppetdb/puppetdb-access-%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
|
||||
+ <fileNamePattern>/var/log/puppetdb/puppetdb-access-%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
|
||||
<!-- each file should be at most 200MB, keep 90 days worth of history, but at most 1GB total-->
|
||||
<maxFileSize>200MB</maxFileSize>
|
||||
<maxHistory>90</maxHistory>
|
||||
6
databases/puppetdb5/files/pkg-message.in
Normal file
6
databases/puppetdb5/files/pkg-message.in
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
If this is a new installation, please run the follow to setup your SSL/puppetdb
|
||||
server:
|
||||
|
||||
%%PREFIX%%/bin/puppetdb ssl-setup
|
||||
|
||||
Please also remember to add puppetdb_enable="YES" into your rc.conf.
|
||||
91
databases/puppetdb5/files/puppetdb.in
Normal file
91
databases/puppetdb5/files/puppetdb.in
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
#!/bin/sh
|
||||
|
||||
# $FreeBSD$
|
||||
#
|
||||
# PROVIDE: puppetdb
|
||||
# REQUIRE: LOGIN
|
||||
# KEYWORD: shutdown
|
||||
|
||||
#
|
||||
# Configuration settings for puppetdb in /etc/rc.conf:
|
||||
#
|
||||
# puppetdb_enable (bool):
|
||||
# Set to "NO" by default.
|
||||
# Set it to "YES" to enable puppetdb
|
||||
#
|
||||
# puppetdb_args (str):
|
||||
# Extra arguments passed to start command
|
||||
#
|
||||
# puppetdb_java_home (str):
|
||||
# Set to "%%JAVA_HOME%%" by default.
|
||||
# Set the Java virtual machine to run puppetdb
|
||||
#
|
||||
# puppetdb_java_opts (str):
|
||||
# Set to "" by default.
|
||||
# Java VM args to use.
|
||||
#
|
||||
# puppetdb_user (str):
|
||||
# Set to "puppetdb" by default.
|
||||
# User to run puppetdb as.
|
||||
#
|
||||
# puppetdb_group (str):
|
||||
# Set to "puppetdb" by default.
|
||||
# Group for data file ownership.
|
||||
#
|
||||
# puppetdb_log_file (str):
|
||||
# Set to "/var/log/puppetdb/puppetdb.log" by default.
|
||||
# Log file location.
|
||||
#
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="puppetdb"
|
||||
rcvar=puppetdb_enable
|
||||
|
||||
load_rc_config "${name}"
|
||||
|
||||
: ${puppetdb_enable="NO"}
|
||||
: ${puppetdb_args="services -c %%PREFIX%%/etc/puppetdb/conf.d"}
|
||||
: ${puppetdb_java_home="%%JAVA_HOME%%"}
|
||||
: ${puppetdb_user="puppetdb"}
|
||||
: ${puppetdb_group="puppetdb"}
|
||||
: ${puppetdb_log_file="/var/log/puppetdb/puppetdb.log"}
|
||||
|
||||
pidfile="/var/run/puppetdb/puppetdb.pid"
|
||||
command="/usr/sbin/daemon"
|
||||
java_cmd="${puppetdb_java_home}/bin/java"
|
||||
procname="${java_cmd}"
|
||||
command_args="-p ${pidfile} ${java_cmd} -Djava.security.egd=/dev/urandom -cp %%DATADIR%%/puppetdb.jar clojure.main -m puppetlabs.puppetdb.main ${puppetdb_args} > ${puppetdb_log_file} 2>&1"
|
||||
|
||||
|
||||
required_files="${java_cmd}"
|
||||
|
||||
start_precmd="puppetdb_prestart"
|
||||
|
||||
puppetdb_prestart() {
|
||||
if [ ! -d "/var/log/puppetdb" ]; then
|
||||
install -d -o "${puppetdb_user}" -g "${puppetdb_group}" -m 750 "/var/log/puppetdb"
|
||||
fi
|
||||
if [ ! -f "${puppetdb_log_file}" ]; then
|
||||
touch "${puppetdb_log_file}"
|
||||
chown "${puppetdb_user}:${puppetdb_group}" "${puppetdb_log_file}"
|
||||
chmod 640 "${puppetdb_log_file}"
|
||||
fi
|
||||
if [ ! -d "/var/run/puppetdb" ]; then
|
||||
install -d -o "${puppetdb_user}" -g "${puppetdb_group}" -m 750 "/var/run/puppetdb"
|
||||
fi
|
||||
|
||||
chown -R "root:${puppetdb_group}" "%%PREFIX%%/etc/puppetdb/conf.d"
|
||||
chmod 0750 "%%PREFIX%%/etc/puppetdb/conf.d"
|
||||
|
||||
chown "root:${puppetdb_group}" "%%PREFIX%%/etc/puppetdb/logback.xml"
|
||||
chmod 0640 "%%PREFIX%%/etc/puppetdb/logback.xml"
|
||||
|
||||
if [ ! -d "/var/db/puppetdb" ]; then
|
||||
install -d -o "${puppetdb_user}" -g "${puppetdb_group}" -m 750 "/var/db/puppetdb"
|
||||
fi
|
||||
chown -R "${puppetdb_user}:${puppetdb_group}" "/var/db/puppetdb"
|
||||
chmod 0750 "/var/db/puppetdb"
|
||||
}
|
||||
|
||||
run_rc_command "$1"
|
||||
3
databases/puppetdb5/pkg-descr
Normal file
3
databases/puppetdb5/pkg-descr
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
The PuppetDB storeconfigs backend
|
||||
|
||||
WWW: https://docs.puppetlabs.com/puppetdb/latest/
|
||||
20
databases/puppetdb5/pkg-plist
Normal file
20
databases/puppetdb5/pkg-plist
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
bin/puppetdb
|
||||
%%DATADIR%%/cli/apps/anonymize
|
||||
%%DATADIR%%/cli/apps/config-migration
|
||||
%%DATADIR%%/cli/apps/foreground
|
||||
%%DATADIR%%/cli/apps/ssl-setup
|
||||
%%DATADIR%%/cli/apps/start
|
||||
%%DATADIR%%/cli/apps/stop
|
||||
%%DATADIR%%/cli/apps/reload
|
||||
%%DATADIR%%/ezbake-functions.sh
|
||||
%%DATADIR%%/ezbake.manifest
|
||||
%%DATADIR%%/puppetdb.jar
|
||||
@group puppetdb
|
||||
@sample etc/puppetdb/bootstrap.cfg.sample
|
||||
@sample etc/puppetdb/conf.d/config.ini.sample
|
||||
@sample etc/puppetdb/conf.d/database.ini.sample
|
||||
@sample etc/puppetdb/conf.d/jetty.ini.sample
|
||||
@sample etc/puppetdb/conf.d/repl.ini.sample
|
||||
@sample etc/puppetdb/logback.xml.sample
|
||||
@sample etc/puppetdb/request-logging.xml.sample
|
||||
@group
|
||||
Loading…
Add table
Reference in a new issue