KubeOS/KubeOS.spec
Yuhang Wei db4b835145 KubeOS: fix proxy requeue and update image label
Signed-off-by: Yuhang Wei <weiyuhang3@huawei.com>
2024-02-26 09:54:31 +08:00

240 lines
8.0 KiB
RPMSpec

# Copyright (c) Huawei Technologies Co., Ltd. 2021. All rights reserved.
Name: KubeOS
Version: 1.0.4
Release: 4
Summary: O&M platform used to update the whole OS as an entirety
License: Mulan PSL v2
Source0: https://gitee.com/openeuler/KubeOS/repository/archive/v%{version}.tar.gz
Patch1: 0001-KubeOS-add-unit-tests-of-containerd-and-docker-modif.patch
Patch2: 0002-KubeOS-refactor-assignUpgrade-function.patch
Patch3: 0003-KubeOS-fix-the-hostshell-cannot-obtain-the-lib.patch
Patch4: 0004-KubeOS-add-agent-proxy-and-operator-ut.patch
Patch5: 0005-KubeOS-fix-validate-image-name-bug.patch
Patch6: 0006-KubeOS-fix-a-bug-that-failed-to-parse-key-with.patch
Patch7: 0007-KubeOS-add-warning-log-during-config.patch
Patch8: 0008-KubeOS-modify-log-level-and-content.patch
Patch9: 0009-KubeOS-fix-updating-key-to-kv.patch
Patch10: 0010-KubeOS-fix-proxy-requeue-bug.patch
Patch11: 0011-KubeOS-fix-operator-bug-of-missing-deep-copy.patch
Patch12: 0012-KubeOS-add-unit-test.patch
Patch13: 0013-KubeOS-fix-clean-space-problems.patch
Patch14: 0014-KubeOS-update-version.patch
Patch15: 0015-KubeOS-add-line-breaks.patch
Patch16: 0016-KubeOS-modify-code-for-clean-code.patch
Patch17: 0017-KubeOS-fix-the-issue-that-osinstance-is-not-updated-.patch
Patch18: 0018-KubeOS-update-config-log-contents.patch
Patch19: 0019-KubeOS-add-unit-tests.patch
Patch20: 0020-KubeOS-modify-code-for-clean-code.patch
Patch21: 0021-KubeOS-delete-raw-and-docker-image-upgrade.patch
Patch22: 0022-KubeOS-delete-scripts-except-admin-container.patch
Patch23: 0023-KubeOS-fix-proxy-upgrade-requeue-bug.patch
Patch24: 0024-KubeOS-fix-label-changed-after-upgrade.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: make
BuildRequires: golang >= 1.13
%description
This is an O&M platform used to update the whole OS as an entirety,
it should be running in kubernetes environment.
%prep
%autosetup -n %{name}-v%{version} -p1
%package agent
Summary: agent provides os-agent and related service files which are needed on nodes
%description agent
The agent package includes os-agent and service files
%package admin-container
Summary: admin-container contains hostshell and set-ssh-pub-key script and service file
%description admin-container
The agent package includes hostshell and set-ssh-pub-key script and service file
%define debug_package %{nil}
%define __debug_install_post \
%{_rpmconfigdir}/find-debuginfo.sh %{?_find_debuginfo_opts} "%{_builddir}/%{?buildsubdir}" \
%{nil}
%build
make
%install
install -d -m 0740 %{buildroot}/opt/kubeOS/bin
install -p -m 0500 ./bin/proxy %{buildroot}/opt/kubeOS/bin
install -p -m 0500 ./bin/operator %{buildroot}/opt/kubeOS/bin
#kubeos-agent
install -d %{buildroot}%{_bindir}
install -d %{buildroot}%{_prefix}/lib/systemd/system
install -p -m 0500 ./bin/os-agent %{buildroot}%{_bindir}
install -p -m 0600 ./files/boot-efi.mount %{buildroot}%{_prefix}/lib/systemd/system
install -p -m 0600 ./files/etc.mount %{buildroot}%{_prefix}/lib/systemd/system
install -p -m 0600 ./files/persist.mount %{buildroot}%{_prefix}/lib/systemd/system
install -p -m 0600 ./files/var.mount %{buildroot}%{_prefix}/lib/systemd/system
install -p -m 0600 ./files/os-agent.service %{buildroot}%{_prefix}/lib/systemd/system
install -p -m 0600 ./files/os-release %{buildroot}%{_prefix}/lib/
#kubeos-admin-container
install -p -m 0500 ./bin/hostshell %{buildroot}%{_bindir}
install -d %{buildroot}%{_prefix}/local/bin
install -p -m 0500 ./scripts/admin-container/set-ssh-pub-key.sh %{buildroot}%{_prefix}/local/bin
install -d %{buildroot}%{_prefix}/lib/sysmaster
install -p -m 0600 ./scripts/admin-container/set-ssh-pub-key.service %{buildroot}%{_prefix}/lib/sysmaster
%files
%attr(0500,root,root) /opt/kubeOS/bin/proxy
%attr(0500,root,root) /opt/kubeOS/bin/operator
%files agent
%attr(0500,root,root) %{_bindir}/os-agent
%defattr(-,root,root,0500)
%attr(0600,root,root) %{_prefix}/lib/systemd/system/boot-efi.mount
%attr(0600,root,root) %{_prefix}/lib/systemd/system/etc.mount
%attr(0600,root,root) %{_prefix}/lib/systemd/system/persist.mount
%attr(0600,root,root) %{_prefix}/lib/systemd/system/var.mount
%attr(0600,root,root) %{_prefix}/lib/systemd/system/os-agent.service
%attr(0600,root,root) %{_prefix}/lib/os-release
%files admin-container
%attr(0500,root,root) %{_bindir}/hostshell
%defattr(-,root,root,0500)
%attr(0500,root,root) %{_prefix}/local/bin/set-ssh-pub-key.sh
%attr(0600,root,root) %{_prefix}/lib/sysmaster/set-ssh-pub-key.service
%clean
rm -rfv %{buildroot}
%changelog
* Tue Sep 05 2023 Yuhang Wei<weiyuhang3@huawei.com> - 1.0.4-4
- Type:requirement
- CVE:NA
- SUG:restart
- DESC:fix proxy requeue and update image label
* Thu Aug 24 2023 Yuhang Wei<weiyuhang3@huawei.com> - 1.0.4-3
- Type:requirement
- CVE:NA
- SUG:restart
- DESC:sync code from source master branch
* Mon Aug 07 2023 liyuanrong<liyuanrong1@huawei.com> - 1.0.4-2
- Type:requirement
- CVE:NA
- SUG:restart
- DESC:fix the hostshell cannot obtain the lib
* Wed Aug 02 2023 liyuanrong<liyuanrong1@huawei.com> - 1.0.4-1
- Type:requirement
- CVE:NA
- SUG:restart
- DESC:update version to 1.0.4.1
* Thu Dec 08 2022 liyuanrong<liyuanrong1@huawei.com> - 1.0.2-9
- Type:requirement
- CVE:NA
- SUG:restart
- DESC:sync code from source, support containerd upgrade,settings and admin-container
* Thu Dec 08 2022 liyuanrong<liyuanrong1@huawei.com> - 1.0.2-8
- Type:requirement
- CVE:NA
- SUG:restart
- DESC:fix usage does not print when an error occurs in the upgrade image creation
* Tue Nov 29 2022 liyuanrong<liyuanrong1@huawei.com> - 1.0.2-7
- Type:requirement
- CVE:NA
- SUG:restart
- DESC:remove grub2 legacy install, add error handling for opstype and add entry for unit test in Makefile
* Sat Sep 03 2022 liyuanrong<liyuanrong1@huawei.com> - 1.0.2-6
- Type:requirement
- CVE:NA
- SUG:restart
- DESC:add the configuration of /etc/resolv.conf and change the VM disk to gpt.
* Wed Aug 31 2022 liyuanrong<liyuanrong1@huawei.com> - 1.0.2-5
- Type:requirement
- CVE:NA
- SUG:restart
- DESC:add the clearing of space before the upgrade and rectifying the rollback failure.
* Mon Aug 29 2022 liyuanrong<liyuanrong1@huawei.com> - 1.0.2-4
- Type:requirement
- CVE:NA
- SUG:restart
- DESC:fixed the issue of VMs images and add check of Global.cfg.
* Tue Aug 23 2022 liyuanrong<liyuanrong1@huawei.com> - 1.0.2-3
- Type:requirement
- CVE:NA
- SUG:restart
- DESC:fix the kbimg.sh exception and pxe installation
* Fri Aug 05 2022 liyuanrong<liyuanrong1@huawei.com> - 1.0.2-2
- Type:requirement
- CVE:NA
- SUG:restart
- DESC:update to 1.0.2-2
* Tue Aug 02 2022 liyuanrong<liyuanrong1@huawei.com> - 1.0.1-8
- Type:requirement
- CVE:NA
- SUG:restart
- DESC:update to 1.0.1-8
* Fri Dec 17 2021 liyuanrong<liyuanrong1@huawei.com> - 1.0.1-5
- Type:requirement
- CVE:NA
- SUG:restart
- DESC:add arm architecture support to the OS image
* Wed Dec 08 2021 linxiaoxu<linxiaoxu@huawei.com> - 1.0.1-4
- Type:requirement
- CVE:NA
- SUG:restart
- DESC:fix bugs of change generate argument from isopath to repopath
* Thu Nov 11 2021 liyuanrong<liyuanrong1@huawei.com> - 1.0.1-3
- Type:requirement
- CVE:NA
- SUG:restart
- DESC:fix bugs of checks in generate.sh and change module path
* Sat Oct 30 2021 liyuanrong<liyuanrong1@huawei.com> - 1.0.1-2
- Type:requirement
- CVE:NA
- SUG:restart
- DESC:update compressed package
* Fri Oct 29 2021 linxiaoxu<linxiaoxu@huawei.com> - 1.0.1-1
- Type:requirement
- CVE:NA
- SUG:restart
- DESC:update version to v1.0.1
* Tue Oct 19 2021 linxiaoxu<linxiaoxu@huawei.com> - 1.0.0-4
- Type:requirement
- CVE:NA
- SUG:restart
- DESC:change argument check range
* Thu Sep 30 2021 liyuanrong<liyuanrong1@huawei.com> - 1.0.0-2
- Type:requirement
- CVE:NA
- SUG:restart
- DESC:update spec
* Thu Sep 30 2021 liyuanrong<liyuanrong1@huawei.com> - 1.0.0-2
- Type:requirement
- CVE:NA
- SUG:restart
- DESC:add Arch to Spec
* Thu Sep 30 2021 liyuanrong<liyuanrong1@huawei.com> - 1.0.0-1
- Type:requirement
- CVE:NA
- SUG:restart
- DESC:First release KubeOS in rpm package