SHA256
1
0
forked from pool/traefik
traefik/traefik.spec

122 lines
3.5 KiB
RPMSpec
Raw Normal View History

#
# spec file for package traefik
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define project github.com/traefik/traefik
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
2024-03-05 14:28:36 +01:00
%ifarch ppc64 s390x
%define buildmode default
%else
%define buildmode pie
%endif
Name: traefik
Version: 3.0.1
Release: 0
Summary: The Cloud Native Application Proxy
License: MIT
Group: Productivity/Networking/Web/Proxy
URL: https://traefik.io/
# Set the version in the spec-file, download with "osc service localrun download_files"
# and create go vendor-package using "osc service manualrun"
Source0: https://github.com/traefik/traefik/releases/download/v%{version}/%{name}-v%{version}.src.tar.gz
Source1: vendor.tar.gz
Source2: traefik.service
Source3: traefik.yml
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
2024-03-05 14:28:36 +01:00
BuildRequires: go-bindata
BuildRequires: golang-packaging
BuildRequires: systemd-rpm-macros
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
2024-03-05 14:28:36 +01:00
BuildRequires: (golang(API) >= 1.22)
Recommends: podman
Conflicts: traefik2
%{?systemd_requires}
%{go_provides}
%description
Traefik (pronounced traffic) is a modern HTTP reverse proxy and load balancer
that makes deploying microservices easy. Traefik integrates with your existing
infrastructure components (Docker, Swarm mode, Kubernetes, Marathon, Consul,
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 -c %{name}-%{version} -b0 -a1 -q
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
2024-03-05 14:28:36 +01:00
%autopatch -p1
Accepting request 1171807 from home:weberho:branches:devel:kubic - Added allow-node-21.patch to allow building with nodejs21, too - Update to version 2.11.2 Important: Read the migration guide at https://doc.traefik.io/traefik/migration/v2/#v2112 * CVE's: * GHSA-7f4j-64p6-5h5v (related to CVE-2023-45288) * CVE-2024-28869 * Bug fixes: * [server] Revert LingeringTimeout and change default value for ReadTimeout * [server] Set default ReadTimeout value to 60s - Removed traefik-fix-int-overflow-with-go-generate-10452.patch - Update to version 2.11.1: * Bug fixes: * [acme,tls] Enforce handling of ACME-TLS/1 challenges * [acme] Update go-acme/lego to v4.16.1 * [acme] Close created file in ACME local store CheckFile func * [docker,http3] Update to quic-go v0.42.0 and docker/cli v24.0.9 * [docker,marathon,rancher,ecs,tls,nomad] Allow to configure TLSStore default generated certificate with labels * [ecs] Adjust ECS network interface detection logi * [logs,tls] Fix log when default TLSStore and TLSOptions are defined multiple times * [middleware] Allow empty replacement with ReplacePathRegex middleware * [plugins] Update Yaegi to v0.16.1 * [provider,rules] Don't allow routers higher than internal ones * [rules] Reserve priority range for internal router * [server,tcp] Introduce Lingering Timeout * [tcp] Enforce failure for TCP HostSNI with hostname * [tracing] Bump Elastic APM to v2.4.8 * [webui] Fix dashboard exposition through a router * [webui] Display IPAllowlist middleware configuration in dashboard * [webui] Make text more readable in dark mode * [webui] Migrate to Quasar 2.x and Vue.js 3.x * [webui] Add a horizontal scroll for the mobile view OBS-URL: https://build.opensuse.org/request/show/1171807 OBS-URL: https://build.opensuse.org/package/show/devel:kubic/traefik?expand=0&rev=30
2024-05-03 20:47:14 +02:00
%build
%{goprep} %{project}
# see script/generate
go generate
build_date=$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +"%%Y%%m%%d")
# see script/binary
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
2024-03-05 14:28:36 +01:00
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='' \
-X github.com/traefik/traefik/v2/pkg/version.BuildDate=${build_date}" \
-installsuffix nocgo \
-o traefik \
./cmd/traefik
%install
install -d %{buildroot}/%{_sbindir}
install -D -p -m 0755 %{name} %{buildroot}%{_bindir}/%{name}
# service
install -D -p -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/%{name}.service
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
# configuration
install -D -p -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/%{name}/%{name}.yml
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
2024-03-05 14:28:36 +01:00
mkdir -p %{buildroot}%{_sysconfdir}/%{name}/conf.d
# logging
mkdir -p %{buildroot}%{_localstatedir}/log/%{name}
%pre
%service_add_pre %{name}.service
%post
%service_add_post %{name}.service
%{fillup_only -n %{name}}
%preun
%service_del_preun %{name}.service
%postun
%service_del_postun %{name}.service
%files
%license LICENSE.md
%doc README.md SECURITY.md CONTRIBUTING.md
%{_bindir}/%{name}
%{_unitdir}/%{name}.service
%{_sbindir}/rc%{name}
%dir %{_sysconfdir}/%{name}
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
2024-03-05 14:28:36 +01:00
%dir %{_sysconfdir}/%{name}/conf.d
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.yml
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
2024-03-05 14:28:36 +01:00
%attr(750,root,root) %dir %{_localstatedir}/log/%{name}
%changelog