1
0

1 Commits

Author SHA1 Message Date
TsMask
2bebf6b729 chore: 更新版本号 2.2503.6 2025-05-09 19:41:50 +08:00
36 changed files with 79 additions and 131 deletions

View File

@@ -1,17 +1,14 @@
#!/bin/bash
usage() {
echo "Usage: $0 [OPTION] deb|badeb|rpm|psapdeb"
echo "Usage: $0 [OPTION] deb|badeb|rpm"
echo
echo "Build omc package, option as follow:"
echo " deb|badeb|rpm, deb: ubuntu|debian package build by dpkg"
echo " badeb: ubuntu|debian package build by dpkg"
echo " rpm: centos/redhat package, build by rpmbuild"
echo " psapdeb psap package, build by dpkg"
echo
echo " -r, =build root directory build root directory, default directory is $HOME/omc.git"
echo " -d dump SQL from database"
echo " -h, --help display this help and exit"
echo
}
@@ -19,7 +16,7 @@ pkgtype=""
new_args=()
# Traverse all parameters
for arg in "$@"; do
if [[ "$arg" == "deb" || "$arg" == "badeb" || "$arg" == "rpm" || "$arg" == "psapdeb" ]]; then
if [[ "$arg" == "deb" || "$arg" == "badeb" || "$arg" == "rpm" ]]; then
pkgtype=$arg
else
new_args+=("$arg") # Add non pkgtype parameters to a new parameter list
@@ -34,7 +31,7 @@ fi
# Use a new parameter list
set -- "${new_args[@]}"
GitLocalRoot=${HOME}/${ProjectL}.git
GitLocalRoot=${HOME}/omc.git
while getopts "r:d" option; do
case $option in
r)
@@ -56,10 +53,10 @@ if [ ! -d ${GitLocalRoot} ]; then
exit 3
fi
ProjectL=psap
ProjectU=PSAP
ProjectL=omc
ProjectU=OMC
PROJECT=${ProjectL}
VERSION=1.2506.2
VERSION=2.2503.6
RelDate=`date +%Y%m%d`
RelVer=${VERSION}-${RelDate}
Ky10Arch=ky10.aarch64
@@ -220,15 +217,15 @@ case "${pkgtype}" in
chmod 755 ${BuildOMCBinDir}/*
cp -rf ${BuildDir}/* ${RpmBuildDir}/BUILD/
cp -rf ${CustomizedDir}/agt.d ${RpmBuildOMCDir}/static
cp -rf ${CustomizedDir}/psap.d ${RpmBuildOMCDir}/static
cp -rf ${CustomizedDir}/omc.d ${RpmBuildOMCDir}/static
cd ${RpmBuildDir}
rpmbuild -bb -D "_topdir ${RpmBuildDir}" ${RpmBuildDir}/SPECS/omc.spec
mv -f $RpmsDir/$RpmArch/$RpmPkgName ${ReleasePkgDir}/$RpmPkgRename
cd ${ReleasePkgDir}
rm -f ${ProjectL}-md5sum.txt
rm -f omc-md5sum.txt
# rpm --addsign *.rpm
md5sum $RpmPkgRename >${ProjectL}-md5sum.txt
md5sum $RpmPkgRename >omc-md5sum.txt
echo "Finish to make ${pkgtype} package <======"
;;
deb)
@@ -279,7 +276,7 @@ case "${pkgtype}" in
chmod 755 ${DebBuildDir}/DEBIAN/postrm
cp -rf ${BuildDir}/* ${DebBuildDir}/
cp -rf ${CustomizedDir}/agt.d ${DebBuildOMCDir}/static
cp -rf ${CustomizedDir}/psap.d ${DebBuildOMCDir}/static
cp -rf ${CustomizedDir}/omc.d ${DebBuildOMCDir}/static
#cp -rf ${BuildDir}/nginx/* ${DebBuildDir}/etc/nginx/conf.d
#cp -rf ${BuildDir}/systemd/*.service ${DebBuildDir}/lib/systemd/system/
chmod +x ${DebBuildDir}/usr/local/omc/bin/*
@@ -354,66 +351,6 @@ case "${pkgtype}" in
md5sum ${DebPkgName} >omc-md5sum.txt
echo "Finish to make ${pkgtype} package <======"
;;
psapdeb)
ProjectL="psap"
echo "Begin to make ${pkgtype} package ======>"
ReleasePkgDir=${ReleaseDir}/debs/${RelArch}
ProcList="restagent"
cd $EmsBEDir
for procName in $ProcList;do
cd $EmsBEDir/$procName
echo "Make $procName ..."
make
done
DebPkgFile=${ProjectL}-r${RelVer}-${RelOS}-${RelArch}.${ptype}
if [ ! $ProjectTag = "" ]; then
DebPkgFile=${ProjectL}-r${RelVer}-${RelOS}-${RelArch}-${ProjectTag}.${ptype}
fi
cd ${EmsBEDir}
#make deb
# clear build cache
rm -rf ${FrontBuildDir}/front/*
rm -rf ${DebFEBuildDir}/front/*
rm -rf ${DebBuildDir}/usr/local/omc/etc/db/*
rm -rf ${DebBuildOMCDir}/static/*
for procName in $ProcList;do
cd $EmsBEDir/$procName
cp -rf ${procName} ${BuildOMCBinDir}
done
cp -rf ${MiscDir}/* ${BuildOMCBinDir}
cp -rf ${ConfigEtcDir}/* ${BuildOMCEtcDir}
rm -rf ${BuildOMCEtcDir}/db/*
cp -rf ${DBSQLSrcDir}/* ${BuildOMCEtcDir}/db/
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/install
cp -rf ${BuildOMCEtcDir}/db/common/* ${BuildOMCEtcDir}/db/upgrade
#Get SQL from database, overwrite from git
cp -rf ${ConfigSystemdDir}/* ${BuildLibSystemDir}
cp -rf ${EmsFEVue3Dir}/* ${FrontBuildDir}/front >/dev/null
chmod 755 ${BuildOMCBinDir}/*
chmod 755 ${DebBuildDir}/DEBIAN/preinst
chmod 755 ${DebBuildDir}/DEBIAN/postinst
chmod 755 ${DebBuildDir}/DEBIAN/postrm
cp -rf ${BuildDir}/* ${DebBuildDir}/
cp -rf ${CustomizedDir}/agt.d ${DebBuildOMCDir}/static
cp -rf ${CustomizedDir}/psap.d ${DebBuildOMCDir}/static
#cp -rf ${BuildDir}/nginx/* ${DebBuildDir}/etc/nginx/conf.d
#cp -rf ${BuildDir}/systemd/*.service ${DebBuildDir}/lib/systemd/system/
chmod +x ${DebBuildDir}/usr/local/omc/bin/*
sed -i "s/YYYYMMDD/${RelDate}/g" ${DebBuildDir}/DEBIAN/control
sed -i "s/Architecture: amd64/Architecture: ${RelArch}/g" ${DebBuildDir}/DEBIAN/control
perl -0777 -i -pe 's/ne:\n user: root/ne:\n user: omcuser/g' ${DebBuildDir}/usr/local/omc/etc/default/restconf.yaml
dpkg -b ${DebBuildDir} ${ReleasePkgDir}/${DebPkgFile}
cd ${ReleasePkgDir}
rm -f omc-md5sum.txt
md5sum ${DebPkgName} >omc-md5sum.txt
echo "Finish to make ${pkgtype} package <======="
;;
*)
usage
exit 4

View File

@@ -44,7 +44,7 @@ database:
password: 1000omc@kp!
host: 127.0.0.1
port: 33066
name: psap_db
name: omc_db
connParam: charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True
backup: /usr/local/omc/database
@@ -57,6 +57,12 @@ redis:
host: "127.0.0.1" # Redis host
password: "helloearth"
db: 10 # Redis db_num
# UDM sub/auth db
udmuser:
port: 6379 # Redis port
host: "127.0.0.1"
password: "helloearth"
db: 0 # Redis db_num
# used to specify the default data source for multiple data resourece
defaultDataSourceName: "default"
@@ -72,7 +78,7 @@ mml:
# Tracking configuration
trace:
enabled: false
enabled: true
host: "172.16.5.100" # Fill in the specific IP address
port: 33033
@@ -103,9 +109,7 @@ omc:
vendor: ""
dn: ""
chk2ne: false
capability: 50
sn: "-"
expiryDate: "-"
checksign: false
rootDir: /usr/local/omc
binDir: /usr/local/omc/bin

View File

@@ -71,7 +71,7 @@ database:
password: 1000omc@kp!
host: 127.0.0.1
port: 33066
name: psap_db
name: omc_db
connParam: charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True
omc:

View File

@@ -8,10 +8,10 @@ REPLACE INTO `sys_config` VALUES (108, 'config.sys.i18nOpen', 'sys.i18n.open', '
REPLACE INTO `sys_config` VALUES (109, 'config.sys.i18nDefault', 'sys.i18n.default', 'en_US', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.i18nDefaultRemark');
--
REPLACE INTO `sys_dict_data` VALUES (1660, 1660, 'config.sys.titleValue', 'AGrand PSAP', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (1661, 1661, 'config.sys.copyrightValue', 'Copyright ©2025 千通科技', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (3660, 3660, 'config.sys.titleValue', 'AGrand PSAP', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (3661, 3661, 'config.sys.copyrightValue', 'Copyright ©2025 AGrandTech', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (1660, 1660, 'config.sys.titleValue', 'AGrand EMS', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (1661, 1661, 'config.sys.copyrightValue', 'Copyright ©2024 千通科技', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (3660, 3660, 'config.sys.titleValue', 'AGrand EMS', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (3661, 3661, 'config.sys.copyrightValue', 'Copyright ©2024 AGrandTech', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
-- set internationalization switching to ON
-- REPLACE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 2122);

View File

@@ -0,0 +1,20 @@
SET FOREIGN_KEY_CHECKS = 0;
--
REPLACE INTO `sys_config` VALUES (6, 'config.sys.officialUrl', 'sys.officialUrl', 'https://www.bluearcus.com', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.officialUrlRemark');
REPLACE INTO `sys_config` VALUES (106, 'config.sys.title', 'sys.title', 'config.sys.titleValue', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.titleRemark');
REPLACE INTO `sys_config` VALUES (107, 'config.sys.copyright', 'sys.copyright', 'config.sys.copyrightValue', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.copyrightRemark');
REPLACE INTO `sys_config` VALUES (108, 'config.sys.i18nOpen', 'sys.i18n.open', 'false', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.i18nOpenRemark');
REPLACE INTO `sys_config` VALUES (109, 'config.sys.i18nDefault', 'sys.i18n.default', 'en_US', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.i18nDefaultRemark');
--
REPLACE INTO `sys_dict_data` VALUES (1660, 1660, 'config.sys.titleValue', 'BlueArcus EMS', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (1661, 1661, 'config.sys.copyrightValue', 'Copyright ©2024 BlueArcus', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (3660, 3660, 'config.sys.titleValue', 'BlueArcus EMS', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (3661, 3661, 'config.sys.copyrightValue', 'Copyright ©2024 BlueArcus', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
-- set internationalization switching to ON
-- REPLACE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 2122);
UPDATE `sys_menu` SET `status` = '0' WHERE `menu_id` = 2122;
SET FOREIGN_KEY_CHECKS = 1;

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 KiB

View File

@@ -0,0 +1,2 @@
export default {
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

View File

@@ -8,10 +8,10 @@ REPLACE INTO `sys_config` VALUES (108, 'config.sys.i18nOpen', 'sys.i18n.open', '
REPLACE INTO `sys_config` VALUES (109, 'config.sys.i18nDefault', 'sys.i18n.default', 'en_US', 'Y', 'supervisor', 1700000000000, NULL, 0, 'config.sys.i18nDefaultRemark');
--
REPLACE INTO `sys_dict_data` VALUES (1660, 1660, 'config.sys.titleValue', 'PSAP', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (1661, 1661, 'config.sys.copyrightValue', 'Copyright ©2024 PSAP', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (3660, 3660, 'config.sys.titleValue', 'PSAP', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (3661, 3661, 'config.sys.copyrightValue', 'Copyright ©2024 PSAP', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (1660, 1660, 'config.sys.titleValue', 'OMC', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (1661, 1661, 'config.sys.copyrightValue', 'Copyright ©2024', 'i18n_zh', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (3660, 3660, 'config.sys.titleValue', 'OMC', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
REPLACE INTO `sys_dict_data` VALUES (3661, 3661, 'config.sys.copyrightValue', 'Copyright ©2024', 'i18n_en', NULL, NULL, '1', 'supervisor', 1700000000000, NULL, 0, NULL);
-- set internationalization switching to ON
-- REPLACE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 2122);

Binary file not shown.

View File

Before

Width:  |  Height:  |  Size: 114 B

After

Width:  |  Height:  |  Size: 114 B

View File

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 70 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

View File

@@ -1,9 +1,8 @@
Package: PSAP
Version: 1.2506.2-20250616
Package: OMC
Version: 2.2503.6-YYYYMMDD
Section: AGrandTech
Prioritt: optional
Architecture: amd64
Maintainer: Simon Zhangsz
Depends:
Description: psap
Description: OMC

View File

@@ -47,7 +47,7 @@ fi
for LogoFile in ${LogoFileList}; do
if [ ! -e "${OMCStaticDir}/logo/${LogoFile}" ]; then
cp ${OMCStaticDir}/psap.d/logo/${LogoFile} ${OMCStaticDir}/logo;
cp ${OMCStaticDir}/omc.d/logo/${LogoFile} ${OMCStaticDir}/logo;
fi
done
@@ -89,7 +89,7 @@ if [ "$M_PARAM" = "install" -o "$M_PARAM" = "upgrade" ]; then
fi
fi
echo -n "Starting PSAP service ... "
echo -n "Starting OMC service ... "
systemctl start sshsvc.service
systemctl start restagent.service
echo "done"

View File

@@ -7,7 +7,7 @@ rm -f /usr/local/bin/omcd
systemctl daemon-reload
if systemctl list-units --type=service --all | grep -q 'restagent.service'; then
echo -n "Stopping PSAP service ... "
echo -n "Stopping OMC service ... "
systemctl stop restagent.service
systemctl stop sshsvc.service
echo "done"

View File

@@ -2,7 +2,7 @@
systemctl daemon-reload
if systemctl list-units --type=service --all | grep -q 'restagent.service'; then
echo -n "Stopping PSAP service ... "
echo -n "Stopping OMC service ... "
systemctl stop restagent.service
systemctl stop sshsvc.service
echo "done"

View File

@@ -44,7 +44,7 @@ database:
password: 1000omc@kp!
host: 127.0.0.1
port: 33066
name: psap_db
name: omc_db
connParam: charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True
backup: /usr/local/omc/database
@@ -57,6 +57,12 @@ redis:
host: "127.0.0.1" # Redis host
password: "helloearth"
db: 10 # Redis db_num
# UDM sub/auth db
udmuser:
port: 6379 # Redis port
host: "127.0.0.1"
password: "helloearth"
db: 0 # Redis db_num
# used to specify the default data source for multiple data resourece
defaultDataSourceName: "default"
@@ -72,7 +78,7 @@ mml:
# Tracking configuration
trace:
enabled: false
enabled: true
host: "172.16.5.100" # Fill in the specific IP address
port: 33033
@@ -103,9 +109,7 @@ omc:
vendor: ""
dn: ""
chk2ne: false
capability: 50
sn: "-"
expiryDate: "-"
checksign: false
rootDir: /usr/local/omc
binDir: /usr/local/omc/bin

View File

@@ -1,5 +1,5 @@
Package: OMC
Version: 1.2506.2-YYYYMMDD
Version: 2.2503.6-YYYYMMDD
Section: AGrandTech
Prioritt: optional
Architecture: amd64

View File

@@ -47,7 +47,7 @@ fi
for LogoFile in ${LogoFileList}; do
if [ ! -e "${OMCStaticDir}/logo/${LogoFile}" ]; then
cp ${OMCStaticDir}/psap.d/logo/${LogoFile} ${OMCStaticDir}/logo;
cp ${OMCStaticDir}/omc.d/logo/${LogoFile} ${OMCStaticDir}/logo;
fi
done
@@ -89,7 +89,7 @@ if [ "$M_PARAM" = "install" -o "$M_PARAM" = "upgrade" ]; then
fi
fi
echo -n "Starting PSAP service ... "
echo -n "Starting OMC service ... "
systemctl start sshsvc.service
systemctl start restagent.service
echo "done"

View File

@@ -7,7 +7,7 @@ rm -f /usr/local/bin/omcd
systemctl daemon-reload
if systemctl list-units --type=service --all | grep -q 'restagent.service'; then
echo -n "Stopping PSAP service ... "
echo -n "Stopping OMC service ... "
systemctl stop restagent.service
systemctl stop sshsvc.service
echo "done"

View File

@@ -2,7 +2,7 @@
systemctl daemon-reload
if systemctl list-units --type=service --all | grep -q 'restagent.service'; then
echo -n "Stopping PSAP service ... "
echo -n "Stopping OMC service ... "
systemctl stop restagent.service
systemctl stop sshsvc.service
echo "done"

View File

@@ -11,19 +11,12 @@ usage() {
echo " -m, =be|fe|all be: only process back-end code, default if non input"
echo " fe: only process front-end code"
echo " all: process all include be and fe"
echo " -c, =ba|psap ba: customized for BA OMC, psap: customized for PSAP Portal"
echo " -c, =ba ba: customized for BA OMC"
}
pkgtype=""
new_args=()
be_args=()
handle_invalid_option() {
echo "Invalid option: -$1" >&2
usage
exit 2
}
# Traverse all parameters
for arg in "$@"; do
if [[ "$arg" == "deb" || "$arg" == "rpm" ]]; then
@@ -61,15 +54,12 @@ while getopts "m:r:c:d" option; do
if [ "${c_arg}" == "ba" ]; then
pkgtype="badeb"
be_args+=("${pkgtype}")
elif [ "${c_arg}" == "psap" ]; then
pkgtype="psapdeb"
be_args+=("${pkgtype}")
else
handle_invalid_option "$OPTARG"
fi
fi
;;
\?)
handle_invalid_option "$OPTARG"
echo "Invalid option: -$OPTARG" >&2
usage
exit 2
;;
esac
done
@@ -117,29 +107,21 @@ makefe() {
}
makebe() {
cd ${builddir}/bin
cd ${builddir}
#chmod +x mkpkg.sh
chmod +x build.sh
./build.sh ${be_args[@]}
}
post_makepkg() {
cd ${builddir}
git checkout debbuild/DEBIAN/
git checkout debbuild/22.04/DEBIAN/
}
case "${m_arg}" in
fe)
makefe
;;
all)
makefe
makebe
post_makepkg
makebe
;;
be | *)
makebe
post_makepkg
makebe
;;
esac

View File

@@ -8,7 +8,7 @@
Name: %{project_lname}
Summary: 5GC OMC
Version: 1.2506.2
Version: 2.2503.6
Release: %{release_date}
Vendor: omc
URL: https://www.omc.com/
@@ -61,7 +61,7 @@ done
if [ ! -e "${FERootDir}/config.js" ]; then cp ${FERootDir}/default/config.js ${FERootDir}; fi
for LogoFile in ${LogoFileList}; do
if [ ! -e "${OMCStaticDir}/logo/${LogoFile}" ]; then
cp ${OMCStaticDir}/psap.d/logo/${LogoFile} ${OMCStaticDir}/logo;
cp ${OMCStaticDir}/omc.d/logo/${LogoFile} ${OMCStaticDir}/logo;
fi
done
if ! id -u omc >/dev/null 2>&1 ; then useradd -d /opt/omc -m -s /bin/bash -p1000ftp@kp omc; else echo "user omc exist"; fi