diff --git a/1001-change-to-python3.patch b/1001-change-to-python3.patch deleted file mode 100644 index 8a064405233f08dba4c3d98d743240c6b111027b..0000000000000000000000000000000000000000 --- a/1001-change-to-python3.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 54c40f6223a3a66d7f08984bfd526e1a75bc13d7 Mon Sep 17 00:00:00 2001 -From: happy_orange -Date: Mon, 30 Jan 2023 15:08:16 +0800 -Subject: [PATCH 1/1] change to python3 - ---- - sysom_server/sysom_diagnosis/manage.py | 2 +- - sysom_server/sysom_migration/manage.py | 2 +- - sysom_server/sysom_vmcore/manage.py | 2 +- - sysom_server/sysom_vul/manage.py | 2 +- - 4 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/sysom_server/sysom_diagnosis/manage.py b/sysom_server/sysom_diagnosis/manage.py -index c3d6cc8..b58edc4 100755 ---- a/sysom_server/sysom_diagnosis/manage.py -+++ b/sysom_server/sysom_diagnosis/manage.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python3 - """Django's command-line utility for administrative tasks.""" - import os - import sys -diff --git a/sysom_server/sysom_migration/manage.py b/sysom_server/sysom_migration/manage.py -index 8ea5cac..631b8b0 100755 ---- a/sysom_server/sysom_migration/manage.py -+++ b/sysom_server/sysom_migration/manage.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python3 - """Django's command-line utility for administrative tasks.""" - import os - import sys -diff --git a/sysom_server/sysom_vmcore/manage.py b/sysom_server/sysom_vmcore/manage.py -index ce50f6d..6afa4d9 100644 ---- a/sysom_server/sysom_vmcore/manage.py -+++ b/sysom_server/sysom_vmcore/manage.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python3 - """Django's command-line utility for administrative tasks.""" - import os - import sys -diff --git a/sysom_server/sysom_vul/manage.py b/sysom_server/sysom_vul/manage.py -index e93d9d3..2265c76 100644 ---- a/sysom_server/sysom_vul/manage.py -+++ b/sysom_server/sysom_vul/manage.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python3 - """Django's command-line utility for administrative tasks.""" - import os - import sys --- -2.31.1 - diff --git a/node_modules.tar.gz b/node_modules.tar.gz index 0dd9caabe5fa5ff1c0fbab4162969ae225d90e99..83f1133caa6dfbf0bdc9633edca8547da8ad4ffd 100644 Binary files a/node_modules.tar.gz and b/node_modules.tar.gz differ diff --git a/sysom-2.0.tar.gz b/sysom-2.0.tar.gz deleted file mode 100644 index 168acb6050adb777002cdc6df47bc4d9483a2c8c..0000000000000000000000000000000000000000 Binary files a/sysom-2.0.tar.gz and /dev/null differ diff --git a/sysom-v2.2.tar.gz b/sysom-v2.2.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..ce6658b8c360f5dec2efca73185b9be3759f4d6b Binary files /dev/null and b/sysom-v2.2.tar.gz differ diff --git a/sysom.spec b/sysom.spec index 7bd6fc7a06e13ede760f101bf90f6df77279ebff..e1cd3658b708214890e3ecb2f058f3ff86986b9b 100644 --- a/sysom.spec +++ b/sysom.spec @@ -1,32 +1,33 @@ -%define anolis_release 2 +%define anolis_release 1 %define debug_package %{nil} Name: sysom -Version: 2.0 +Version: 2.2 Release: %{anolis_release}%{?dist} Summary: SysOM Server +URL: https://gitee.com/anolis/sysom License: MIT -Source0: https://gitee.com/anolis/sysom/repository/archive/v2.0/sysom-2.0.tar.gz +Source0: https://gitee.com/anolis/sysom/repository/archive/v%{version}/%{name}-v%{version}.tar.gz # We need to prepare some components needed nodejs front-end compilation under networking conditions in advance. # Run 'nmp build' to generate node_modules. Source1: node_modules.tar.gz # Run 'nmp install yarn' to generate yarn . Source2: yarn-1.22.19.tar.gz -Requires: python3 python3-pip python3-virtualenv mariadb-server supervisor nginx redis wget nfs-utils rpcbind iproute + +Requires: python3 python3-pip python3-virtualenv mariadb-server supervisor +Requires: nginx redis wget nfs-utils rpcbind iproute + BuildRequires: nodejs >= 1:16.14.0 npm >= 8.3.1 -URL: https://gitee.com/anolis/sysom ExclusiveArch: x86_64 -Patch1001: 1001-change-to-python3.patch - %description SysOM is committed to building an automatic operation and maintenance platform that integrates host management, configuration and deployment, monitoring and alarm, exception diagnosis, security audit and other functions %prep -%autosetup -n %{name}-%{version} -p1 +%autosetup -n %{name}-v%{version} -p1 pushd sysom_web tar -xvf %{SOURCE1} pushd node_modules @@ -36,7 +37,6 @@ popd %build -export NODE_OPTIONS=--openssl-legacy-provider echo "build sysom ..........." echo ${PWD} pushd sysom_web @@ -47,6 +47,7 @@ echo "build sysom end" %install mkdir -p %{buildroot}/%{_prefix}/local/sysom/server/target cp -a sysom_server %{buildroot}/%{_prefix}/local/sysom/server/target +cp -a conf %{buildroot}/%{_prefix}/local/sysom/server/target cp -a sysom_web/dist %{buildroot}/%{_prefix}/local/sysom/server/target/sysom_web cp -a script %{buildroot}/%{_prefix}/local/sysom/init_scripts @@ -59,12 +60,19 @@ cp -a script %{buildroot}/%{_prefix}/local/sysom/init_scripts %post %preun -bash -x %{_prefix}/local/sysom/init_scripts/server/clear.sh +cat /usr/local/sysom/init_scripts/server/init.sh | grep "^FIRST_INIT_DONE=1" +if [ $? -eq 0 ] +then + bash -x /usr/local/sysom/init_scripts/server/clear.sh +fi %postun rm -rf %{_prefix}/local/sysom %changelog +* Thu May 18 2023 happy_orange - 2.2-1 +- update to 2.2 + * Mon Jan 30 2023 happy_orange - 2.0-2 - update the source code