diff --git a/.goreleaser.yml b/.goreleaser.yml index 8e23b6b7..7ec516b6 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -20,8 +20,8 @@ builds: nfpms: - - file_name_template: "{{ .ProjectName }}_{{ .Version }}.{{ .ShortCommit }}_{{ .Arch }}" - + file_name_template: >- + {{ .ConventionalFileName }} homepage: https://launchdarkly.com/ maintainer: LaunchDarkly description: LaunchDarkly Stream Relay Proxy @@ -32,23 +32,27 @@ nfpms: - deb - rpm - replacements: - 386: i386 + contents: + - src: linux/etc/ld-relay.conf + dst: /etc/ld-relay.conf + type: config + + - src: linux/etc/init/ld-relay.conf + dst: /etc/init/ld-relay.conf + packager: deb + + - src: linux/etc/system/ld-relay.service + dst: /usr/lib/systemd/system/ld-relay.service + packager: rpm - config_files: - "linux/etc/ld-relay.conf": "/etc/ld-relay.conf" overrides: deb: dependencies: - upstart - files: - "linux/etc/init/ld-relay.conf": "/etc/init/ld-relay.conf" rpm: dependencies: - systemd - files: - "linux/etc/system/ld-relay.service": "/usr/lib/systemd/system/ld-relay.service" release: disable: true # this disables releasing *to GitHub*; it will still push to Docker diff --git a/Dockerfile.centos-test b/Dockerfile.centos-test index a259ac11..d19efbaf 100644 --- a/Dockerfile.centos-test +++ b/Dockerfile.centos-test @@ -1,8 +1,8 @@ FROM centos -COPY dist/ld-relay*amd64.rpm . +COPY dist/ld-relay*x86_64.rpm . -RUN rpm -Uvh ld-relay*amd64.rpm +RUN rpm -Uvh ld-relay*x86_64.rpm RUN systemctl enable ld-relay.service diff --git a/Makefile b/Makefile index 515d93a5..8c7b6c79 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ GOLANGCI_LINT_VERSION=v1.48.0 LINTER=./bin/golangci-lint LINTER_VERSION_FILE=./bin/.golangci-lint-version-$(GOLANGCI_LINT_VERSION) -GORELEASER_VERSION=v0.141.0 +GORELEASER_VERSION=v1.15.2 SHELL=/bin/bash diff --git a/docs/metrics.md b/docs/metrics.md index 0ba4f471..3d875c53 100644 --- a/docs/metrics.md +++ b/docs/metrics.md @@ -4,7 +4,7 @@ You can configure the Relay Proxy to export statistics and route traces to Datadog, Stackdriver, and Prometheus. To learn about the available settings for each of these options, read [Configuration](./configuration.md). -The Relay Proxy suppors the following metrics: +The Relay Proxy supports the following metrics: - `connections`: The number of currently existing stream connections from SDKs to the Relay Proxy. - `newconnections`: The cumulative number of stream connections that have been made to the Relay Proxy since it started up. diff --git a/go.mod b/go.mod index 900ebe80..abe1a3fd 100644 --- a/go.mod +++ b/go.mod @@ -45,7 +45,7 @@ require ( github.com/prometheus/client_golang v1.11.1 // indirect; override to address CVE-2022-21698 github.com/stretchr/testify v1.7.0 go.opencensus.io v0.23.0 - golang.org/x/net v0.4.0 // indirect; override to address CVE-2022-41717 + golang.org/x/net v0.7.0 // indirect; override to address CVE-2022-41723 golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 gopkg.in/gcfg.v1 v1.2.3 gopkg.in/launchdarkly/go-server-sdk.v5 v5.9.0 @@ -109,8 +109,8 @@ require ( go.opentelemetry.io/otel/trace v0.19.0 // indirect golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c // indirect - golang.org/x/sys v0.3.0 // indirect; fixes CVE-2022-29526 - golang.org/x/text v0.5.0 // indirect; fixes CVE-2022-32149 + golang.org/x/sys v0.5.0 // indirect + golang.org/x/text v0.7.0 // indirect google.golang.org/api v0.43.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1 // indirect diff --git a/go.sum b/go.sum index e4d9bab7..57bf382f 100644 --- a/go.sum +++ b/go.sum @@ -580,8 +580,8 @@ golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211216030914-fe4d6282115f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU= -golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= +golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -669,8 +669,8 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ= -golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -680,8 +680,8 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM= -golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= diff --git a/linux/etc/init/ld-relay.conf b/linux/etc/init/ld-relay.conf index ea9b42e0..9bd68651 100644 --- a/linux/etc/init/ld-relay.conf +++ b/linux/etc/init/ld-relay.conf @@ -6,4 +6,4 @@ stop on runlevel [!2345] respawn respawn limit 5 2 -exec start-stop-daemon --start -c nobody --exec /usr/local/bin/ld-relay +exec start-stop-daemon --start -c nobody --exec /usr/bin/ld-relay diff --git a/linux/etc/system/ld-relay.service b/linux/etc/system/ld-relay.service index 35c88d53..0b44b0f5 100644 --- a/linux/etc/system/ld-relay.service +++ b/linux/etc/system/ld-relay.service @@ -3,7 +3,7 @@ Description=LaunchDarkly Relay Proxy [Service] Type=simple -ExecStart=/usr/local/bin/ld-relay +ExecStart=/usr/bin/ld-relay [Install] WantedBy=multi-user.target diff --git a/scripts/run-goreleaser.sh b/scripts/run-goreleaser.sh index 230f5d64..d0cf661a 100755 --- a/scripts/run-goreleaser.sh +++ b/scripts/run-goreleaser.sh @@ -6,7 +6,7 @@ # This also pushes the image to DockerHub unless we have specifically told it not to with # the --skip-publish option. -GORELEASER_VERSION=${GORELEASER_VERSION:-v0.141.0} +GORELEASER_VERSION=${GORELEASER_VERSION:-v1.15.2} # Get the lines added to the most recent changelog update (minus the first 2 lines) RELEASE_NOTES=`(GIT_EXTERNAL_DIFF='bash -c "diff --unchanged-line-format=\"\" $2 $5" || true' git log --ext-diff -1 --pretty= -p CHANGELOG.md)`