From 87b08e414f498a6d0f670fb43318aa6f1450fde4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20F=20Bj=C3=B6rklund?= Date: Tue, 9 Feb 2021 19:42:47 +0100 Subject: [PATCH 1/2] Make sure to update the package metadata The revision/release was hardcoded as 0 --- Makefile | 3 ++- installers/linux/rpm/minikube_rpm_template/minikube.spec | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index fd98bd8c797d..c8a0e32c55eb 100644 --- a/Makefile +++ b/Makefile @@ -506,7 +506,7 @@ out/minikube_$(DEB_VERSION)-$(DEB_REVISION)_%.deb: out/minikube-linux-% $(eval DEB_PACKAGING_DIRECTORY_$*=$(shell mktemp -d --suffix ".minikube_$(DEB_VERSION)-$*-deb")) cp -r installers/linux/deb/minikube_deb_template/* $(DEB_PACKAGING_DIRECTORY_$*)/ chmod 0755 $(DEB_PACKAGING_DIRECTORY_$*)/DEBIAN - sed -E -i 's/--VERSION--/'$(DEB_VERSION)'/g' $(DEB_PACKAGING_DIRECTORY_$*)/DEBIAN/control + sed -E -i 's/--VERSION--/'$(DEB_VERSION)-$(DEB_REVISION)'/g' $(DEB_PACKAGING_DIRECTORY_$*)/DEBIAN/control sed -E -i 's/--ARCH--/'$*'/g' $(DEB_PACKAGING_DIRECTORY_$*)/DEBIAN/control if [ "$*" = "amd64" ]; then \ @@ -530,6 +530,7 @@ out/minikube-$(RPM_VERSION)-0.%.rpm: out/minikube-linux-% $(eval RPM_PACKAGING_DIRECTORY_$*=$(shell mktemp -d --suffix ".minikube_$(RPM_VERSION)-$*-rpm")) cp -r installers/linux/rpm/minikube_rpm_template/* $(RPM_PACKAGING_DIRECTORY_$*)/ sed -E -i 's/--VERSION--/'$(RPM_VERSION)'/g' $(RPM_PACKAGING_DIRECTORY_$*)/minikube.spec + sed -E -i 's/--RELEASE--/'$(RPM_REVISION)'/g' $(RPM_PACKAGING_DIRECTORY_$*)/minikube.spec sed -E -i 's|--OUT--|'$(PWD)/out'|g' $(RPM_PACKAGING_DIRECTORY_$*)/minikube.spec rpmbuild -bb -D "_rpmdir $(PWD)/out" --target $* \ $(RPM_PACKAGING_DIRECTORY_$*)/minikube.spec diff --git a/installers/linux/rpm/minikube_rpm_template/minikube.spec b/installers/linux/rpm/minikube_rpm_template/minikube.spec index 01868349ed56..9c9874ca6e3a 100644 --- a/installers/linux/rpm/minikube_rpm_template/minikube.spec +++ b/installers/linux/rpm/minikube_rpm_template/minikube.spec @@ -1,6 +1,6 @@ Name: minikube Version: --VERSION-- -Release: 0 +Release: --RELEASE-- Summary: Run Kubernetes locally License: ASL 2.0 Group: Development/Tools From 4cdf2c73cce3b482f998abee626e4100ed8a5e15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20F=20Bj=C3=B6rklund?= Date: Mon, 22 Feb 2021 20:24:47 +0100 Subject: [PATCH 2/2] Use the same template variables everywhere And let the template decide where they go --- Makefile | 5 +++-- installers/linux/deb/minikube_deb_template/DEBIAN/control | 2 +- installers/linux/rpm/minikube_rpm_template/minikube.spec | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index c8a0e32c55eb..54fd94c101a9 100644 --- a/Makefile +++ b/Makefile @@ -506,7 +506,8 @@ out/minikube_$(DEB_VERSION)-$(DEB_REVISION)_%.deb: out/minikube-linux-% $(eval DEB_PACKAGING_DIRECTORY_$*=$(shell mktemp -d --suffix ".minikube_$(DEB_VERSION)-$*-deb")) cp -r installers/linux/deb/minikube_deb_template/* $(DEB_PACKAGING_DIRECTORY_$*)/ chmod 0755 $(DEB_PACKAGING_DIRECTORY_$*)/DEBIAN - sed -E -i 's/--VERSION--/'$(DEB_VERSION)-$(DEB_REVISION)'/g' $(DEB_PACKAGING_DIRECTORY_$*)/DEBIAN/control + sed -E -i 's/--VERSION--/'$(DEB_VERSION)'/g' $(DEB_PACKAGING_DIRECTORY_$*)/DEBIAN/control + sed -E -i 's/--REVISION--/'$(DEB_REVISION)'/g' $(DEB_PACKAGING_DIRECTORY_$*)/DEBIAN/control sed -E -i 's/--ARCH--/'$*'/g' $(DEB_PACKAGING_DIRECTORY_$*)/DEBIAN/control if [ "$*" = "amd64" ]; then \ @@ -530,7 +531,7 @@ out/minikube-$(RPM_VERSION)-0.%.rpm: out/minikube-linux-% $(eval RPM_PACKAGING_DIRECTORY_$*=$(shell mktemp -d --suffix ".minikube_$(RPM_VERSION)-$*-rpm")) cp -r installers/linux/rpm/minikube_rpm_template/* $(RPM_PACKAGING_DIRECTORY_$*)/ sed -E -i 's/--VERSION--/'$(RPM_VERSION)'/g' $(RPM_PACKAGING_DIRECTORY_$*)/minikube.spec - sed -E -i 's/--RELEASE--/'$(RPM_REVISION)'/g' $(RPM_PACKAGING_DIRECTORY_$*)/minikube.spec + sed -E -i 's/--REVISION--/'$(RPM_REVISION)'/g' $(RPM_PACKAGING_DIRECTORY_$*)/minikube.spec sed -E -i 's|--OUT--|'$(PWD)/out'|g' $(RPM_PACKAGING_DIRECTORY_$*)/minikube.spec rpmbuild -bb -D "_rpmdir $(PWD)/out" --target $* \ $(RPM_PACKAGING_DIRECTORY_$*)/minikube.spec diff --git a/installers/linux/deb/minikube_deb_template/DEBIAN/control b/installers/linux/deb/minikube_deb_template/DEBIAN/control index 3b29fe80943c..50c034564c40 100644 --- a/installers/linux/deb/minikube_deb_template/DEBIAN/control +++ b/installers/linux/deb/minikube_deb_template/DEBIAN/control @@ -1,5 +1,5 @@ Package: minikube -Version: --VERSION-- +Version: --VERSION-----REVISION-- Section: base Priority: optional Architecture: --ARCH-- diff --git a/installers/linux/rpm/minikube_rpm_template/minikube.spec b/installers/linux/rpm/minikube_rpm_template/minikube.spec index 9c9874ca6e3a..bed06d212bb9 100644 --- a/installers/linux/rpm/minikube_rpm_template/minikube.spec +++ b/installers/linux/rpm/minikube_rpm_template/minikube.spec @@ -1,6 +1,6 @@ Name: minikube Version: --VERSION-- -Release: --RELEASE-- +Release: --REVISION-- Summary: Run Kubernetes locally License: ASL 2.0 Group: Development/Tools