Compare commits

..

No commits in common. "cee4f5ec55732c30d51b796ee3840608dc4f1e89" and "26f10b410e42bbd56630f939384fb5432c6d84fe" have entirely different histories.

8 changed files with 6 additions and 183 deletions

View File

@ -1 +0,0 @@
0.2.0-2

View File

@ -1,21 +1,15 @@
%global debug_package %{nil}
Name: WasmEngine
Version: v0.2.0
Release: 2
Version: v0.1.2
Release: 1
Summary: WasmEngine is a webassembly function engine, which provides high concurrency and sandbox security.
License: MulanPSL-2.0
License: Mulan PSL v2
URL: https://gitee.com/openeuler/WasmEngine
Source0: %{name}-%{version}.tar.gz
Source1: git-commit
Source2: VERSION-openeuler
Source3: apply-patches
Source4: gen-version.sh
Source5: series.conf
Source6: patch.tar.gz
BuildRequires: rust,cargo,rust-packaging,git
BuildRequires: rust,cargo,rust-packaging
BuildRequires: gcc,dtc,openssl-devel
%description
@ -23,16 +17,9 @@ Based on Rust programming language, WasmEngine is a webassembly function engine,
Summary: %{summary}
%prep
cp %{SOURCE0} .
cp %{SOURCE1} .
cp %{SOURCE2} .
cp %{SOURCE3} .
cp %{SOURCE4} .
cp %{SOURCE5} .
cp %{SOURCE6} .
%autosetup -p1
%build
sh ./apply-patches
rm -f build.rs
mkdir -p .cargo
@ -43,9 +30,6 @@ replace-with = "vendored-sources"
[source.vendored-sources]
directory = "vendor"
[profile.release]
strip = true
EOF
CARGO_HOME=.cargo cargo build --release
@ -63,38 +47,8 @@ rm -rf %{buildroot}
%attr(550,root,root) %{_bindir}/wasm_engine
%changelog
* Tue Mar 05 2024 flyflyflypeng <jiangpengfei9@huawei.com> - v0.2.0-2
- Type: bugfix
- CVE: NA
- SUG: restart
- DESC: fix build problem with obs
* Mon Mar 04 2024 jiangpengfei <jiangpengfei@huawei.com> - v0.2.0-1
- Type: bugfix
- CVE: NA
- SUG: restart
- DESC: update the wasmtime version to v18.0.1
* Tue Mar 07 2023 xingweizheng <xingweizheng@huawei.com> - v0.1.2-4
- Type: bugfix
- CVE: NA
- SUG: restart
- DESC: strip wasm_engine binary
* Mon Aug 08 2022 jiangpengfei <jiangpengfei9@huawei.com> - v0.1.2-3
- Type: bugfix
- CVE: NA
- SUG: restart
- DESC: patch structure init, sync upstream patches
* Mon Aug 08 2022 xingweizheng <xingweizheng@huawei.com> - v0.1.2-2
- Type: requirement
- CVE: NA
- SUG: restart
- DESC: add patch directory
* Fri Jul 29 2022 jiangpengfei <jiangpengfei9@huawei.com> - v0.1.2-1
- Type: requirement
- CVE: NA
- SUG: restart
- DESC: package init
- DESC: package init

View File

