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.
This commit is contained in:
Thomas Zander 2020-10-11 09:27:48 +00:00
parent 4b1427a070
commit b6937fb3be
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=552040
4 changed files with 30 additions and 33 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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
}
]