Accepting request 1155081 from home:weberho:branches:devel:kubic

- configuration changes:
  * Enhanced default configuration file, including configs for http3 support.
  * Docker configuration has been disabled per default, file provider has been enabled.
    The directory for the file provider has been set to /etc/traefik/conf.d
  * Prepared directories for logging in /var/log/traefik
  * Enhanced default configuration file, including configs for http3 support. Settings
    are disabled per default.
- packaging general:
  * Use standard source-download feature, modified _service file and removed _servicedata
  * packagers can invoke `prepare-sources.sh` to doenload sources and prepare go-packages
    as well as node_modules for the built process.
- frontend packaging:
  * The frontend will now be packaged on OBS to have reproduceable builds.
- Go packaging: 
  * Added upstream patch traefik-fix-int-overflow-with-go-generate-10452.patch to
    allow packaging on 32bit architectures gh#traefik/traefik#10451
  * Enabled CGO because there is no cross compilation needed in OSB (we build
    packages for every distribution/architecture seperately). PIE can not be used
    with CGO enabled for most architectures and is reported as failure sinc go 1.22.
    See https://github.com/golang/go/issues/64875
  * Don't use pie-buildmode for ppc64 and s390x architectures
- Update to version 2.11.0:
  * Enhancements:
    * [middleware] Deprecate IPWhiteList middleware in favor of IPAllowList
    * [redis] Add Redis Sentinel support
    * [server] Add KeepAliveMaxTime and KeepAliveMaxRequests features to entrypoints
    * [sticky-session] Hash WRR sticky cookies
  * Bug fixes:
    * [acme] Update go-acme/lego to v4.15.0
    * [authentication] Fix NTLM and Kerberos
    * [file] Fix file watcher
    * [file] Update github.com/fsnotify/fsnotify to v1.7.0
    * [http3] Update quic-go to v0.40.1
    * [middleware,tcp] Add missing TCP IPAllowList middleware constructor
    * [nomad] Update the Nomad API dependency to v1.7.2
    * [server] Fix ReadHeaderTimeout for PROXY protocol
    * [webui] Fixes the Header Button
    * [webui] Fix URL encode resource's id before calling API endpoints

OBS-URL: https://build.opensuse.org/request/show/1155081
OBS-URL: https://build.opensuse.org/package/show/devel:kubic/traefik?expand=0&rev=27
This commit is contained in:
Alexandre Vicenzi 2024-03-05 13:28:36 +00:00 committed by Git OBS Bridge
parent 66666feeaf
commit 61df38b048
15 changed files with 23806 additions and 50 deletions

View File

@ -1,19 +1,9 @@
<services>
<service name="tar_scm" mode="disabled">
<param name="url">https://github.com/traefik/traefik.git</param>
<param name="scm">git</param>
<param name="exclude">.git</param>
<param name="revision">v2.10.7</param>
<param name="versionformat">@PARENT_TAG@</param>
<param name="changesgenerate">enable</param>
<param name="versionrewrite-pattern">v(.*)</param>
<service name="go_modules" mode="manual">
</service>
<service mode="disabled" name="set_version">
</service>
<service name="recompress" mode="disabled">
<param name="file">*.tar</param>
<param name="compression">gz</param>
</service>
<service name="go_modules" mode="disabled">
<service name="node_modules" mode="manual">
<param name="cpio">node_modules.obscpio</param>
<param name="output">node_modules.spec.inc</param>
<param name="source-offset">10000</param>
</service>
</services>

View File

@ -1,4 +0,0 @@
<servicedata>
<service name="tar_scm">
<param name="url">https://github.com/traefik/traefik.git</param>
<param name="changesrevision">0a7964300166d167f68d5502bc245b3b9c8842b4</param></service></servicedata>

3
node_modules.obscpio Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:03384fea5d9587f8f51e3b622d6f63b9c9f326e68e7b85b7c7e9e7578f5b73c4
size 78943480

1392
node_modules.spec.inc Normal file

File diff suppressed because it is too large Load Diff

1392
node_modules.sums Normal file

File diff suppressed because it is too large Load Diff

20763
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

43
prepare-sources.sh Normal file
View File

