mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-10 20:32:54 +00:00
pkgs: remove git hash from version
When a repository holds more than one kata version it is difficult to ask dnf or zypper for a kata version because the version includes a git commit. This commit removes the sha from the package version. Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
This commit is contained in:
parent
e73473fc75
commit
f8189fa9be
@ -1,9 +1,6 @@
|
|||||||
%define version @VERSION@
|
|
||||||
%define release @RELEASE@
|
|
||||||
|
|
||||||
Name: kata-containers-image
|
Name: kata-containers-image
|
||||||
Version: %{version}
|
Version: @VERSION@
|
||||||
Release: %{release}.<B_CNT>
|
Release: @RELEASE@
|
||||||
License: Artistic-1.0 BSD-3-Clause BSD-3-Clause-Kata BSD-4-Clause-UC GFDL-1.3 GPL-2.0 GPL-2.0+ GPL-3.0 GPL-3.0+ LGPL-2.0 LGPL-2.0+ LGPL-2.1 LGPL-3.0+ MIT MPL-2.0 Public-Domain
|
License: Artistic-1.0 BSD-3-Clause BSD-3-Clause-Kata BSD-4-Clause-UC GFDL-1.3 GPL-2.0 GPL-2.0+ GPL-3.0 GPL-3.0+ LGPL-2.0 LGPL-2.0+ LGPL-2.1 LGPL-3.0+ MIT MPL-2.0 Public-Domain
|
||||||
Summary: Kata Containers Image
|
Summary: Kata Containers Image
|
||||||
Url: https://github.com/kata-containers/osbuilder
|
Url: https://github.com/kata-containers/osbuilder
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<param name="scm">git</param>
|
<param name="scm">git</param>
|
||||||
<param name="url">https://github.com/kata-containers/ksm-throttler.git</param>
|
<param name="url">https://github.com/kata-containers/ksm-throttler.git</param>
|
||||||
<param name="filename">kata-ksm-throttler</param>
|
<param name="filename">kata-ksm-throttler</param>
|
||||||
<param name="versionformat">@VERSION@.git+@HASH@</param>
|
<param name="versionformat">@VERSION@</param>
|
||||||
<param name="revision">@HASH@</param>
|
<param name="revision">@HASH@</param>
|
||||||
</service>
|
</service>
|
||||||
<service name="recompress">
|
<service name="recompress">
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
Format: 3.0 (quilt)
|
Format: 3.0 (quilt)
|
||||||
Source: kata-ksm-throttler
|
Source: kata-ksm-throttler
|
||||||
Version: @VERSION@.git+@HASH@-@RELEASE@
|
Version: @VERSION@-@RELEASE@
|
||||||
Section: devel
|
Section: devel
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Maintainer: Kata containers team <https://github.com/kata-containers/>
|
Maintainer: Kata containers team <https://github.com/kata-containers/>
|
||||||
Standards-Version: 3.9.6
|
Standards-Version: 3.9.6
|
||||||
Homepage: https://katacontainers.io
|
Homepage: https://katacontainers.io
|
||||||
Build-Depends: dh-make, git, ca-certificates, execstack, devscripts, debhelper, build-essential, dh-autoreconf, make, pkg-config, dh-systemd, systemd
|
Build-Depends: dh-make, git, ca-certificates, execstack, devscripts, debhelper, build-essential, dh-autoreconf, make, pkg-config, dh-systemd, systemd
|
||||||
Debtransform-Tar: kata-ksm-throttler-@VERSION@.git+@HASH@.tar.gz
|
Debtransform-Tar: kata-ksm-throttler-@VERSION@.tar.gz
|
||||||
|
|
||||||
Package: kata-ksm-throttler
|
Package: kata-ksm-throttler
|
||||||
Architecture: @deb_arch@
|
Architecture: @deb_arch@
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
%define debug_package %{nil}
|
%define debug_package %{nil}
|
||||||
|
|
||||||
Name: kata-ksm-throttler
|
Name: kata-ksm-throttler
|
||||||
Version: @VERSION@.git+@HASH@
|
Version: @VERSION@
|
||||||
Release: @RELEASE@.<B_CNT>
|
Release: @RELEASE@
|
||||||
Source0: %{name}-%{version}.tar.gz
|
Source0: %{name}-%{version}.tar.gz
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
Summary : No detailed summary available
|
Summary : No detailed summary available
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
Name: kata-linux-container
|
Name: kata-linux-container
|
||||||
Version: @VERSION@.@CONFIG_VERSION@
|
Version: @VERSION@.@CONFIG_VERSION@
|
||||||
Release: @RELEASE@.<B_CNT>
|
Release: @RELEASE@
|
||||||
License: GPL-2.0
|
License: GPL-2.0
|
||||||
Summary: The Linux kernel optimized for running inside a container
|
Summary: The Linux kernel optimized for running inside a container
|
||||||
Group: System/Kernel
|
Group: System/Kernel
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<param name="scm">git</param>
|
<param name="scm">git</param>
|
||||||
<param name="url">https://github.com/kata-containers/proxy.git</param>
|
<param name="url">https://github.com/kata-containers/proxy.git</param>
|
||||||
<param name="filename">kata-proxy</param>
|
<param name="filename">kata-proxy</param>
|
||||||
<param name="versionformat">@VERSION@+git.@HASH@</param>
|
<param name="versionformat">@VERSION@</param>
|
||||||
<param name="revision">@HASH@</param>
|
<param name="revision">@HASH@</param>
|
||||||
</service>
|
</service>
|
||||||
<service name="recompress">
|
<service name="recompress">
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
format: 3.0 (quilt)
|
format: 3.0 (quilt)
|
||||||
Source: kata-proxy
|
Source: kata-proxy
|
||||||
Version: @VERSION@+git.@HASH@-@RELEASE@
|
Version: @VERSION@-@RELEASE@
|
||||||
Section: devel
|
Section: devel
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Maintainer: Kata containers team <https://github.com/kata-containers/>
|
Maintainer: Kata containers team <https://github.com/kata-containers/>
|
||||||
Standards-Version: 3.9.6
|
Standards-Version: 3.9.6
|
||||||
Build-Depends: dh-make, git, ca-certificates, execstack, devscripts, debhelper, build-essential, dh-autoreconf, make
|
Build-Depends: dh-make, git, ca-certificates, execstack, devscripts, debhelper, build-essential, dh-autoreconf, make
|
||||||
Homepage: https://katacontainers.io
|
Homepage: https://katacontainers.io
|
||||||
Debtransform-Tar: kata-proxy-@VERSION@+git.@HASH@.tar.gz
|
Debtransform-Tar: kata-proxy-@VERSION@.tar.gz
|
||||||
|
|
||||||
Package: kata-proxy
|
Package: kata-proxy
|
||||||
Architecture: @deb_arch@
|
Architecture: @deb_arch@
|
||||||
|
@ -10,8 +10,8 @@
|
|||||||
|
|
||||||
%undefine _missing_build_ids_terminate_build
|
%undefine _missing_build_ids_terminate_build
|
||||||
Name: kata-proxy
|
Name: kata-proxy
|
||||||
Version: @VERSION@+git.@HASH@
|
Version: @VERSION@
|
||||||
Release: @RELEASE@.<B_CNT>
|
Release: @RELEASE@
|
||||||
Source0: %{name}-%{version}.tar.gz
|
Source0: %{name}-%{version}.tar.gz
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
BuildRequires: pkgconfig(systemd)
|
BuildRequires: pkgconfig(systemd)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
%global qemu_lite_hash @QEMU_LITE_HASH@
|
%global qemu_lite_hash @QEMU_LITE_HASH@
|
||||||
Name: qemu-lite
|
Name: qemu-lite
|
||||||
Version: @VERSION@+git.%{qemu_lite_hash}
|
Version: @VERSION@+git.%{qemu_lite_hash}
|
||||||
Release: @RELEASE@.<B_CNT>
|
Release: @RELEASE@
|
||||||
Source0: %{name}-%{version}.tar.gz
|
Source0: %{name}-%{version}.tar.gz
|
||||||
Source1: qemu-lite-rpmlintrc
|
Source1: qemu-lite-rpmlintrc
|
||||||
Source2: configure-hypervisor.sh
|
Source2: configure-hypervisor.sh
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
%global qemu_vanilla_hash @QEMU_VANILLA_HASH@
|
%global qemu_vanilla_hash @QEMU_VANILLA_HASH@
|
||||||
Name: qemu-vanilla
|
Name: qemu-vanilla
|
||||||
Version: @VERSION@+git.%{qemu_vanilla_hash}
|
Version: @VERSION@+git.%{qemu_vanilla_hash}
|
||||||
Release: @RELEASE@.<B_CNT>
|
Release: @RELEASE@
|
||||||
Source0: %{name}-%{version}.tar.gz
|
Source0: %{name}-%{version}.tar.gz
|
||||||
Source1: qemu-vanilla-rpmlintrc
|
Source1: qemu-vanilla-rpmlintrc
|
||||||
Source2: configure-hypervisor.sh
|
Source2: configure-hypervisor.sh
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<param name="url">https://github.com/kata-containers/runtime.git</param>
|
<param name="url">https://github.com/kata-containers/runtime.git</param>
|
||||||
<param name="filename">kata-runtime</param>
|
<param name="filename">kata-runtime</param>
|
||||||
<!--- versionformat defines the name of the tarball. -->
|
<!--- versionformat defines the name of the tarball. -->
|
||||||
<param name="versionformat">@VERSION@+git.@HASH@</param>
|
<param name="versionformat">@VERSION@</param>
|
||||||
<param name="revision">@HASH@</param>
|
<param name="revision">@HASH@</param>
|
||||||
</service>
|
</service>
|
||||||
<service name="recompress">
|
<service name="recompress">
|
||||||
|
@ -2,14 +2,14 @@ Format: 3.0 (quilt)
|
|||||||
Source: kata-runtime
|
Source: kata-runtime
|
||||||
# Version is expected to be started with a digit following by an alphanumeric string
|
# Version is expected to be started with a digit following by an alphanumeric string
|
||||||
# e.g. 1.0.0+git.1234567-1
|
# e.g. 1.0.0+git.1234567-1
|
||||||
Version: @VERSION@+git.@HASH@-@RELEASE@
|
Version: @VERSION@-@RELEASE@
|
||||||
Section: devel
|
Section: devel
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Maintainer: Kata containers team <https://github.com/kata-containers/>
|
Maintainer: Kata containers team <https://github.com/kata-containers/>
|
||||||
Standards-Version: 3.9.6
|
Standards-Version: 3.9.6
|
||||||
Build-Depends: dh-make, git, ca-certificates, execstack, devscripts, debhelper, build-essential, dh-autoreconf, make
|
Build-Depends: dh-make, git, ca-certificates, execstack, devscripts, debhelper, build-essential, dh-autoreconf, make
|
||||||
Homepage: https://katacontainers.io
|
Homepage: https://katacontainers.io
|
||||||
Debtransform-Tar: kata-runtime-@VERSION@+git.@HASH@.tar.gz
|
Debtransform-Tar: kata-runtime-@VERSION@.tar.gz
|
||||||
|
|
||||||
Package: kata-runtime
|
Package: kata-runtime
|
||||||
Architecture: @deb_arch@
|
Architecture: @deb_arch@
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
Name: kata-runtime
|
Name: kata-runtime
|
||||||
# Version is expected to be started with a digit following by an alphanumeric string
|
# Version is expected to be started with a digit following by an alphanumeric string
|
||||||
# e.g. 1.0.0+git.1234567
|
# e.g. 1.0.0+git.1234567
|
||||||
Version: @VERSION@+git.@HASH@
|
Version: @VERSION@
|
||||||
Release: @RELEASE@.<B_CNT>
|
Release: @RELEASE@
|
||||||
Source0: %{name}-%{version}.tar.gz
|
Source0: %{name}-%{version}.tar.gz
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
Summary : No detailed summary available
|
Summary : No detailed summary available
|
||||||
|
@ -45,33 +45,26 @@ cli "$@"
|
|||||||
|
|
||||||
# Package depedencies
|
# Package depedencies
|
||||||
info "requires:"
|
info "requires:"
|
||||||
PROXY_RELEASE=$(get_obs_pkg_release "home:${OBS_PROJECT}:${OBS_SUBPROJECT}/proxy")
|
PROXY_REQUIRED_VERESION=$(pkg_version "${kata_proxy_version}" "" "")
|
||||||
PROXY_REQUIRED_VERESION=$(pkg_version "${kata_proxy_version}" "${PROXY_RELEASE}" "${kata_proxy_hash}")
|
|
||||||
info "proxy ${PROXY_REQUIRED_VERESION}"
|
info "proxy ${PROXY_REQUIRED_VERESION}"
|
||||||
|
|
||||||
SHIM_RELEASE=$(get_obs_pkg_release "home:${OBS_PROJECT}:${OBS_SUBPROJECT}/shim")
|
SHIM_REQUIRED_VERSION=$(pkg_version "${kata_shim_version}" "" "")
|
||||||
SHIM_REQUIRED_VERSION=$(pkg_version "${kata_shim_version}" "${SHIM_RELEASE}" "${kata_shim_hash}")
|
|
||||||
info "shim ${SHIM_REQUIRED_VERSION}"
|
info "shim ${SHIM_REQUIRED_VERSION}"
|
||||||
|
|
||||||
KERNEL_RELEASE=$(get_obs_pkg_release "home:${OBS_PROJECT}:${OBS_SUBPROJECT}/linux-container")
|
|
||||||
KERNEL_CONFIG_VERSION=$(cat "${SCRIPT_DIR}/../../kernel/kata_config_version")
|
KERNEL_CONFIG_VERSION=$(cat "${SCRIPT_DIR}/../../kernel/kata_config_version")
|
||||||
KERNEL_REQUIRED_VERSION=$(pkg_version "${kernel_version}.${KERNEL_CONFIG_VERSION}" "${KERNEL_RELEASE}" "")
|
KERNEL_REQUIRED_VERSION=$(pkg_version "${kernel_version}.${KERNEL_CONFIG_VERSION}" "" "")
|
||||||
info "kata-linux-container ${KERNEL_REQUIRED_VERSION}"
|
info "kata-linux-container ${KERNEL_REQUIRED_VERSION}"
|
||||||
|
|
||||||
KSM_THROTTLER_RELEASE=$(get_obs_pkg_release "home:${OBS_PROJECT}:${OBS_SUBPROJECT}/ksm-throttler")
|
KSM_THROTTLER_REQUIRED_VERSION=$(pkg_version "${kata_ksm_throttler_version}" "" "")
|
||||||
KSM_THROTTLER_REQUIRED_VERSION=$(pkg_version "${kata_ksm_throttler_version}" "${KSM_THROTTLER_RELEASE}" "${kata_ksm_throttler_hash}")
|
|
||||||
info "ksm-throttler ${KSM_THROTTLER_REQUIRED_VERSION}"
|
info "ksm-throttler ${KSM_THROTTLER_REQUIRED_VERSION}"
|
||||||
|
|
||||||
KATA_CONTAINERS_IMAGE_RELEASE=$(get_obs_pkg_release "home:${OBS_PROJECT}:${OBS_SUBPROJECT}/kata-containers-image")
|
KATA_IMAGE_REQUIRED_VERSION=$(pkg_version "${kata_osbuilder_version}" "" "")
|
||||||
KATA_IMAGE_REQUIRED_VERSION=$(pkg_version "${kata_osbuilder_version}" "${KATA_CONTAINERS_IMAGE_RELEASE}" "")
|
|
||||||
info "image ${KATA_IMAGE_REQUIRED_VERSION}"
|
info "image ${KATA_IMAGE_REQUIRED_VERSION}"
|
||||||
|
|
||||||
KATA_CONTAINERS_QEMU_LITE_RELEASE=$(get_obs_pkg_release "home:${OBS_PROJECT}:${OBS_SUBPROJECT}/qemu-lite")
|
KATA_QEMU_LITE_REQUIRED_VERSION=$(pkg_version "${qemu_lite_version}" "" "${qemu_lite_hash}")
|
||||||
KATA_QEMU_LITE_REQUIRED_VERSION=$(pkg_version "${qemu_lite_version}" "${KATA_CONTAINERS_QEMU_LITE_RELEASE}" "${qemu_lite_hash}")
|
|
||||||
info "qemu-lite ${KATA_QEMU_LITE_REQUIRED_VERSION}"
|
info "qemu-lite ${KATA_QEMU_LITE_REQUIRED_VERSION}"
|
||||||
|
|
||||||
KATA_CONTAINERS_QEMU_VANILLA_RELEASE=$(get_obs_pkg_release "home:${OBS_PROJECT}:${OBS_SUBPROJECT}/qemu-vanilla")
|
KATA_QEMU_VANILLA_REQUIRED_VERSION=$(pkg_version "${qemu_vanilla_version}" "" "${qemu_vanilla_hash}")
|
||||||
KATA_QEMU_VANILLA_REQUIRED_VERSION=$(pkg_version "${qemu_vanilla_version}" "${KATA_CONTAINERS_QEMU_VANILLA_RELEASE}" "${qemu_vanilla_hash}")
|
|
||||||
info "qemu-vanilla ${KATA_QEMU_VANILLA_REQUIRED_VERSION}"
|
info "qemu-vanilla ${KATA_QEMU_VANILLA_REQUIRED_VERSION}"
|
||||||
|
|
||||||
PROJECT_REPO=${PROJECT_REPO:-home:${OBS_PROJECT}:${OBS_SUBPROJECT}/runtime}
|
PROJECT_REPO=${PROJECT_REPO:-home:${OBS_PROJECT}:${OBS_SUBPROJECT}/runtime}
|
||||||
|
@ -291,14 +291,16 @@ function pkg_version() {
|
|||||||
local pkg_release="$2"
|
local pkg_release="$2"
|
||||||
local commit_id="$3"
|
local commit_id="$3"
|
||||||
[ -n "${project_version}" ] || die "${FUNCNAME}: need version"
|
[ -n "${project_version}" ] || die "${FUNCNAME}: need version"
|
||||||
[ -n "${pkg_release}" ] || die "${FUNCNAME}: pkg release is needed"
|
|
||||||
|
|
||||||
pkg_version="${project_version}"
|
pkg_version="${project_version}"
|
||||||
|
|
||||||
if [ -n "$commit_id" ]; then
|
if [ -n "$commit_id" ]; then
|
||||||
pkg_version+="+git.${commit_id:0:7}"
|
pkg_version+="+git.${commit_id:0:7}"
|
||||||
fi
|
fi
|
||||||
echo "$pkg_version-${pkg_release}"
|
if [ -n "$pkg_release" ]; then
|
||||||
|
pkg_version+="-${pkg_release}"
|
||||||
|
fi
|
||||||
|
echo "$pkg_version"
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_obs_pkg_release() {
|
function get_obs_pkg_release() {
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<param name="scm">git</param>
|
<param name="scm">git</param>
|
||||||
<param name="url">https://github.com/kata-containers/shim.git</param>
|
<param name="url">https://github.com/kata-containers/shim.git</param>
|
||||||
<param name="filename">kata-shim</param>
|
<param name="filename">kata-shim</param>
|
||||||
<param name="versionformat">@VERSION@+git.@HASH@</param>
|
<param name="versionformat">@VERSION@</param>
|
||||||
<param name="revision">@HASH@</param>
|
<param name="revision">@HASH@</param>
|
||||||
</service>
|
</service>
|
||||||
<service name="recompress">
|
<service name="recompress">
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
Format: 3.0 (quilt)
|
Format: 3.0 (quilt)
|
||||||
Source: kata-shim
|
Source: kata-shim
|
||||||
Version: @VERSION@+git.@HASH@-@RELEASE@
|
Version: @VERSION@-@RELEASE@
|
||||||
Section: devel
|
Section: devel
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Maintainer: Kata containers team <https://github.com/kata-containers/>
|
Maintainer: Kata containers team <https://github.com/kata-containers/>
|
||||||
Standards-Version: 3.9.6
|
Standards-Version: 3.9.6
|
||||||
Build-Depends: debhelper (>= 9), git, ca-certificates, execstack, devscripts, dh-make
|
Build-Depends: debhelper (>= 9), git, ca-certificates, execstack, devscripts, dh-make
|
||||||
Homepage: https://katacontainers.io
|
Homepage: https://katacontainers.io
|
||||||
Debtransform-Tar: kata-shim-@VERSION@+git.@HASH@.tar.gz
|
Debtransform-Tar: kata-shim-@VERSION@.tar.gz
|
||||||
|
|
||||||
Package: kata-shim
|
Package: kata-shim
|
||||||
Architecture: @deb_arch@
|
Architecture: @deb_arch@
|
||||||
|
@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
%undefine _missing_build_ids_terminate_build
|
%undefine _missing_build_ids_terminate_build
|
||||||
Name: kata-shim
|
Name: kata-shim
|
||||||
Version: @VERSION@+git.@HASH@
|
Version: @VERSION@
|
||||||
Release: @RELEASE@.<B_CNT>
|
Release: @RELEASE@
|
||||||
Summary : No detailed summary available
|
Summary : No detailed summary available
|
||||||
Group : Development/Tools
|
Group : Development/Tools
|
||||||
License : Apache-2.0
|
License : Apache-2.0
|
||||||
|
Loading…
Reference in New Issue
Block a user