aboutsummaryrefslogtreecommitdiff
path: root/net/traefik
diff options
context:
space:
mode:
authorThomas Zander <riggs@FreeBSD.org>2020-10-11 09:27:48 +0000
committerThomas Zander <riggs@FreeBSD.org>2020-10-11 09:27:48 +0000
commitb6937fb3be9d872664c4c493778571a5fb50047e (patch)
tree173fb911f6b6eba3d1bccce14a77925df4725eac /net/traefik
parent4b1427a07027bf49006c01703ec95780c1ac2afa (diff)
downloadports-b6937fb3be9d872664c4c493778571a5fb50047e.tar.gz
ports-b6937fb3be9d872664c4c493778571a5fb50047e.zip
Update to upstream release 2.3.1
Details: - The Traefik v1 branch has been on maintenance mode for over a year and is no longer guaranteed to receive security updates, see: https://community.traefik.io/t/end-of-support-of-1-x/2451 - Updating of configuration files will be necessary for users who have not previously used net/traefik2 (which was introduced in 2020Q2 to allow for the eventual depreciation of the v1 branch). Instructions and a link to an automated migration tool are provided in pkg-message.
Notes
Notes: svn path=/head/; revision=552040
Diffstat (limited to 'net/traefik')
-rw-r--r--net/traefik/Makefile40
-rw-r--r--net/traefik/distinfo8
-rw-r--r--net/traefik/files/traefik.in2
-rw-r--r--net/traefik/pkg-message13
4 files changed, 30 insertions, 33 deletions
diff --git a/net/traefik/Makefile b/net/traefik/Makefile
index dec6a8582578..0874d8d10820 100644
--- a/net/traefik/Makefile
+++ b/net/traefik/Makefile
@@ -1,11 +1,9 @@
# $FreeBSD$
PORTNAME= traefik
-PORTVERSION= 1.7.26
-DISTVERSIONPREFIX= v
+PORTVERSION= 2.3.1
CATEGORIES= net
-MASTER_SITES= LOCAL/riggs/${PORTNAME}:webui
-DISTFILES= ${PORTNAME}-webui-static-${PORTVERSION}${EXTRACT_SUFX}:webui
+MASTER_SITES= LOCAL/riggs/${PORTNAME}
MAINTAINER= riggs@FreeBSD.org
COMMENT= High availability reverse proxy and load balancer
@@ -15,17 +13,14 @@ LICENSE_FILE= ${WRKSRC}/LICENSE.md
BUILD_DEPENDS= go-bindata:devel/go-bindata
-USES= go
-
-USE_GITHUB= yes
-GH_ACCOUNT= containous
-GH_SUBDIR= src/github.com/containous/traefik
+USES= go:modules tar:xz
USE_RC_SUBR= traefik
GO_BUILDFLAGS= -ldflags "-s -w \
- -X github.com/containous/traefik/version.Version=${DISTVERSION} \
- -X github.com/containous/traefik/version.BuildDate=`date -u '+%Y-%m-%d_%I:%M:%S%p'`"
+ -X github.com/traefik/traefik/v2/pkg/version.Version=${DISTVERSION} \
+ -X github.com/traefik/traefik/v2/pkg/version.Codename=portbuild \
+ -X github.com/traefik/traefik/v2/pkg/version.BuildDate=`date -u '+%Y-%m-%d_%I:%M:%S%p'`"
GO_TARGET= ./cmd/traefik
CGO_ENABLED= 0
@@ -35,25 +30,16 @@ GROUPS= traefik
PLIST_FILES= bin/traefik \
"@sample etc/traefik.toml.sample"
-# Recipe for building the web UI
-# Note this is not done during a standard port build as
-# it downloads node modules from the internet during build.
-# Instead, we use the pre-generated from LOCAL.
-# (20180510: the upath module requires node < 10)
-# BUILD_DEPENDS+= npm:www/npm-node8 \
-# yarnpkg:www/yarn-node8
-#USES+= python:2.7,build
-#build-ui:
-# @cd ${WRKSRC}/webui; \
-# yarn install && \
-# yarn run build
+# Preparing the vendor dir for a self-contained tarball now works by just
+# executing 'make gomod-vendor' and bundling the resulting ${WRKSRC}/vendor.
+# Building the UI with node + yarn is no longer necessary.
post-patch:
- @${MV} ${WRKDIR}/static ${WRKSRC}
- # Install a sample configuration file which works by default
- # without manual tweaking
+ # Install a sample configuration file which at least allows the daemon
+ # to start without manual tweaking.
${REINPLACE_CMD} -e 's|:80|:8088|' \
- -e 's|\[docker|# \[docker|' ${WRKSRC}/traefik.sample.toml
+ -e 's|:443|:8433|' \
+ -e 's|\[providers.docker|# \[providers.docker|' ${WRKSRC}/traefik.sample.toml
pre-build:
cd ${GO_WRKSRC}; ${SETENV} ${MAKE_ENV} ${GO_ENV} ${GO_CMD} generate
diff --git a/net/traefik/distinfo b/net/traefik/distinfo
index 7388f1433736..397f228578ab 100644
--- a/net/traefik/distinfo
+++ b/net/traefik/distinfo
@@ -1,5 +1,3 @@
-TIMESTAMP = 1599285554
-SHA256 (traefik-webui-static-1.7.26.tar.gz) = 80cd113b5b250fc9ebba26471667ad594d33ec214884d5b7ad7ef7477d5d9289
-SIZE (traefik-webui-static-1.7.26.tar.gz) = 920348
-SHA256 (containous-traefik-v1.7.26_GH0.tar.gz) = 440e8f3fa9cd5f3da2a4e9654f5216c89209de84590651d0ffff25f8155c8b20
-SIZE (containous-traefik-v1.7.26_GH0.tar.gz) = 11392194
+TIMESTAMP = 1602282919
+SHA256 (traefik-2.3.1.tar.xz) = 4c270456282773e234057d8a7959856d7a61eac930a5f159cb4f7ea19dabcab6
+SIZE (traefik-2.3.1.tar.xz) = 13105328
diff --git a/net/traefik/files/traefik.in b/net/traefik/files/traefik.in
index c27eb6a04d4d..d9fde3e2589f 100644
--- a/net/traefik/files/traefik.in
+++ b/net/traefik/files/traefik.in
@@ -39,7 +39,7 @@ load_rc_config $name
pidfile=/var/run/traefik.pid
procname="%%PREFIX%%/bin/traefik"
command="/usr/sbin/daemon"
-command_args="-f -p ${pidfile} /usr/bin/env ${traefik_env} ${procname} --configFile=${traefik_conf} ${traefik_args}"
+command_args="-f -p ${pidfile} /usr/bin/env ${traefik_env} ${procname} --configfile=${traefik_conf} ${traefik_args}"
start_precmd=traefik_startprecmd
diff --git a/net/traefik/pkg-message b/net/traefik/pkg-message
index 5e9add4c60f7..12a30ff3678f 100644
--- a/net/traefik/pkg-message
+++ b/net/traefik/pkg-message
@@ -15,4 +15,17 @@ are options to achieve this:
to bind to privileged ports.
EOM
}
+{ type: upgrade
+ maximum_version: "2.0"
+ message: <<EOM
+The version 2 of Traefik requires manual configuration changes
+when migrating from a legacy v1 version to v2.
+Please consult the Traefik migration guide at
+https://doc.traefik.io/traefik/migration/v1-to-v2/
+for details on how to adapt existing configuration files.
+Note that there is a tool that can automate migration and
+rewrite existing configuration files (at least partially):
+https://github.com/traefik/traefik-migration-tool
+EOM
+}
]