@ -0,0 +1,43 @@
#!/bin/sh
# Prepare go and node languages used for packaging
# Author: jweberhofer@weberhofer.at
#
echo "Preparing sources for packaging"
if [ -z `which osc` ] ; then
echo 'osc must be installed!'
exit 1;
fi
if [ -z `which yarn` ] ; then
echo 'yarn must be installed!'
exit 1;
fi
if [ -z `which npm` ] ; then
echo 'npm must be installed!'
exit 1;
fi
# download sources from github, package and create the vendor-package
osc service runall download_files
if [ "$?" -ne 0 ] ; then
exit 1
fi
# create package-lock for packaging offline node_modules
VERSION=`grep '^Version:[\t ]*' traefik.spec | sed -e 's/^[^0-9]*// ; s/[ \t]*$//'`
tar -xzf "traefik-$VERSION.tar.gz"
pushd "traefik-$VERSION/webui"
if [ "$?" -ne 0 ] ; then
exit 1
fi
npm install --package-lock-only --legacy-peer-deps --ignore-scripts
if [ "$?" -ne 0 ] ; then
exit 1
fi
mv package-lock.json ../../
popd
# create the offline packages
osc service manualrun

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b03a5b57ce316981eb89862a3d5f8ba6d9f79b3338a6e60efe8cca08111c9fba
size 9473934

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:df526b3a913dcd1d29b3d94f55a08d02c6aa91d9af02d5c55a0084829946abca
size 4324320

3
traefik-2.11.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:41406d723c4330207952df501d0ff810e8583da3aef649b8d226a91a35fa9eca
size 9130975

View File

