add shim v2 build swicth
Signed-off-by: wujing <wujing50@huawei.com>
This commit is contained in:
parent
0d40ac0e40
commit
fd01ebc54e
40
iSulad.spec
40
iSulad.spec
@ -1,7 +1,7 @@
|
||||
%global _version 2.0.10
|
||||
%global _release 1
|
||||
%global _release 3
|
||||
%global is_systemd 1
|
||||
%global enable_shimv2 0
|
||||
%global enable_shimv2 1
|
||||
|
||||
Name: iSulad
|
||||
Version: %{_version}
|
||||
@ -11,8 +11,6 @@ License: Mulan PSL v2
|
||||
URL: https://gitee.com/openeuler/iSulad
|
||||
Source: https://gitee.com/openeuler/iSulad/repository/archive/v%{version}.tar.gz
|
||||
BuildRoot: {_tmppath}/iSulad-%{version}
|
||||
ExclusiveArch: x86_64 aarch64
|
||||
|
||||
|
||||
%ifarch x86_64 aarch64
|
||||
Provides: libhttpclient.so()(64bit)
|
||||
@ -48,7 +46,7 @@ Requires: sqlite http-parser libseccomp
|
||||
Requires: libcap libselinux libwebsockets libarchive device-mapper
|
||||
Requires: systemd
|
||||
%if 0%{?enable_shimv2}
|
||||
Requires: lib-shim-v2
|
||||
Requires: lib-shim-v2
|
||||
%endif
|
||||
|
||||
%description
|
||||
@ -61,7 +59,6 @@ Runtime Daemon, written by C.
|
||||
%build
|
||||
mkdir -p build
|
||||
cd build
|
||||
|
||||
%if 0%{?enable_shimv2}
|
||||
%cmake -DDEBUG=ON -DLIB_INSTALL_DIR=%{_libdir} -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_SHIM_V2=ON ../
|
||||
%else
|
||||
@ -96,6 +93,7 @@ install -m 0644 ../src/daemon/modules/api/image_api.h %{buildroot}/%{_in
|
||||
|
||||
install -d $RPM_BUILD_ROOT/%{_sysconfdir}/isulad
|
||||
install -m 0640 ../src/contrib/config/daemon.json %{buildroot}/%{_sysconfdir}/isulad/daemon.json
|
||||
install -m 0440 ../src/contrib/config/daemon_constants.json %{buildroot}/%{_sysconfdir}/isulad/daemon_constants.json
|
||||
install -m 0640 ../src/contrib/config/seccomp_default.json %{buildroot}/%{_sysconfdir}/isulad/seccomp_default.json
|
||||
|
||||
install -d $RPM_BUILD_ROOT/%{_sysconfdir}/default/isulad
|
||||
@ -226,8 +224,32 @@ fi
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Thu Nov 11 2021 gaohuatao <gaohuatao@huawei.com> - 2.0.10-1
|
||||
- Type: sync from upstream
|
||||
* Tue Nov 16 2021 wujing <wujing50@huawei.com> - 2.0.10-3
|
||||
- Type: enhancement
|
||||
- ID: NA
|
||||
- SUG: NA
|
||||
- DESC: add shimv2 build switch
|
||||
|
||||
* Tue Nov 16 2021 wujing <wujing50@huawei.com> - 2.0.10-2
|
||||
- Type: bugfix
|
||||
- ID: NA
|
||||
- SUG: NA
|
||||
- DESC: remove build platform restrictions
|
||||
|
||||
* Tue Nov 09 2021 gaohuatao <gaohuatao@huawei.com> - 2.0.10-1
|
||||
- Type: bugfix
|
||||
- ID: NA
|
||||
- SUG: NA
|
||||
- DESC: update from openeuler
|
||||
|
||||
* Tue Oct 19 2021 wangfengtu <wangfengtu@huawei.com> - 2.0.9-20211019.121837.gitf067b3ce
|
||||
- Type: bugfix
|
||||
- ID: NA
|
||||
- SUG: NA
|
||||
- DESC: strip sha256 prefix when decrease hold references
|
||||
|
||||
* Fri Jun 25 2021 wujing <wujing50@huawei.com> - 2.0.9-20210625.165022.git5a088d9c
|
||||
- Type: update to v2.0.9
|
||||
- ID: NA
|
||||
- SUG: NA
|
||||
- DESC: update from master
|
||||
@ -268,7 +290,7 @@ fi
|
||||
- SUG: NA
|
||||
- DESC: update from master
|
||||
|
||||
* Mon Dec 7 2020 zhangxiaoyu <zhangxiaoyu58@huawei.com> - 2.0.7-20201207.152735.gitbc0b39f2
|
||||
* Mon Dec 7 2020 zhangxiaoyu <zhangxiaoyu58@huawei.com> - 2.0.7-20201207.151847.gita1fce123
|
||||
- Type: update
|
||||
- ID: NA
|
||||
- SUG: NA
|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# usage:
|
||||
# ./update-version.bash
|
||||
#######################################################################
|
||||
##- @Copyright (C) Huawei Technologies., Ltd. 2019. All rights reserved.
|
||||
# - iSulad licensed under the Mulan PSL v2.
|
||||
@ -12,18 +16,13 @@
|
||||
##- @Author: wujing
|
||||
##- @Create: 2019-04-25
|
||||
#######################################################################
|
||||
#!/bin/bash
|
||||
# usage
|
||||
# ./update-version.bash
|
||||
topDir=$(git rev-parse --show-toplevel)
|
||||
specfile="${topDir}/iSulad.spec"
|
||||
Cmakefile="${topDir}/CMakeLists.txt"
|
||||
Version_CMakefile="${topDir}/cmake/options.cmake"
|
||||
old_version=$(cat ${specfile} | grep "%global" | grep "_version" | awk {'print $3'})
|
||||
first_old_version=$(cat ${specfile} | grep "%global" | grep "_version" | awk {'print $3'} | awk -F "." {'print $1'})
|
||||
second_old_version=$(cat ${specfile} | grep "%global" | grep "_version" | awk {'print $3'} | awk -F "." {'print $2'})
|
||||
third_old_version=$(cat ${specfile} | grep "%global" | grep "_version" | awk {'print $3'} | awk -F "." {'print $3'})
|
||||
read -p "Which level version do you want to upgrade?[1/2/3/d/N](default:N) select:" choice
|
||||
read -p "Which level version do you want to upgrade?[1/2/3/r/N](default:N) select:" choice
|
||||
if [[ ! -n "${choice}" ]] || [[ ${choice} == "N" ]]; then
|
||||
echo "The version number has not been modified, it is still ${old_version}"
|
||||
exit 0
|
||||
@ -42,16 +41,9 @@ fi
|
||||
|
||||
new_version=${first_old_version}.${second_old_version}.${third_old_version}
|
||||
|
||||
echo "The version number has been modified: ${old_version} => ${new_version}"
|
||||
|
||||
old_release=$(cat ${specfile} | grep "%global" | grep "_release" | awk {'print $3'})
|
||||
commit_id_long=`git log --pretty=oneline -1 | awk {'print $1'}`
|
||||
commit_id=${commit_id_long:0:8}
|
||||
new_release=`date "+%Y%m%d"`.`date "+%H%M%S"`.git$commit_id
|
||||
echo "The relase version has been modified, it is ${new_release}"
|
||||
sed -i "s/set(ISULAD_VERSION \"${old_version}\")/set(ISULAD_VERSION \"${new_version}\")/g" ${Version_CMakefile}
|
||||
sed -i "s/^.*set(GIT_COMMIT_HASH.*$/set(GIT_COMMIT_HASH \"${commit_id_long}\")/g" ${Cmakefile}
|
||||
new_release=$(($old_release+1))
|
||||
sed -i "s/^\%global _version ${old_version}$/\%global _version ${new_version}/g" ${specfile}
|
||||
sed -i "s/^\%global _release ${old_release}$/\%global _release ${new_release}/g" ${specfile}
|
||||
|
||||
echo "The release number has been modified: ${old_release} => ${new_release}"
|
||||
echo "The release version has been modified: ${old_version}-${old_release} => ${new_version}-${new_release}"
|
||||
Loading…
x
Reference in New Issue
Block a user