diff --git a/Makefile b/Makefile index 66b3ba0686917..42d8d98bc2e86 100644 --- a/Makefile +++ b/Makefile @@ -266,16 +266,16 @@ br_web: @cd br/web && npm install && npm run build build_br: - CGO_ENABLED=1 $(GOBUILD) $(RACE_FLAG) -ldflags '$(LDFLAGS) $(CHECK_FLAG)' -o $(BR_BIN) br/cmd/br/*.go + CGO_ENABLED=1 $(GOBUILD) $(RACE_FLAG) -ldflags '$(LDFLAGS) $(CHECK_FLAG)' -o $(BR_BIN) ./br/cmd/br build_lightning_for_web: CGO_ENABLED=1 $(GOBUILD) -tags dev $(RACE_FLAG) -ldflags '$(LDFLAGS) $(CHECK_FLAG)' -o $(LIGHTNING_BIN) br/cmd/tidb-lightning/main.go build_lightning: - CGO_ENABLED=1 $(GOBUILD) $(RACE_FLAG) -ldflags '$(LDFLAGS) $(CHECK_FLAG)' -o $(LIGHTNING_BIN) br/cmd/tidb-lightning/main.go + CGO_ENABLED=1 $(GOBUILD) $(RACE_FLAG) -ldflags '$(LDFLAGS) $(CHECK_FLAG)' -o $(LIGHTNING_BIN) ./br/cmd/tidb-lightning build_lightning-ctl: - CGO_ENABLED=1 $(GOBUILD) $(RACE_FLAG) -ldflags '$(LDFLAGS) $(CHECK_FLAG)' -o $(LIGHTNING_CTL_BIN) br/cmd/tidb-lightning-ctl/main.go + CGO_ENABLED=1 $(GOBUILD) $(RACE_FLAG) -ldflags '$(LDFLAGS) $(CHECK_FLAG)' -o $(LIGHTNING_CTL_BIN) ./br/cmd/tidb-lightning-ctl build_for_br_integration_test: @make failpoint-enable diff --git a/br/cmd/br/fips.go b/br/cmd/br/fips.go new file mode 100644 index 0000000000000..6d5e181a04022 --- /dev/null +++ b/br/cmd/br/fips.go @@ -0,0 +1,28 @@ +// Copyright 2023 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//go:build boringcrypto +// +build boringcrypto + +package main + +import ( + _ "crypto/tls/fipsonly" + + "github.com/pingcap/tidb/br/pkg/version/build" +) + +func init() { + build.ReleaseVersion += "-fips" +} diff --git a/br/cmd/tidb-lightning-ctl/fips.go b/br/cmd/tidb-lightning-ctl/fips.go new file mode 100644 index 0000000000000..6d5e181a04022 --- /dev/null +++ b/br/cmd/tidb-lightning-ctl/fips.go @@ -0,0 +1,28 @@ +// Copyright 2023 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//go:build boringcrypto +// +build boringcrypto + +package main + +import ( + _ "crypto/tls/fipsonly" + + "github.com/pingcap/tidb/br/pkg/version/build" +) + +func init() { + build.ReleaseVersion += "-fips" +} diff --git a/br/cmd/tidb-lightning/fips.go b/br/cmd/tidb-lightning/fips.go new file mode 100644 index 0000000000000..6d5e181a04022 --- /dev/null +++ b/br/cmd/tidb-lightning/fips.go @@ -0,0 +1,28 @@ +// Copyright 2023 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//go:build boringcrypto +// +build boringcrypto + +package main + +import ( + _ "crypto/tls/fipsonly" + + "github.com/pingcap/tidb/br/pkg/version/build" +) + +func init() { + build.ReleaseVersion += "-fips" +}