mirror of
https://github.com/minio/minio.git
synced 2025-01-23 12:43:16 -05:00
fix: building reorder-disks under darwin (#18053)
Also build debugging tools only in tests or with a specific target
This commit is contained in:
parent
b73699fad8
commit
c5279ec630
6
Makefile
6
Makefile
@ -45,7 +45,7 @@ lint-fix: getdeps ## runs golangci-lint suite of linters with automatic fixes
|
||||
@$(GOLANGCI) run --build-tags kqueue --timeout=10m --config ./.golangci.yml --fix
|
||||
|
||||
check: test
|
||||
test: verifiers build ## builds minio, runs linters, tests
|
||||
test: verifiers build build-debugging ## builds minio, runs linters, tests
|
||||
@echo "Running unit tests"
|
||||
@MINIO_API_REQUESTS_MAX=10000 CGO_ENABLED=0 go test -tags kqueue ./...
|
||||
|
||||
@ -128,10 +128,12 @@ verify-healing-inconsistent-versions: ## verify resolving inconsistent versions
|
||||
@GORACE=history_size=7 CGO_ENABLED=1 go build -race -tags kqueue -trimpath --ldflags "$(LDFLAGS)" -o $(PWD)/minio 1>/dev/null
|
||||
@(env bash $(PWD)/buildscripts/resolve-right-versions.sh)
|
||||
|
||||
build-debugging:
|
||||
@(env bash $(PWD)/docs/debugging/build.sh)
|
||||
|
||||
build: checks ## builds minio to $(PWD)
|
||||
@echo "Building minio binary to './minio'"
|
||||
@CGO_ENABLED=0 go build -tags kqueue -trimpath --ldflags "$(LDFLAGS)" -o $(PWD)/minio 1>/dev/null
|
||||
@(env bash $(PWD)/docs/debugging/build.sh)
|
||||
|
||||
hotfix-vars:
|
||||
$(eval LDFLAGS := $(shell MINIO_RELEASE="RELEASE" MINIO_HOTFIX="hotfix.$(shell git rev-parse --short HEAD)" go run buildscripts/gen-ldflags.go $(shell git describe --tags --abbrev=0 | \
|
||||
|
@ -99,10 +99,11 @@ func getMajorMinor(path string) (string, error) {
|
||||
return "", fmt.Errorf("unable to stat `%s`: %w", path, err)
|
||||
}
|
||||
|
||||
major := (stat.Dev & 0x00000000000fff00) >> 8
|
||||
major |= (stat.Dev & 0xfffff00000000000) >> 32
|
||||
minor := (stat.Dev & 0x00000000000000ff) >> 0
|
||||
minor |= (stat.Dev & 0x00000ffffff00000) >> 12
|
||||
devID := uint64(stat.Dev)
|
||||
major := (devID & 0x00000000000fff00) >> 8
|
||||
major |= (devID & 0xfffff00000000000) >> 32
|
||||
minor := (devID & 0x00000000000000ff) >> 0
|
||||
minor |= (devID & 0x00000ffffff00000) >> 12
|
||||
|
||||
return fmt.Sprintf("%d:%d", major, minor), nil
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user