代码拉取完成,页面将自动刷新
同步操作将从 openEuler/nvwa 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
# This is only an example for nvwa.spec
# So it only contains necessary items for rpmbuild,
# except Release, changelogs and so on.
Name: nvwa
Version: 0.1
Release: 1%{?dist}
Summary: a tool used for openEuler kernel update
License: MulanPSL-2.0 and Apache-2.0 and MIT and MPL-2.0
URL: https://gitee.com/openeuler/nvwa
Source: %{name}-v%{version}.tar.gz
BuildRequires: golang >= 1.13
Requires: kexec-tools criu
Requires: systemd-units iptables-services iproute
Requires: gcc
%description
A tool used to automate the process of seamless update of the openEuler.
%global debug_package %{nil}
%prep
%autosetup -n %{name}-v%{version}
%build
cd src
go build -mod=vendor
cd -
cd tools
gcc ./pin/%{name}-pin.c -o %{name}-pin
cd -
%install
mkdir -p %{buildroot}/%{_bindir}
mkdir -p %{buildroot}/etc/%{name}
mkdir -p %{buildroot}/etc/%{name}/log
mkdir -p %{buildroot}/usr/lib/systemd/system
mkdir -p %{buildroot}/var/%{name}
mkdir -p %{buildroot}/var/%{name}/running
install -m 0750 %{_builddir}/%{name}-v%{version}/src/%{name} %{buildroot}/%{_bindir}/
install -m 0750 %{_builddir}/%{name}-v%{version}/tools/%{name}-pin %{buildroot}/%{_bindir}/
install -m 0640 %{_builddir}/%{name}-v%{version}/src/config/%{name}-restore.yaml %{buildroot}/etc/%{name}/
install -m 0640 %{_builddir}/%{name}-v%{version}/src/config/%{name}-server.yaml %{buildroot}/etc/%{name}/
install -m 0750 %{_builddir}/%{name}-v%{version}/misc/%{name}-pre.sh %{buildroot}/%{_bindir}/
install -m 0644 %{_builddir}/%{name}-v%{version}/misc/%{name}.service %{buildroot}/usr/lib/systemd/system
install -m 0644 %{_builddir}/%{name}-v%{version}/misc/%{name}-pre.service %{buildroot}/usr/lib/systemd/system
install -d $RPM_BUILD_ROOT/usr/share/bash-completion/completions
install -p -m 0644 %{_builddir}/%{name}-v%{version}/completion/nvwa ${buildroot}/usr/share/bash-completion/completions/nvwa
%post
%systemd_post %{name}.service
%systemd_post %{name}-pre.service
source /usr/share/bash-completion/completions/nvwa
%preun
%systemd_preun %{name}.service
%postun
%systemd_postun_with_restart %{name}.service
%files
%license LICENSE
%dir /etc/%{name}/
%dir /etc/%{name}/log
%dir /var/%{name}
%dir /var/%{name}/running
/etc/%{name}/%{name}-restore.yaml
/etc/%{name}/%{name}-server.yaml
/usr/lib/systemd/system/%{name}.service
/usr/lib/systemd/system/%{name}-pre.service
%{_bindir}/%{name}
%{_bindir}/%{name}-pin
%{_bindir}/%{name}-pre.sh
%changelog
* Wed 17 Mar 2021 xxxxxx <xxxxxx@xxxx.com>
- Xxxxxxx
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。