1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-10 07:04:03 +00:00

net/foreman-proxy: Update to 3.4.0

Changelog:	https://theforeman.org/manuals/3.4/index.html#Releasenotesfor3.4

PR:		267579
This commit is contained in:
Frank Wall 2022-11-10 12:17:16 -05:00 committed by Guangyuan Yang
parent 8f303dbb42
commit ead99507a4
14 changed files with 35 additions and 59 deletions

View File

@ -1,5 +1,5 @@
PORTNAME= foreman-proxy
PORTVERSION= 3.1.2
PORTVERSION= 3.4.0
CATEGORIES= net
MASTER_SITES= https://downloads.theforeman.org/foreman-proxy/
@ -19,6 +19,7 @@ RUN_DEPENDS= rubygem-bundler_ext>=0.4:sysutils/rubygem-bundler_ext \
rubygem-rsec>=0.4.3:devel/rubygem-rsec \
rubygem-sd_notify>=0.1.1:devel/rubygem-sd_notify \
rubygem-sinatra>=2.0:www/rubygem-sinatra \
rubygem-webrick>=1.7:www/rubygem-webrick \
curl:ftp/curl
USES= shebangfix tar:bzip2
@ -34,8 +35,8 @@ USE_RUBY= yes
FOREMAN_PROXY_USER?= foreman_proxy
FOREMAN_PROXY_GROUP?= foreman_proxy
FOREMAN_PROXY_LOGDIR?= /var/log/foreman-proxy
FOREMAN_PROXY_RUNDIR?= /var/run/foreman-proxy
FOREMAN_PROXY_LOGDIR?= ${DESTDIR}/var/log/foreman-proxy
FOREMAN_PROXY_RUNDIR?= ${DESTDIR}/var/run/foreman-proxy
USERS= ${FOREMAN_PROXY_USER}
GROUPS= ${FOREMAN_PROXY_GROUP}
@ -93,11 +94,10 @@ do-install:
${INSTALL_DATA} ${WRKSRC}/config/settings.yml.example \
${STAGEDIR}${PREFIX}/etc/foreman-proxy/settings.yml.sample
.for cfg in bmc dhcp_isc dhcp_libvirt dhcp_native_ms dhcp dns_dnscmd \
dns_libvirt dns_nsupdate_gss dns_nsupdate dns facts httpboot \
logs puppet_proxy_puppet_api puppet \
puppetca_hostname_whitelisting puppetca_http_api \
puppetca_puppet_cert puppetca_token_whitelisting \
puppetca realm_freeipa realm registration templates tftp
dns_libvirt dns_nsupdate_gss dns_nsupdate dns facts httpboot logs \
puppet_proxy_puppet_api puppet puppetca_hostname_whitelisting \
puppetca_http_api puppetca_token_whitelisting puppetca realm_freeipa \
realm registration templates tftp
${INSTALL_DATA} ${WRKSRC}/config/settings.d/${cfg}.yml.example \
${STAGEDIR}${PREFIX}/etc/foreman-proxy/settings.d/${cfg}.yml.sample
.endfor

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1646448265
SHA256 (foreman-proxy-3.1.2.tar.bz2) = 14a21af2e735e266f5e22ec64e4597bf4821b53fb7a2393a5146587f1400a1eb
SIZE (foreman-proxy-3.1.2.tar.bz2) = 199897
TIMESTAMP = 1667679385
SHA256 (foreman-proxy-3.4.0.tar.bz2) = 5846625b59ee0c0da4b9af4eac97f5f5d7020b48b31ee0b28b2946f1b94181cf
SIZE (foreman-proxy-3.4.0.tar.bz2) = 195061

View File

@ -12,9 +12,11 @@
name="foreman_proxy"
rcvar="foreman_proxy_enable"
command="%%PREFIX%%/sbin/smart-proxy"
command="/usr/sbin/daemon"
procname="%%PREFIX%%/sbin/smart-proxy"
command_interpreter="%%RUBY%%"
pidfile="%%FOREMAN_PROXY_RUNDIR%%/foreman-proxy.pid"
command_args="-p ${pidfile} -t ${procname} ${command_interpreter} ${procname}"
foreman_proxy_enable=${foreman_proxy_enable:-"NO"}
foreman_proxy_user=${foreman_proxy_user-"%%FOREMAN_PROXY_USER%%"}