@ -1,38 +0,0 @@
#!/bin/bash
# Copyright (c) Huawei Technologies Co., Ltd. 2019-2020. All rights reserved.
# Description: This shell script is used to apply patches for the project
# Author: lixiang172@huawei.com
# Create: 2020-08-21
set -ex
pkg=WasmEngine
cwd=${PWD}
src=${cwd}/${pkg}
tar_file=WasmEngine-v"$(awk -F"-" '{print $1}' < VERSION-openeuler)".tar.gz
mkdir ${src} && tar -zxvf "${tar_file}" -C ${src} --strip-components 1
if [ ! -d patch && -f patch.tar.gz ]; then
tar -zxvf patch.tar.gz
fi
cd "${src}"
git init
git add .
git config user.name 'build'
git config user.email 'build@obs.com'
git commit -m 'init build'
cd "${cwd}"
series=${cwd}/series.conf
while IPF= read -r line; do
if [[ "${line}" =~ ^patch* ]]; then
echo "git apply ${cwd}/${line}"
cd "${src}" && git apply "${cwd}/${line}"
fi
done <"${series}"
cd "${cwd}"
cp -rf "${src}"/* .
cp -f VERSION-openeuler VERSION

View File

@ -1,91 +0,0 @@
#!/bin/bash
###################################################################################################
# Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved.
# iSula-Kits licensed under the Mulan PSL v2.
# You can use this software according to the terms and conditions of the Mulan PSL v2.
# You may obtain a copy of Mulan PSL v2 at:
# http://license.coscl.org.cn/MulanPSL2
# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
# PURPOSE.
# See the Mulan PSL v2 for more details.
# Author: Xiang Li
# Create: 2020-05-18
# Description: This script used for update WasmEngine version and release. Enjoy and cherrs
###################################################################################################
# Basic info
top_dir=$(git rev-parse --show-toplevel)
version_file="${top_dir}/VERSION-openeuler"
spec_file="${top_dir}/WasmEngine.spec"
commit_file=${top_dir}/git-commit
color=$(tput setaf 2) # red
color_reset=$(tput sgr0)
# Commit ID
changeID=`git log -1 | grep Change-Id | awk '{print $2}' | head -c 40`
if [ "${changeID}" = "" ]; then
changeID=`date | sha256sum | head -c 40`
fi
echo "${changeID}" > ${top_dir}/git-commit
commit_id=$(cat ${commit_file}|cut -c1-7)
old_all=$(cat "${version_file}")
old_version=$(cat "${version_file}" | awk -F"-" '{print $1}')
old_release=$(cat "${version_file}" | awk -F"-" '{print $2}')
major_old_version=$(echo "${old_version}" | awk -F "." '{print $1}')
minor_old_version=$(echo "${old_version}" | awk -F "." '{print $2}')
revision_old_version=$(echo "${old_version}" | awk -F "." '{print $3}')
# Read user input
read -rp "update version: Major(1), Minor(2), Revision(3), Release(4) [1/2/3/4]: " input
case ${input} in
1)
major_old_version=$((major_old_version + 1))
minor_old_version="0"
revision_old_version="0"
new_release_num="1"
;;
2)
minor_old_version=$((minor_old_version + 1))
revision_old_version="0"
new_release_num="1"
;;
3)
revision_old_version=$((revision_old_version + 1))
new_release_num="1"
;;
4)
new_release_num=$((old_release + 1))
;;
*)
echo "Wrong input, Version Not modified: ${old_version}"
exit 0
;;
esac
author=$(git config user.name)
email=$(git config user.email)
# VERSION format:
# Major.Minor.Revision
new_version=${major_old_version}.${minor_old_version}.${revision_old_version}
new_release="${new_release_num}"
new_all=${new_version}-${new_release_num}
new_changelog=$(cat << EOF
* $(date '+%a %b %d %Y') $author <$email> - v$new_all\n- Type:\n- CVE:\n- SUG:\n- DESC:\n
EOF
)
# Replace version and release for spec and VERSION files
sed -i -e "s/^Version: .*$/Version: v${new_version}/g" "${spec_file}"
sed -i -e "s/^Release: .*$/Release: ${new_release}/g" "${spec_file}"
sed -i -e "/\%changelog/a$new_changelog" "${spec_file}"
echo "${new_all}" > "${version_file}"
if [[ "${old_all}" != "${new_all}" ]]; then
printf 'Version: %s -> %s\n' "${old_all}" "${color}${new_all}${color_reset}"
fi

View File

@ -1 +0,0 @@
247b1d6a89dd4602806324a2524bc596f46625ef

View File

View File