migration-tools/migration-tools.spec

242 lines
7.8 KiB
RPMSpec
Raw Normal View History

Name: migration-tools
2024-11-01 10:34:02 +08:00
Version: 1.0.2
2024-11-05 15:55:39 +08:00
Release: 24
License: MulanPSL-2.0
Summary: A tool to help users migrate the Centos system to the UOS system and openEuler system
2024-11-01 15:39:59 +08:00
Source0: %{name}-%{version}.tar.gz
Source1: requires.tar.gz
Source2: xlwt-1.3.0-py2.py3-none-any.whl
# patches
2024-11-01 10:34:02 +08:00
Patch0: 0001-format-code.patch
2024-11-01 15:39:59 +08:00
Patch1: 0002-modify-excel-report-content.patch
2024-11-01 17:43:38 +08:00
Patch2: 0003-delete-redundant-code.patch
2024-11-01 17:48:54 +08:00
Patch3: 0004-connect-sql-function.patch
2024-11-01 18:07:19 +08:00
Patch4: 0005-execution-sql-function.patch
2024-11-04 10:28:46 +08:00
Patch5: 0006-add-loger-interface-function.patch
Patch6: 0007-add-function-to-import-machine.patch
2024-11-04 10:57:54 +08:00
Patch7: 0008-add-agent_info-table-in-database.patch
2024-11-04 11:18:09 +08:00
Patch8: 0009-add-task_stream-table-in-database.patch
2024-11-04 13:17:03 +08:00
Patch10: 0010-create-task-stream-interface.patch
2024-11-04 13:34:18 +08:00
Patch11: 0011-replace-agent-with-func-diractory.patch
2024-11-04 13:49:43 +08:00
Patch12: 0012-add-agent_task-in-database.patch
2024-11-04 14:00:42 +08:00
Patch13: 0013-display-agent-host-information.patch
2024-11-04 14:18:49 +08:00
Patch14: 0014-modify-task-stream-interface.patch
2024-11-04 14:40:23 +08:00
Patch15: 0015-delete-host-information-interface.patch
2024-11-04 15:32:49 +08:00
Patch16: 0016-get-local-ip-on-the-agent.patch
2024-11-04 15:59:13 +08:00
Patch17: 0017-add-process-data-in-database.patch
Patch18: 0018-detection-of-imported-host-information-interface.patch
2024-11-04 17:22:51 +08:00
Patch19: 0019-update-abi-result-to-database.patch
Patch20: 0020-get-task-process-and-migration-stage-information.patch
2024-11-05 10:13:38 +08:00
Patch21: 0021-get-agent-ip-interface.patch
Patch22: 0022-udpate-agent-host-status-online.patch
Patch23: 0023-update-the-status-of-the-migration-phase.patch
2024-11-05 15:55:39 +08:00
Patch24: 0024-add-url-processing-function.patch
BuildArch: noarch
2024-07-09 16:26:16 +08:00
BuildRequires: systemd
2023-08-20 17:36:55 +08:00
%description
UOS Migration Software
2024-03-08 09:48:52 +08:00
%if 0%{?rhel} >= 7
%package -n migration-tools-agent
Summary: migration-tools-agent
License: MulanPSL-2.0
Requires: dnf
Requires: libabigail
Requires: python3
Requires: python3-flask
Requires: python3-paramiko
Requires: python3-requests
Requires: python3-xlrd
Requires: python3-xlwt
Requires: openssl
Requires: rsync
Requires: yum-utils
%description -n migration-tools-agent
Migration software agent side
%endif
2023-08-20 17:36:55 +08:00
%package -n migration-tools-server
2023-08-22 18:09:04 +08:00
Summary: migration-tools-server
2024-03-08 09:48:52 +08:00
License: MulanPSL-2.0
2023-08-22 18:09:04 +08:00
Requires: python3
Requires: python3-pip
Requires: python3-paramiko
Requires: python3-flask
Requires: python3-requests
2023-08-20 17:36:55 +08:00
%description -n migration-tools-server
Migration software server side
2023-08-20 17:36:55 +08:00
%prep
2024-11-01 15:39:59 +08:00
%autosetup -p1
2024-03-08 09:48:52 +08:00
2024-03-12 10:47:12 +08:00
2024-03-08 09:48:52 +08:00
%if 0%{?openEuler}
2024-11-01 15:39:59 +08:00
mkdir -p agent-requires/
2024-03-08 09:48:52 +08:00
cp -f %SOURCE1 agent-requires/
cp -f %SOURCE2 agent-requires/
%endif
2023-08-20 17:36:55 +08:00
%install
rm -rf %{buildroot}
mkdir -p $RPM_BUILD_ROOT/usr/lib/migration-tools-server
mkdir -p $RPM_BUILD_ROOT/var/tmp/uos-migration
2024-03-08 09:48:52 +08:00
mkdir -p $RPM_BUILD_ROOT/etc/migration-tools
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
2024-11-01 15:39:59 +08:00
%{__cp} -r * $RPM_BUILD_ROOT/usr/lib/migration-tools-server/
2023-08-20 17:36:55 +08:00
2024-03-08 09:48:52 +08:00
%if 0%{?rhel} >= 7
mkdir -p $RPM_BUILD_ROOT/usr/lib/migration-tools-agent
2024-11-01 15:39:59 +08:00
%{__cp} -r * $RPM_BUILD_ROOT/usr/lib/migration-tools-agent/
%{__cp} -r $RPM_BUILD_ROOT/usr/lib/migration-tools-server/server/migration-tools-agent.service $RPM_BUILD_ROOT%{_unitdir}
2024-03-08 09:48:52 +08:00
%endif
2023-08-20 17:36:55 +08:00
# Install server config
2024-11-01 10:34:02 +08:00
%{__cp} -r $RPM_BUILD_ROOT/usr/lib/migration-tools-server/server/uos-sysmig.conf $RPM_BUILD_ROOT/etc/migration-tools
%{__cp} -r $RPM_BUILD_ROOT/usr/lib/migration-tools-server/server/migration-tools-server.service $RPM_BUILD_ROOT%{_unitdir}
2023-08-20 17:36:55 +08:00
%posttrans
%{_bindir}/systemctl daemon-reload
2023-08-20 17:36:55 +08:00
%post -n migration-tools-server
2024-03-08 09:48:52 +08:00
pip3 install /usr/lib/migration-tools-server/agent-requires/xlwt-1.3.0-py2.py3-none-any.whl --no-cache-dir
2023-08-20 17:36:55 +08:00
chmod +x /usr/lib/migration-tools-server/server/start_webview.sh
ln -sf /usr/lib/migration-tools-server/server/start_webview.sh /usr/bin/migration-tools
2023-08-20 17:36:55 +08:00
%preun -n migration-tools-server
if [ $1 = 0 ];then
systemctl stop migration-tools-server.service
fi
2024-03-08 09:48:52 +08:00
2023-08-20 17:36:55 +08:00
%postun -n migration-tools-server
2024-03-08 09:48:52 +08:00
rm -rf /usr/bin/migration-tools
2023-08-20 17:36:55 +08:00
%files -n migration-tools-server
/etc/migration-tools
/usr/lib/migration-tools-server
%{_unitdir}/migration-tools-server.service
2023-08-20 17:36:55 +08:00
2024-03-08 09:48:52 +08:00
%if 0%{?rhel} >= 7
%files -n migration-tools-agent
/etc/migration-tools
2024-03-08 09:48:52 +08:00
/usr/lib/migration-tools-agent
%{_unitdir}/migration-tools-agent.service
2024-03-08 09:48:52 +08:00
%endif
2023-08-20 17:36:55 +08:00
%changelog
2024-11-05 15:55:39 +08:00
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-24
- 0024-add-url-processing-function.patch
* Mon Nov 4 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-23
- 0023-update-the-status-of-the-migration-phase.patch
* Mon Nov 4 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-22
- 0022-udpate-agent-host-status-online.patch
2024-11-05 10:13:38 +08:00
* Mon Nov 4 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-21
- 0021-get-agent-ip-interface.patch
* Mon Nov 4 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-20
- 0020-get-task-process-and-migration-stage-information.patch
2024-11-04 17:22:51 +08:00
* Mon Nov 4 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-19
- 0019-update-abi-result-to-database.patch
* Mon Nov 4 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-18
- 0018-detection-of-imported-host-information-interface.patch
2024-11-04 15:59:13 +08:00
* Mon Nov 4 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-17
- 0017-add-process-data-in-database.patch
2024-11-04 15:32:49 +08:00
* Mon Nov 4 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-16
- 0016-get-local-ip-on-the-agent.patch
2024-11-04 14:40:23 +08:00
* Mon Nov 4 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-15
- 0015-delete-host-information-interface.patch
2024-11-04 14:18:49 +08:00
* Mon Nov 4 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-14
- 0014-modify-task-stream-interface.patch
2024-11-04 14:00:42 +08:00
* Mon Nov 4 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-13
- 0013-display-agent-host-information.patch
2024-11-04 13:49:43 +08:00
* Mon Nov 4 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-12
- 0012-add-agent_task-in-database.patch
2024-11-04 13:34:18 +08:00
* Mon Nov 4 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-11
- 0011-replace-agent-with-func-diractory.patch
2024-11-04 13:17:03 +08:00
* Mon Nov 4 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-10
- 0010-create-task-stream-interface.patch
2024-11-04 11:18:09 +08:00
* Mon Nov 4 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-9
- 0009-add-task_stream-table-in-database.patch
2024-11-04 10:57:54 +08:00
* Mon Nov 4 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-8
- 0008-add-agent_info-table-in-database.patch
2024-11-04 10:28:46 +08:00
* Mon Nov 4 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-7
- 0007-add-function-to-import-machine.patch
2024-11-04 09:49:51 +08:00
* Mon Nov 4 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-6
2024-11-04 10:28:46 +08:00
- 0006-add-loger-interface-function.patch
2024-11-04 09:49:51 +08:00
2024-11-01 18:07:19 +08:00
* Fri Nov 1 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-5
- add 0005-execution-sql-function.patch
2024-11-01 17:48:54 +08:00
* Fri Nov 1 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-4
- add 0004-connect-sql-function.patch
2024-11-01 17:43:38 +08:00
* Fri Nov 1 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-3
- add 0003-delete-redundant-code.patch
2024-11-01 15:39:59 +08:00
* Fri Nov 1 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-2
- add 0002-modify-excel-report-content.patch
2024-11-01 10:34:02 +08:00
* Thu Oct 31 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-1
- add 0001-stander-code.patch
* Tue Aug 27 2024 lihaipeng <lihaipeng@uniontech.com> - 1.0.1-7
- fix cancel button function in tool
2024-07-09 16:26:16 +08:00
* Tue Jul 09 2024 Wenhua Huang <huangwenhua@kylinos.cn> - 1.0.1-6
- add BuildRequires systemd
2024-04-02 17:21:54 +08:00
* Tue Apr 02 2024 lixin <lixinb@uniontech.com> - 1.0.1-5
- adjust the display sequence
2024-04-01 11:09:08 +08:00
* Mon Apr 01 2024 lixin <lixinb@uniontech.com> - 1.0.1-4
- modify description
* Mon Mar 18 2024 lixin <lixinb@uniontech.com> - 1.0.1-3
- fix stop service display failed
- update spec
2024-03-12 10:47:12 +08:00
* Mon Mar 11 2024 lixin <lixinb@uniontech.com> - 1.0.1-2
- fix : CVE-2024-24892
- use paramiko instead of sshpass to export migration log
- and data
2024-03-08 09:48:52 +08:00
* Tue Mar 05 2024 lixin <lixinb@uniontech.com> - 1.0.1-1
- Supports migrations to OpenEuler system using the web-based interface.
* Wed Sep 06 2023 lixin <lixinb@uniontech.com> - 1.0.0-4
- fix: fix uefi boot failed
- fix: modify grub rules to match NIC name after migration
2023-08-22 18:09:04 +08:00
* Tue Aug 22 2023 lixin <lixinb@uniontech.com> - 1.0.0-3
- feat: add aarch64 agent package
* Mon Aug 21 2023 lixin <lixinb@uniontech.com> - 1.0.0-2
- fix export log and migration report error
- fix no migration detail error
2023-08-20 17:36:55 +08:00
* Wed Aug 16 2023 lixin <lixinb@uniontech.com> - 1.0.0-1
2024-11-01 17:48:54 +08:00
init