Skip to content

Commit ead93e9

Browse files
committed
TUN-5551: Internally published debian artifacts are now named just cloudflared even though they are FIPS compliant
This way we will force the adoption of FIPS compliant cloudflared without having to handle the transition for systems that already have it installed (since we were previously using new artifacts with fips suffix) nor without having to segregate the resulting binary name (since we were always generating a binary just called cloudflared from the unpacked debian archive to avoid having to change any automation that assumes the binary to be called just that).
1 parent 5f380f3 commit ead93e9

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

Makefile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,19 @@ MSI_VERSION := $(shell git tag -l --sort=v:refname | grep "w" | tail -1 | cut
33
#MSI_VERSION expects the format of the tag to be: (wX.X.X). Starts with the w character to not break cfsetup.
44
#e.g. w3.0.1 or w4.2.10. It trims off the w character when creating the MSI.
55

6-
ifeq ($(FIPS), true)
6+
ifeq ($(ORIGINAL_NAME), true)
7+
# Used for builds that want FIPS compilation but want the artifacts generated to still have the original name.
8+
BINARY_NAME := cloudflared
9+
else ifeq ($(FIPS), true)
10+
# Used for FIPS compliant builds that do not match the case above.
711
BINARY_NAME := cloudflared-fips
812
else
13+
# Used for all other (non-FIPS) builds.
914
BINARY_NAME := cloudflared
1015
endif
1116

1217
ifeq ($(NIGHTLY), true)
13-
# We do not release FIPS in NIGHTLY, so no need to consider that case here.
14-
DEB_PACKAGE_NAME := cloudflared-nightly
18+
DEB_PACKAGE_NAME := $(BINARY_NAME)-nightly
1519
NIGHTLY_FLAGS := --conflicts cloudflared --replaces cloudflared
1620
else
1721
DEB_PACKAGE_NAME := $(BINARY_NAME)
@@ -157,10 +161,6 @@ endef
157161
cloudflared-deb: cloudflared
158162
$(call build_package,deb)
159163

160-
.PHONY: cloudflared-internal-deb
161-
cloudflared-internal-deb: cloudflared-deb
162-
bash -c 'for f in cloudflared-fips_*.deb; do mv -- "$$f" "$${f/-fips/}"; done'
163-
164164
.PHONY: cloudflared-rpm
165165
cloudflared-rpm: cloudflared
166166
$(call build_package,rpm)

cfsetup.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ stretch: &stretch
9393
- export GOOS=linux
9494
- export GOARCH=amd64
9595
- export FIPS=true
96-
- make cloudflared-internal-deb
96+
- export ORIGINAL_NAME=true
97+
- make cloudflared-deb
9798
build-fips-internal-deb-nightly:
9899
build_dir: *build_dir
99100
builddeps: *build_fips_deb_deps
@@ -102,7 +103,8 @@ stretch: &stretch
102103
- export GOARCH=amd64
103104
- export NIGHTLY=true
104105
- export FIPS=true
105-
- make cloudflared-internal-deb
106+
- export ORIGINAL_NAME=true
107+
- make cloudflared-deb
106108
build-deb-arm64:
107109
build_dir: *build_dir
108110
builddeps: *build_deb_deps

0 commit comments

Comments
 (0)