diff --git a/node_modules.tar.gz b/node_modules.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..0dd9caabe5fa5ff1c0fbab4162969ae225d90e99 Binary files /dev/null and b/node_modules.tar.gz differ diff --git a/sysom-2.0.tar.gz b/sysom-2.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..168acb6050adb777002cdc6df47bc4d9483a2c8c Binary files /dev/null and b/sysom-2.0.tar.gz differ diff --git a/sysom.spec b/sysom.spec new file mode 100644 index 0000000000000000000000000000000000000000..ec1d568ffa480c4ce00f560c640070d13feaa240 --- /dev/null +++ b/sysom.spec @@ -0,0 +1,66 @@ +%define anolis_release 1 +%define debug_package %{nil} + +Name: sysom +Version: 2.0 +Release: %{anolis_release}%{?dist} +Summary: SysOM Server +License: MIT +Source0: https://gitee.com/anolis/sysom/repository/archive/v2.0/sysom-2.0.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 +BuildRequires: nodejs >= 1:16.14.0 npm >= 8.3.1 +URL: https://gitee.com/anolis/sysom + +BuildArch: x86_64 + +%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 +%setup -q -n %{name}-%{version} +pushd sysom_web +tar -xvf %{SOURCE1} +pushd node_modules +tar -xvf %{SOURCE2} +popd +popd + + +%build +echo "build sysom ..........." +echo ${PWD} +pushd sysom_web +export NODE_OPTIONS=--openssl-legacy-provider +sh ./node_modules/yarn/bin/yarn build --offline +popd +echo "build sysom end" + +%pre + +%install +mkdir -p %{buildroot}/usr/local/sysom/server/target +cp -a sysom_server %{buildroot}/usr/local/sysom/server/target +cp -a sysom_web/dist %{buildroot}/usr/local/sysom/server/target/sysom_web +cp -a script %{buildroot}/usr/local/sysom/init_scripts + +%files +/usr/local/sysom/ + +%post + +%preun +bash -x /usr/local/sysom/init_scripts/server/clear.sh + +%postun +rm -rf /usr/local/sysom + +%changelog +* Fri Dec 12 2022 huangtuquan - 2.0 +- sysom server release 2.0 diff --git a/yarn-1.22.19.tar.gz b/yarn-1.22.19.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..73deff005bc7998fe1809c534fab2deaf8f6b16b Binary files /dev/null and b/yarn-1.22.19.tar.gz differ