SHA256
1
0
forked from pool/traefik
traefik/traefik.spec
Alexandre Vicenzi 6078afa3aa Accepting request 1176506 from home:weberho:branches:devel:kubic
- Update to version 3.0.1
  * CVEs:
    * CVE-2024-24788 (bsc#1224018): A malformed DNS message in response to a
      query can cause the Lookup functions to get stuck in an infinite loop.
  * Bug fixes:
    * [k8s/ingress] Fix rule syntax version for all internal routers
      (gh#traefik/traefik#10689 by HalloTschuess)
    * [metrics,tracing] Allow empty configuration for OpenTelemetry metrics
      and tracing (gh#traefik/traefik#10729 by rtribotte)
    * [provider,tls] Bump tscert dependency to 28a91b69a046
      (gh#traefik/traefik#10668 by kevinpollet)
    * [rules,tcp] Fix the rule syntax mechanism for TCP
      (gh#traefik/traefik#10680 by lbenguigui)
    * [tls,server] Remove deadlines when handling PostgreSQL connections
      (gh#traefik/traefik#10675 by rtribotte)
    * [webui] Add support for IP White list
      (gh#traefik/traefik#10740 by davidbaptista)
  * Additional fixes: bnc#1224308 and bnc#1224384
- New packaging:
  Traefik's src.tar.gz files containing a pre-built frontend are now
  used for packaging with simplifies the packaging process a lot.
  
  * Set the version in the spec-file
  * download sources with "osc service localrun download_files"
  * create go vendor-package using "osc service manualrun"
- Removed allow-node-21.patch and prepare-sources.sh script

OBS-URL: https://build.opensuse.org/request/show/1176506
OBS-URL: https://build.opensuse.org/package/show/devel:kubic/traefik?expand=0&rev=34
2024-05-23 15:26:14 +00:00

122 lines
3.5 KiB
RPMSpec

#
# 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
%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
BuildRequires: go-bindata
BuildRequires: golang-packaging
BuildRequires: systemd-rpm-macros
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
%autopatch -p1
%build
%{goprep} %{project}
# see script/generate
go generate
build_date=$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +"%%Y%%m%%d")
# see script/binary
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
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}
%dir %{_sysconfdir}/%{name}/conf.d
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.yml
%attr(750,root,root) %dir %{_localstatedir}/log/%{name}
%changelog