[arch-commits] Commit in traefik/trunk (PKGBUILD traefik.service)

Christian Rebischke shibumi at archlinux.org
Sat Jun 27 16:11:59 UTC 2020


    Date: Saturday, June 27, 2020 @ 16:11:59
  Author: shibumi
Revision: 654962

upgpkg: traefik 2.2.1-2 apply go guidelines + fix #66662

Modified:
  traefik/trunk/PKGBUILD
  traefik/trunk/traefik.service

-----------------+
 PKGBUILD        |   22 +++++++++++++++-------
 traefik.service |    3 +--
 2 files changed, 16 insertions(+), 9 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-06-27 16:01:47 UTC (rev 654961)
+++ PKGBUILD	2020-06-27 16:11:59 UTC (rev 654962)
@@ -2,7 +2,7 @@
 
 pkgname=traefik
 pkgver=2.2.1
-pkgrel=1
+pkgrel=2
 pkgdesc="Modern reverse proxy written in Go"
 arch=('x86_64')
 url="https://containo.us/traefik/"
@@ -10,14 +10,14 @@
 makedepends=('go-pie' 'git' 'go-bindata-hashicorp')
 depends=('glibc')
 backup=('etc/traefik/traefik.toml'
-        'etc/traefik/traefik.yaml'
-        'etc/traefik/traefik.yml')
+  'etc/traefik/traefik.yaml'
+  'etc/traefik/traefik.yml')
 source=("${pkgname}-${pkgver}.tar.gz::https://github.com/containous/traefik/releases/download/v${pkgver}/traefik-v${pkgver}.src.tar.gz"
-        'traefik.service'
-        'traefik.sysusers')
+  'traefik.service'
+  'traefik.sysusers')
 noextract=("${pkgname}-${pkgver}.tar.gz")
 sha512sums=('f23a58632cbef5c3326b464f9c85f59f2d29ed799d392da544f66c40113e3f08b504c35867479603c697c4ee660401ae2ac4596288bcb9de348ddbe597dea45c'
-            '474dc8274d160bf46a46edf8855378331521b108a767345fb8cb201f23576ceadbee81560d15cf98cac3a978eb24b49f951524da828ffda720797f7ab38bd49c'
+            '25ab1113bb69936c443fe49d5d3da7d39171fc82e8fa06f46ed4e2dfcaa89685d50ca50b58c32215852d79e5c8d4736a287c15b75420c78a853c51502cb2641a'
             '5fecfed5df77bf28c2c976ebaebedb030904d41509e740821140a4889bda20327f416e78f8d19b0ee78c8bc422d1907ce05ef3562e4d3e36ddfbdbea5e860b2a')
 
 prepare() {
@@ -26,10 +26,15 @@
 }
 
 build() {
+  export CGO_CPPFLAGS="${CPPFLAGS}"
+  export CGO_CFLAGS="${CFLAGS}"
+  export CGO_CXXFLAGS="${CXXFLAGS}"
+  export CGO_LDFLAGS="${LDFLAGS}"
+  export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
   cd "${srcdir}/${pkgname}-${pkgver}"
   go generate
   cd cmd/traefik
-  go build -trimpath -ldflags "-extldflags ${LDFLAGS}"
+  go build
 }
 
 check() {
@@ -43,4 +48,7 @@
   install -Dm644 LICENSE.md "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
   install -Dm644 "${srcdir}/traefik.service" "${pkgdir}/usr/lib/systemd/system/traefik.service"
   install -Dm644 "${srcdir}/traefik.sysusers" "${pkgdir}/usr/lib/sysusers.d/traefik.conf"
+  # create empty acme.json file, otherwise the service file will fail
+  mkdir -p "${pkgdir}/etc/traefik/"
+  touch "${pkgdir}/etc/traefik/acme.json"
 }

Modified: traefik.service
===================================================================
--- traefik.service	2020-06-27 16:01:47 UTC (rev 654961)
+++ traefik.service	2020-06-27 16:11:59 UTC (rev 654962)
@@ -3,7 +3,6 @@
 Documentation=https://docs.traefik.io
 After=network-online.target
 AssertFileIsExecutable=/usr/bin/traefik
-AssertPathExists=/etc/traefik/traefik.toml
 
 [Service]
 # Run traefik as its own user (create new user with: useradd -r -s /bin/false -U -M traefik)
@@ -12,7 +11,7 @@
 
 # configure service behavior
 Type=notify
-ExecStart=/usr/bin/traefik --configFile=/etc/traefik/traefik.toml
+ExecStart=/usr/bin/traefik
 Restart=always
 WatchdogSec=1s
 



More information about the arch-commits mailing list