2023-08-20 17:36:55 +08:00
|
|
|
Name: migration-tools
|
2024-03-08 09:48:52 +08:00
|
|
|
Version: 1.0.1
|
|
|
|
|
Release: 1
|
2023-08-21 17:18:27 +08:00
|
|
|
License: MulanPSL-2.0
|
2024-03-08 09:48:52 +08:00
|
|
|
Summary: A tool to help users migrate the Centos system to the UOS system and openEuler system
|
|
|
|
|
|
|
|
|
|
Source0: migration-tools.tar.gz
|
|
|
|
|
Source1: requires.tar.gz
|
|
|
|
|
Source2: xlwt-1.3.0-py2.py3-none-any.whl
|
2023-08-20 17:36:55 +08:00
|
|
|
BuildArch: noarch
|
|
|
|
|
%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: sshpass
|
|
|
|
|
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-21 17:18:27 +08:00
|
|
|
|
2023-08-20 17:36:55 +08:00
|
|
|
%prep
|
|
|
|
|
%setup -c
|
2024-03-08 09:48:52 +08:00
|
|
|
|
|
|
|
|
%if 0%{?openEuler}
|
|
|
|
|
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
|
2023-08-20 17:36:55 +08:00
|
|
|
|
2024-03-08 09:48:52 +08:00
|
|
|
cp -r * $RPM_BUILD_ROOT/usr/lib/migration-tools-server/
|
|
|
|
|
|
|
|
|
|
%if 0%{?rhel} >= 7
|
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/usr/lib/migration-tools-agent
|
|
|
|
|
cp -r * $RPM_BUILD_ROOT/usr/lib/migration-tools-agent/
|
|
|
|
|
%endif
|
2023-08-20 17:36:55 +08:00
|
|
|
|
|
|
|
|
# Install server config
|
|
|
|
|
%{__cp} -r $RPM_BUILD_ROOT/usr/lib/migration-tools-server/server/migration-tools.conf $RPM_BUILD_ROOT/etc/migration-tools
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%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
|
|
|
mkdir -p /etc/migration-tools
|
|
|
|
|
mkdir -p /var/tmp/uos-migration
|
|
|
|
|
cp -r /usr/lib/migration-tools-server/server/migration-tools-server.service /usr/lib/systemd/system/
|
|
|
|
|
chmod +x /usr/lib/migration-tools-server/server/start_webview.sh
|
|
|
|
|
ln -s /usr/lib/migration-tools-server/server/start_webview.sh /usr/bin/migration-tools
|
|
|
|
|
systemctl daemon-reload
|
|
|
|
|
systemctl restart migration-tools-server.service
|
|
|
|
|
systemctl enable migration-tools-server.service
|
|
|
|
|
|
2024-03-08 09:48:52 +08:00
|
|
|
%if 0%{?rhel} >= 7
|
|
|
|
|
%post -n migration-tools-agent
|
|
|
|
|
mkdir -p /etc/migration-tools
|
|
|
|
|
mkdir -p /var/tmp/uos-migration
|
|
|
|
|
cp -r /usr/lib/migration-tools-agent/server/migration-tools-agent.service /usr/lib/systemd/system/
|
|
|
|
|
systemctl daemon-reload
|
|
|
|
|
%endif
|
|
|
|
|
|
2023-08-20 17:36:55 +08:00
|
|
|
%postun -n migration-tools-server
|
|
|
|
|
systemctl disable migration-tools-server.service
|
|
|
|
|
rm -rf /usr/lib/migration-tools-server/
|
|
|
|
|
rm -rf /usr/lib/migration-tools
|
|
|
|
|
rm -rf /usr/bin/migration-tools
|
2024-03-08 09:48:52 +08:00
|
|
|
|
|
|
|
|
%if 0%{?rhel} >= 7
|
|
|
|
|
%postun -n migration-tools-agent
|
|
|
|
|
rm -rf /usr/lib/migration-tools-agent/
|
|
|
|
|
rm -rf /usr/lib/migration-tools
|
|
|
|
|
rm -rf /usr/bin/migration-tools
|
|
|
|
|
%endif
|
2023-08-20 17:36:55 +08:00
|
|
|
|
|
|
|
|
%files -n migration-tools-server
|
|
|
|
|
/etc/migration-tools
|
|
|
|
|
/usr/lib/migration-tools-server
|
|
|
|
|
|
2024-03-08 09:48:52 +08:00
|
|
|
%if 0%{?rhel} >= 7
|
|
|
|
|
%files -n migration-tools-agent
|
|
|
|
|
/usr/lib/migration-tools-agent
|
|
|
|
|
%endif
|
|
|
|
|
|
2023-08-20 17:36:55 +08:00
|
|
|
%changelog
|
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.
|
|
|
|
|
|
2023-09-06 17:38:06 +08:00
|
|
|
* 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
|
|
|
|
|
|
2023-08-21 17:18:27 +08:00
|
|
|
* 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
|
|
|
|
|
- init
|