From 28e1d2c08e6da8bc62b125eb768e4e43c31eca52 Mon Sep 17 00:00:00 2001 From: Alex Demidoff Date: Sun, 1 Dec 2024 00:36:56 +0300 Subject: [PATCH] PMM-13487 Remove redundant export in the specs --- .gitignore | 1 - build/local/build.sh | 8 ++++---- build/packages/rpm/server/SPECS/percona-qan-api2.spec | 3 +-- build/packages/rpm/server/SPECS/pmm-managed.spec | 1 - build/packages/rpm/server/SPECS/pmm-update.spec | 1 - build/packages/rpm/server/SPECS/vmproxy.spec | 1 - build/scripts/build-server-rpm | 3 +-- managed/Makefile | 6 +++--- 8 files changed, 9 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index 06eb2cfcf6..880c754531 100644 --- a/.gitignore +++ b/.gitignore @@ -9,7 +9,6 @@ .modules/ bin/ dist/ -build/ .env .netrc pmm-agent-dev.yaml diff --git a/build/local/build.sh b/build/local/build.sh index 1ada40d6dd..017151b2fb 100755 --- a/build/local/build.sh +++ b/build/local/build.sh @@ -8,15 +8,15 @@ Usage: $BASE_NAME [OPTIONS] Options: --init Clone the source, initialize directories, check for pre-requisites and exit --platform Build for a specific platform (defaults to linux/amd64) - --no-update Do not fetch the latest changes from the repo - --update-only Just fetch the latest changes from the repo and halt + --no-update Do not fetch the latest changes from the repo before building + --update-only Just fetch the latest changes from the repo and exit --client-only Build only PMM Client (client binaries + docker) --no-client Do not build PMM Client (this will use local cache) --no-client-docker Do not build PMM Client docker image (default) --log-file Save build logs to a file located at (defaults to $PWD/build.log) Note: the log file will get reset on every subsequent run --release-build Make it a release build (otherwise it's a feature build) - -d --debug Log output in debug mode, which also prints the commands + -d --debug Turn on a more verbose output mode, useful for troubleshooting -h --help Display help Please note, the script will perform the update of submodules by default on every run unless the '--no-update' option is specified. @@ -527,7 +527,7 @@ main() { echo echo "Done building PMM artifacts." echo --- - echo "Total execution time, sec: $(($(date +%s) - $START_TIME))" + echo "Total execution time: $(print_duration $(($(date +%s) - $START_TIME)))" echo --- cleanup diff --git a/build/packages/rpm/server/SPECS/percona-qan-api2.spec b/build/packages/rpm/server/SPECS/percona-qan-api2.spec index ef97785166..807cd5cf5e 100644 --- a/build/packages/rpm/server/SPECS/percona-qan-api2.spec +++ b/build/packages/rpm/server/SPECS/percona-qan-api2.spec @@ -31,7 +31,6 @@ Refer to PMM docs for more information - https://docs.percona.com/percona-monito %build export PMM_RELEASE_VERSION=%{full_pmm_version} export PMM_RELEASE_FULLCOMMIT=%{commit} -export PMM_RELEASE_BRANCH="" make -C qan-api2 release @@ -48,7 +47,7 @@ install -p -m 0755 ./bin/qan-api2 %{buildroot}%{_sbindir}/%{name} %doc qan-api2/README.md %changelog -* Wed Apr 1 2024 Alex Demidoff - 3.0.0-18 +* Mon Apr 1 2024 Alex Demidoff - 3.0.0-18 - PMM-12899 Use module and build cache * Mon Nov 7 2022 Alexander Tymchuk - 2.0.0-17 diff --git a/build/packages/rpm/server/SPECS/pmm-managed.spec b/build/packages/rpm/server/SPECS/pmm-managed.spec index e03f10da72..a8f5baa2c3 100644 --- a/build/packages/rpm/server/SPECS/pmm-managed.spec +++ b/build/packages/rpm/server/SPECS/pmm-managed.spec @@ -32,7 +32,6 @@ See PMM docs for more information. %build export PMM_RELEASE_VERSION=%{full_pmm_version} export PMM_RELEASE_FULLCOMMIT=%{commit} -export PMM_RELEASE_BRANCH="" make -C managed release diff --git a/build/packages/rpm/server/SPECS/pmm-update.spec b/build/packages/rpm/server/SPECS/pmm-update.spec index f23ac3c60b..8760b4b88a 100644 --- a/build/packages/rpm/server/SPECS/pmm-update.spec +++ b/build/packages/rpm/server/SPECS/pmm-update.spec @@ -33,7 +33,6 @@ BuildArch: noarch %build export PMM_RELEASE_VERSION=%{full_pmm_version} export PMM_RELEASE_FULLCOMMIT=%{commit} -export PMM_RELEASE_BRANCH="" make -C update release diff --git a/build/packages/rpm/server/SPECS/vmproxy.spec b/build/packages/rpm/server/SPECS/vmproxy.spec index 771aeae83f..dfe8f71fcd 100644 --- a/build/packages/rpm/server/SPECS/vmproxy.spec +++ b/build/packages/rpm/server/SPECS/vmproxy.spec @@ -32,7 +32,6 @@ optionally adds `extra_filters` query based on the provided configuration. %build export PMM_RELEASE_VERSION=%{full_pmm_version} export PMM_RELEASE_FULLCOMMIT=%{commit} -export PMM_RELEASE_BRANCH="" make -C vmproxy release diff --git a/build/scripts/build-server-rpm b/build/scripts/build-server-rpm index 64a84c7fb6..fa9663ab9e 100755 --- a/build/scripts/build-server-rpm +++ b/build/scripts/build-server-rpm @@ -170,9 +170,8 @@ build() { sleep 1 done - # Only these two specs have build dependencies + # Only grafana spec needs to install build dependencies if [[ ${spec_name} =~ ^grafana$ ]]; then - sleep 2s sudo yum-builddep -y SOURCES/${spec_name}.spec fi diff --git a/managed/Makefile b/managed/Makefile index ce6c7ae65c..e597d83a5c 100644 --- a/managed/Makefile +++ b/managed/Makefile @@ -3,7 +3,7 @@ default: help help: ## Display this help message @echo "Please use \`make \` where is one of:" @grep -h '^[a-zA-Z]' $(MAKEFILE_LIST) | \ - awk -F ':.*?## ' 'NF==2 {printf " %-26s%s\n", $$1, $$2}' + awk -F ':.*?## ' 'NF==2 {printf " %-30s%s\n", $$1, $$2}' @echo # `cut` is used to remove first `v` from `git describe` output @@ -38,10 +38,10 @@ clean: ## Remove generated files release: ## Build pmm-managed release binaries env CGO_ENABLED=0 go build -v $(PMM_LD_FLAGS) -o $(PMM_RELEASE_PATH)/ ./cmd/... -release-encryption-rotation: ## Build PMM encryption rotation tool +release-encryption-rotation: ## Build PMM encryption rotation tool env CGO_ENABLED=0 go build -v $(PMM_LD_FLAGS) -o $(PMM_RELEASE_PATH)/ ./cmd/pmm-encryption-rotation/... -release-starlark: +release-starlark: ## Build pmm-managed-starlark binaries env CGO_ENABLED=0 go build -v $(PMM_LD_FLAGS) -o $(PMM_RELEASE_PATH)/ ./cmd/pmm-managed-starlark/... $(PMM_RELEASE_PATH)/pmm-managed-starlark --version