View File

@ -1,4 +1,4 @@
--- bin/smart-proxy.orig 2017-05-08 15:18:42 UTC
--- bin/smart-proxy.orig 2017-05-08 15:18:42 UTC
+++ bin/smart-proxy
@@ -1,6 +1,7 @@
#!/usr/bin/env ruby

View File

@ -1,11 +0,0 @@
--- config/settings.yml.example.orig 2018-12-06 13:30:25.000000000 +0100
+++ config/settings.yml.example 2019-02-11 22:25:42.626500000 +0100
@@ -43,7 +43,7 @@
#:foreman_ssl_key: ssl/private_keys/fqdn.pem
# by default smart_proxy runs in the foreground. To enable running as a daemon, uncomment 'daemon' setting
-#:daemon: true
+:daemon: true
# Only used when 'daemon' is set to true.
# Uncomment and modify if you want to change the default pid file '/var/run/foreman-proxy/foreman-proxy.pid'
#:daemon_pid: /var/run/foreman-proxy/foreman-proxy.pid

View File

@ -1,6 +1,6 @@
--- config/settings.d/puppet_proxy_puppet_api.yml.example.orig 2018-12-06 13:30:25.000000000 +0100
+++ config/settings.d/puppet_proxy_puppet_api.yml.example 2019-02-11 22:22:53.410247000 +0100
@@ -9,9 +9,9 @@
--- config/settings.d/puppet_proxy_puppet_api.yml.example.orig 2022-09-08 13:50:11 UTC
+++ config/settings.d/puppet_proxy_puppet_api.yml.example
@@ -3,9 +3,9 @@
#:puppet_url: https://puppet.example.com:8140
#
# SSL certificates used to access the puppet API

View File

@ -1,5 +1,5 @@
--- config/settings.d/puppetca_hostname_whitelisting.yml.example.orig 2021-10-26 14:48:17.000000000 +0200
+++ config/settings.d/puppetca_hostname_whitelisting.yml.example 2021-11-24 11:59:39.227846000 +0100
--- config/settings.d/puppetca_hostname_whitelisting.yml.example.orig 2022-09-08 13:50:11 UTC
+++ config/settings.d/puppetca_hostname_whitelisting.yml.example
@@ -3,4 +3,4 @@
# Configuration of the PuppetCA hostname_whitelisting provider
#

View File

@ -1,5 +1,5 @@
--- config/settings.d/puppetca_http_api.yml.example.orig 2021-10-26 14:48:17.000000000 +0200
+++ config/settings.d/puppetca_http_api.yml.example 2021-11-24 12:00:12.367622000 +0100
--- config/settings.d/puppetca_http_api.yml.example.orig 2022-09-08 13:50:11 UTC
+++ config/settings.d/puppetca_http_api.yml.example
@@ -3,6 +3,6 @@
#:puppet_url: https://puppet.example.com:8140
#

View File

@ -1,9 +0,0 @@
--- config/settings.d/puppetca_puppet_cert.yml.example.orig 2019-12-22 22:37:03 UTC
+++ config/settings.d/puppetca_puppet_cert.yml.example
@@ -1,4 +1,4 @@
---
-#:ssldir: /var/lib/puppet/ssl
+#:ssldir: /var/puppet/ssl
#:puppetca_use_sudo: true
-#:sudo_command: /usr/bin/sudo
+#:sudo_command: %%LOCALBASE%%/bin/sudo

View File

@ -1,5 +1,5 @@
--- config/settings.d/realm_freeipa.yml.example.orig 2021-10-26 14:48:17.000000000 +0200
+++ config/settings.d/realm_freeipa.yml.example 2021-11-24 12:26:05.935474000 +0100
--- config/settings.d/realm_freeipa.yml.example.orig 2022-09-08 13:50:11 UTC
+++ config/settings.d/realm_freeipa.yml.example
@@ -1,9 +1,9 @@
---
# Authentication for Kerberos-based Realms
@ -11,3 +11,4 @@
+:ipa_config: %%LOCALBASE%%/etc/ipa/default.conf
# Remove from DNS when deleting the FreeIPA entry
:remove_dns: true

