add patch to fix version

remove unnecessary conditionals

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
This commit is contained in:
Lokesh Mandvekar 2022-02-21 12:59:45 -05:00
parent 7aacfca526
commit fc31a699bb
2 changed files with 47 additions and 2 deletions

46
fix-version.patch Normal file
View File

@ -0,0 +1,46 @@
From 49f8da7271ed9b9256a182aca004700047e271ed Mon Sep 17 00:00:00 2001
From: Matthew Heon <matthew.heon@pm.me>
Date: Wed, 16 Feb 2022 14:10:39 -0500
Subject: [PATCH] Bump to v4.0.0
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
---
test/apiv2/01-basic.at | 2 +-
version/version.go | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/test/apiv2/01-basic.at b/test/apiv2/01-basic.at
index 06db6278578..e4348a9a70e 100644
--- a/test/apiv2/01-basic.at
+++ b/test/apiv2/01-basic.at
@@ -19,7 +19,7 @@ for i in /version version; do
t GET $i 200 \
.Components[0].Name="Podman Engine" \
.Components[0].Details.APIVersion~4[0-9.-]\\+ \
- .Components[0].Details.MinAPIVersion=3.3.1 \
+ .Components[0].Details.MinAPIVersion=4.0.0 \
.Components[0].Details.Os=linux \
.ApiVersion=1.40 \
.MinAPIVersion=1.24 \
diff --git a/version/version.go b/version/version.go
index da74029677a..02d110198e3 100644
--- a/version/version.go
+++ b/version/version.go
@@ -27,7 +27,7 @@ const (
// NOTE: remember to bump the version at the top
// of the top-level README.md file when this is
// bumped.
-var Version = semver.MustParse("4.0.0-dev")
+var Version = semver.MustParse("4.0.0")
// See https://docs.docker.com/engine/api/v1.40/
// libpod compat handlers are expected to honor docker API versions
@@ -38,7 +38,7 @@ var Version = semver.MustParse("4.0.0-dev")
var APIVersion = map[Tree]map[Level]semver.Version{
Libpod: {
CurrentAPI: Version,
- MinimalAPI: semver.MustParse("3.3.1"),
+ MinimalAPI: semver.MustParse("4.0.0"),
},
Compat: {
CurrentAPI: semver.MustParse("1.40.0"),

View File

@ -46,10 +46,9 @@ ExclusiveArch: %{golang_arches}
Source0: %{git0}/archive/%{built_tag}.tar.gz
Source1: %{git_plugins}/archive/%{commit_plugins}/%{repo_plugins}-%{shortcommit_plugins}.tar.gz
Source2: %{git_gvproxy}/archive/%{commit_gvproxy}/%{repo_gvproxy}-%{shortcommit_gvproxy}.tar.gz
Patch0: fix-version.patch
Provides: %{name}-manpages = %{epoch}:%{version}-%{release}
%if 0%{?fedora} && ! 0%{?rhel}
BuildRequires: btrfs-progs-devel
%endif
BuildRequires: gcc
BuildRequires: golang >= 1.16.6
BuildRequires: glib2-devel