@ -0,0 +1,45 @@
From 86a01a2a2558b05978883703b720a612e95a1b9d Mon Sep 17 00:00:00 2001
From: Fernandez Ludovic <ldez@users.noreply.github.com>
Date: Sat, 17 Feb 2024 14:01:10 +0100
Subject: [PATCH 1/2] fix: int overflow with go generate
---
pkg/collector/hydratation/hydration.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pkg/collector/hydratation/hydration.go b/pkg/collector/hydratation/hydration.go
index 40736f0462..b0d2b316d1 100644
--- a/pkg/collector/hydratation/hydration.go
+++ b/pkg/collector/hydratation/hydration.go
@@ -56,7 +56,7 @@ func fill(field reflect.Value) error {
case reflect.Int64:
switch field.Type() {
case reflect.TypeOf(types.Duration(time.Second)):
- setTyped(field, int64(defaultNumber*int(time.Second)))
+ setTyped(field, types.Duration(defaultNumber*time.Second))
default:
setTyped(field, int64(defaultNumber))
}
From 6786d3889f1b6affbd3bdb6e86e6b25b5d8ff4d6 Mon Sep 17 00:00:00 2001
From: Fernandez Ludovic <ldez@users.noreply.github.com>
Date: Sat, 17 Feb 2024 15:17:31 +0100
Subject: [PATCH 2/2] chore: replace deprecated PtrTo with PointerTo
---
pkg/collector/hydratation/hydration.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pkg/collector/hydratation/hydration.go b/pkg/collector/hydratation/hydration.go
index b0d2b316d1..c45cfcfbb1 100644
--- a/pkg/collector/hydratation/hydration.go
+++ b/pkg/collector/hydratation/hydration.go
@@ -98,7 +98,7 @@ func setMap(field reflect.Value) error {
key := reflect.ValueOf(fmt.Sprintf("%s%d", baseKeyName, i))
// generate value
- ptrType := reflect.PtrTo(field.Type().Elem())
+ ptrType := reflect.PointerTo(field.Type().Elem())
ptrValue := reflect.New(ptrType)
if err := fill(ptrValue); err != nil {
return err

View File

@ -1,3 +1,49 @@
-------------------------------------------------------------------
Tue Mar 5 10:54:13 UTC 2024 - Johannes Weberhofer <jweberhofer@weberhofer.at>
- configuration changes:
* Enhanced default configuration file, including configs for http3 support.
* Docker configuration has been disabled per default, file provider has been enabled.
The directory for the file provider has been set to /etc/traefik/conf.d
* Prepared directories for logging in /var/log/traefik
* Enhanced default configuration file, including configs for http3 support. Settings
are disabled per default.
- packaging general:
* Use standard source-download feature, modified _service file and removed _servicedata
* packagers can invoke `prepare-sources.sh` to doenload sources and prepare go-packages
as well as node_modules for the built process.
- frontend packaging:
* The frontend will now be packaged on OBS to have reproduceable builds.
- Go packaging:
* Added upstream patch traefik-fix-int-overflow-with-go-generate-10452.patch to
allow packaging on 32bit architectures gh#traefik/traefik#10451
* Enabled CGO because there is no cross compilation needed in OSB (we build
packages for every distribution/architecture seperately). PIE can not be used
with CGO enabled for most architectures and is reported as failure sinc go 1.22.
See https://github.com/golang/go/issues/64875
* Don't use pie-buildmode for ppc64 and s390x architectures
- Update to version 2.11.0:
* Enhancements:
* [middleware] Deprecate IPWhiteList middleware in favor of IPAllowList
* [redis] Add Redis Sentinel support
* [server] Add KeepAliveMaxTime and KeepAliveMaxRequests features to entrypoints
* [sticky-session] Hash WRR sticky cookies
* Bug fixes:
* [acme] Update go-acme/lego to v4.15.0
* [authentication] Fix NTLM and Kerberos
* [file] Fix file watcher
* [file] Update github.com/fsnotify/fsnotify to v1.7.0
* [http3] Update quic-go to v0.40.1
* [middleware,tcp] Add missing TCP IPAllowList middleware constructor
* [nomad] Update the Nomad API dependency to v1.7.2
* [server] Fix ReadHeaderTimeout for PROXY protocol
* [webui] Fixes the Header Button
* [webui] Fix URL encode resource's id before calling API endpoints
-------------------------------------------------------------------
Wed Feb 21 14:21:09 UTC 2024 - Johannes Weberhofer <jweberhofer@weberhofer.at>

View File

@ -17,23 +17,38 @@
%define project github.com/traefik/traefik
%include %{_sourcedir}/node_modules.spec.inc
%ifarch ppc64 s390x
%define buildmode default
%else
%define buildmode pie
%endif
Name: traefik
Version: 2.10.7
Version: 2.11.0
Release: 0
Summary: The Cloud Native Application Proxy
License: MIT
Group: Productivity/Networking/Web/Proxy
URL: https://traefik.io/
Source0: %{name}-%{version}.tar.gz
Source0: https://github.com/traefik/traefik/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: vendor.tar.gz
Source2: traefik.service
Source3: traefik.toml
Source4: %{name}-%{version}.webui.tar.gz
Source4: package-lock.json
Source5: node_modules.spec.inc
# prepare-sources.sh is used to prepare sources for packaging
Source6: prepare-sources.sh
# PATCH-FIX-UPSTREAM allow packaging on 32bit architectures gh#traefik/traefik#10451
Patch1: traefik-fix-int-overflow-with-go-generate-10452.patch
BuildRequires: go-bindata
BuildRequires: golang-packaging
BuildRequires: local-npm-registry
BuildRequires: systemd-rpm-macros
BuildRequires: (golang(API) >= 1.21 with golang(API) < 1.22)
BuildRequires: yarn
BuildRequires: (golang(API) >= 1.22)
Recommends: podman
%{?systemd_requires}
%{go_provides}
@ -47,24 +62,26 @@ Etcd, Rancher, Amazon ECS) and configures itself automatically and dynamically.
Pointing Traefik at your orchestrator should be the only configuration step you need.
%prep
%setup -q
%setup -b0 -a1 -q
%autopatch -p1
cd webui
local-npm-registry %{_sourcedir} install --include=dev --legacy-peer-deps
%build
%{goprep} %{project}
# tarball causes "inconsistent vendoring"
tar -xf %{SOURCE1}
# unpack webui
tar -xf %{SOURCE4} -C webui --strip-components=2
pushd webui
export PATH=$PATH:./node_modules/.bin
yarn build
popd
# see script/generate
go generate
build_date=$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +"%%Y%%m%%d")
# see script/binary
CGO_ENABLED=0 GOGC=off go build \
-buildmode=pie \
CGO_ENABLED=1 GOGC=off go build \
-buildmode=%{buildmode} \
-mod=vendor \
-ldflags "-X github.com/traefik/traefik/v2/pkg/version.Version=%{version} \
-X github.com/traefik/traefik/v2/pkg/version.Codename='' \
@ -83,6 +100,10 @@ ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
# configuration
install -D -p -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/%{name}/%{name}.toml
mkdir -p %{buildroot}%{_sysconfdir}/%{name}/conf.d
# logging
mkdir -p %{buildroot}%{_localstatedir}/log/%{name}
%pre
%service_add_pre %{name}.service
@ -106,6 +127,9 @@ install -D -p -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/%{name}/%{name}.toml
%{_sbindir}/rc%{name}
%dir %{_sysconfdir}/%{name}
%dir %{_sysconfdir}/%{name}/conf.d
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.toml
%attr(750,root,root) %dir %{_localstatedir}/log/%{name}
%changelog

View File

@ -11,23 +11,59 @@
checkNewVersion = false
sendAnonymousUsage = false
#[tls.options]
# [tls.options.default]
# sniStrict = true
################################################################
# As the HTTP/3 spec is still in draft, HTTP/3 support in
# Traefik is an experimental feature and needs to be activated
# in the experimental section of the static configuration.
#
# Will be a stable feature starting with version 3
#
# https://doc.traefik.io/traefik/routing/entrypoints/#http3
################################################################
#[experimental]
# http3 = true
################################################################
# Entrypoints configuration
#
# https://doc.traefik.io/traefik/routing/entrypoints/
################################################################
# Entrypoints definition
#
# Optional
# Default:
[entryPoints]
[entryPoints.web]
address = ":80"
[entryPoints.websecure]
address = ":443"
## Redirect all requests incoming from http to https
## websecure/https must be enabled to be use this configuration
##
## https://doc.traefik.io/traefik/routing/entrypoints/#redirection
##
# [entryPoints.web.http]
# [entryPoints.web.http.redirections]
# [entryPoints.web.http.redirections.entryPoint]
# to = "websecure"
# scheme = "https"
## Enable the https endpoint at port 443
##
# [entryPoints.websecure]
# address = ":443"
## Enable the http3 and advertize it at UDP port 443
## In Version 2.x the experimental http3 feature must be enabled
# [entryPoints.websecure.http3]
# advertisedPort = 443
################################################################
# Traefik logs configuration
#
# https://doc.traefik.io/traefik/observability/logs/
################################################################
# Traefik logs
@ -50,7 +86,7 @@
# Optional
# Default: os.Stdout
#
# filePath = "log/traefik.log"
# filePath = "/var/log/traefik/traefik.log"
# Format is either "json" or "common".
#
@ -61,6 +97,8 @@
################################################################
# Access logs configuration
#
# https://doc.traefik.io/traefik/observability/access-logs/
################################################################
# Enable access logs
@ -68,7 +106,6 @@
# Common Log Format (CLF), extended with additional fields.
#
# Optional
#
# [accessLog]
# Sets the file path for the access log. If not specified, stdout will be used.
@ -77,7 +114,7 @@
# Optional
# Default: os.Stdout
#
# filePath = "/path/to/log/log.txt"
# filePath = "/var/log/traefik/access.log"
# Format is either "json" or "common".
#
@ -88,6 +125,8 @@
################################################################
# API and dashboard configuration
#
# https://doc.traefik.io/traefik/operations/api/
################################################################
# Enable API and dashboard
@ -98,7 +137,7 @@
# Optional
# Default: false
#
# insecure = true
#insecure = true
# Enabled Dashboard
#
@ -109,6 +148,8 @@
################################################################
# Ping configuration
#
# https://doc.traefik.io/traefik/operations/ping/
################################################################
# Enable ping
@ -122,11 +163,13 @@
# entryPoint = "traefik"
################################################################
# Docker configuration backend
# Docker configuration provider
#
# https://doc.traefik.io/traefik/providers/docker/
################################################################
# Enable Docker configuration backend
[providers.docker]
# Enable Docker configuration provider
#[providers.docker]
# Docker server endpoint. Can be a tcp or a unix socket endpoint.
#
@ -148,3 +191,25 @@
# Default: true
#
# exposedByDefault = false
################################################################
# File provider backend
#
# https://doc.traefik.io/traefik/providers/file/
################################################################
# Enable File configuration provider
[providers.file]
# Defines the path to the directory that contains the
# configuration files.
# Default: unset
#
directory = "/etc/traefik/conf.d"
# Set the watch option to true to allow Traefik to automatically
# watch for file changes
# Default: false
#
watch = true

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a89d2a954de032e57e86dab229d6b0c6c2a992ea83015d31c6f6161ebb569381
size 23503919
oid sha256:e982bd33bb1ab2a6d5199d84f256c3852c6b49cbfbfd74cbca3d15d6fd3d9b02
size 22444070