View File

@ -1,5 +1,5 @@
--- config/settings.d/tftp.yml.example.orig 2018-12-06 13:30:25.000000000 +0100
+++ config/settings.d/tftp.yml.example 2019-02-11 22:24:46.060855000 +0100
--- config/settings.d/tftp.yml.example.orig 2022-09-08 13:50:11 UTC
+++ config/settings.d/tftp.yml.example
@@ -2,7 +2,7 @@
# Can be true, false, or http/https to enable just one of the protocols
:enabled: false

View File

@ -1,8 +1,8 @@
--- lib/proxy/http_download.rb.orig 2022-02-16 01:16:26 UTC
--- lib/proxy/http_download.rb.orig 2022-09-08 13:50:11 UTC
+++ lib/proxy/http_download.rb
@@ -10,7 +10,7 @@ module Proxy
logger.warn('Deprecated: HttpDownload read_timeout is deprecated and will be removed in 4.0') if read_timeout
logger.warn('Deprecated: HttpDownload dns_timeout is deprecated and will be removed in 4.0') if dns_timeout
logger.warn('Deprecated: HttpDownload read_timeout is deprecated and will be removed in 3.5') if read_timeout
logger.warn('Deprecated: HttpDownload dns_timeout is deprecated and will be removed in 3.5') if dns_timeout
connect_timeout ||= DEFAULT_CONNECT_TIMEOUT
- args = [which('curl')]
+ args = ["%%LOCALBASE%%/bin/curl"]

View File

@ -1,17 +1,15 @@
[
{ type: upgrade
maximum_version: 1.11
maximum_version: 3.4
message: <<EOM
WARNING:
In version 1.11+ Foreman Smart Proxy splits its configuration in even smaller
chunks located in:
In version 3.4+ Foreman Smart Proxy on FreeBSD uses daemon(1), which
requires the following setting in ${PREFIX}/etc/foreman-proxy/settings.yml:
${PREFIX}/etc/foreman-proxy/settings.d
:daemon: false
You can use a bundled script to convert your old settings to new settings:
${PREFIX}/share/foreman-proxy/extra/migrate_settings.rb
Otherwise the service will fail to start.
EOM
}
]

View File

@ -16,7 +16,6 @@
@sample %%ETCDIR%%/settings.d/puppetca.yml.sample
@sample %%ETCDIR%%/settings.d/puppetca_hostname_whitelisting.yml.sample
@sample %%ETCDIR%%/settings.d/puppetca_http_api.yml.sample
@sample %%ETCDIR%%/settings.d/puppetca_puppet_cert.yml.sample
@sample %%ETCDIR%%/settings.d/puppetca_token_whitelisting.yml.sample
@sample %%ETCDIR%%/settings.d/realm.yml.sample
@sample %%ETCDIR%%/settings.d/realm_freeipa.yml.sample
@ -213,10 +212,6 @@ sbin/smart-proxy
%%DATADIR%%/modules/puppetca_http_api/puppetca_http_api.rb
%%DATADIR%%/modules/puppetca_http_api/puppetca_http_api_plugin.rb
%%DATADIR%%/modules/puppetca_http_api/puppetca_impl.rb
%%DATADIR%%/modules/puppetca_puppet_cert/plugin_configuration.rb
%%DATADIR%%/modules/puppetca_puppet_cert/puppetca_impl.rb
%%DATADIR%%/modules/puppetca_puppet_cert/puppetca_puppet_cert.rb
%%DATADIR%%/modules/puppetca_puppet_cert/puppetca_puppet_cert_plugin.rb
%%DATADIR%%/modules/puppetca_token_whitelisting/plugin_configuration.rb
%%DATADIR%%/modules/puppetca_token_whitelisting/puppetca_token_whitelisting.rb
%%DATADIR%%/modules/puppetca_token_whitelisting/puppetca_token_whitelisting_autosigner.rb