diff --git a/tsg-rpm-script/check_tsg_debuginfo_rpm_version.sh b/tsg-rpm-script/check_tsg_debuginfo_rpm_version.sh new file mode 100644 index 0000000..3a2c526 --- /dev/null +++ b/tsg-rpm-script/check_tsg_debuginfo_rpm_version.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +# 验证 debufinfo 的版本与软件 rpm 的版本是否一致 +verify_debuginfo_rpm_version() +{ + rpm_name=${1} + printf "[%-35s]\t" "${rpm_name}" + rpm_vers=`echo ${rpm_name} | awk -F "-[0-9]" '{print $2}'` + is_match=`rpm -qa | grep ${rpm_vers} | wc -l` + if [ ${is_match} -eq 2 ]; then + printf "[OK]\n" + else + printf "\e[31m[FAIL]\e[0m\n" + fi +} + +RPM_VERSION_FILE="rpm_version.yml" +if [ ! -f "${RPM_VERSION_FILE}" ]; then + echo "Please download ${RPM_VERSION_FILE} form https://git.mesalab.cn/tsg/tsg-os-buildimage/" + exit 0 +fi + +RPM_ARRAY=`cat ${RPM_VERSION_FILE} | grep ":" | grep "[0-9]" | awk -F ":" '{print $2}'` +for rpm in ${RPM_ARRAY} +do + verify_debuginfo_rpm_version ${rpm} +done diff --git a/tsg-rpm-script/check_tsg_installed_rpm_version.sh b/tsg-rpm-script/check_tsg_installed_rpm_version.sh new file mode 100644 index 0000000..2fa2421 --- /dev/null +++ b/tsg-rpm-script/check_tsg_installed_rpm_version.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +RPM_VERSION_FILE="rpm_version.yml" +if [ ! -f "${RPM_VERSION_FILE}" ]; then + echo "Please download ${RPM_VERSION_FILE} form https://git.mesalab.cn/tsg/tsg-os-buildimage/" + exit 0 +fi + +RPM_ARRAY=`cat ${RPM_VERSION_FILE} | grep ":" | grep "[0-9]" | awk -F ":" '{print $2}'` +for rpm in ${RPM_ARRAY} +do + printf "[%-35s]\t" "${rpm}" + is_install=`rpm -qa | grep ${rpm} | wc -l` + if [ $is_install -eq 1 ];then + printf "[install]\n" + else + printf "\e[31m[uninstall]\e[0m\n" + fi +done diff --git a/tsg-rpm-script/download_last_TSG-9140-OS.sh b/tsg-rpm-script/download_last_TSG-9140-OS.sh new file mode 100644 index 0000000..480a2b9 --- /dev/null +++ b/tsg-rpm-script/download_last_TSG-9140-OS.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +URI_ARRAY=`curl --user luwenpeng:LWP@repo https://repo.geedge.net/pulp/content/install/testing/tsg-os-images/ | grep href | awk -F = '{print $2}' | awk -F '"' '{print $2}' | sort -n | grep NPB | tail -n 1` + +echo "======================================" +echo "Last TSG-9140-OS: ${URI_ARRAY}" +echo "======================================" + +for uri in ${URI_ARRAY[@]} +do + wget --http-user=luwenpeng --http-password=LWP@repo -c https://repo.geedge.net/pulp/content/install/testing/tsg-os-images/${uri} & +done diff --git a/tsg-rpm-script/install_tsg_debuginfo_rpm.sh b/tsg-rpm-script/install_tsg_debuginfo_rpm.sh new file mode 100644 index 0000000..0f6440a --- /dev/null +++ b/tsg-rpm-script/install_tsg_debuginfo_rpm.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +RPM_VERSION_FILE="rpm_version.yml" +if [ ! -f "${RPM_VERSION_FILE}" ]; then + echo "Please download ${RPM_VERSION_FILE} form https://git.mesalab.cn/tsg/tsg-os-buildimage/" + exit 0 +fi + +RPM_ARRAY=`cat ${RPM_VERSION_FILE} | grep ":" | grep "[0-9]" | awk -F ":" '{print $2}'` +for rpm in ${RPM_ARRAY} +do + printf "\e[31m debuginfo-install ${rpm}\e[0m\n" + debuginfo-install -y ${rpm} +done diff --git a/tsg-rpm-script/rpm_version.yml b/tsg-rpm-script/rpm_version.yml new file mode 100644 index 0000000..539021c --- /dev/null +++ b/tsg-rpm-script/rpm_version.yml @@ -0,0 +1,74 @@ +certstore_rpm_version: + certstore: certstore-2.1.8.20210604.8077136 + +firewall_rpm_version: + capture_packet_plug: capture_packet_plug-3.0.6.a2db4a4 + conn_telemetry: conn_telemetry-1.0.2.8d6da43 + dns: dns-2.0.14.6d7e2f8 + ftp: ftp-1.0.8.13d5fda + fw_dns_plug: fw_dns_plug-3.0.7.604fd5d + fw_ftp_plug: fw_ftp_plug-3.0.1.0a78573 + fw_http_plug: fw_http_plug-3.2.6.36a8829 + fw_mail_plug: fw_mail_plug-3.1.1.777fa90 + fw_quic_plug: fw_quic_plug-3.0.4.947ef77 + fw_ssl_plug: fw_ssl_plug-3.1.3.6729f7a + http: http-2.0.5.c61ad9a + mail: mail-1.0.11.48abeae + quic: quic-1.1.18.13ba53b + ssl: ssl-2.0.2.1389716 + tsg_conn_sketch: tsg_conn_sketch-3.0.3.fcdcd10 + rtp: rtp-1.0.4.91b4ab7 + mesa_sip: mesa_sip-1.1.2.b4bc77d + fw_voip_plug: fw_voip_plug-1.0.6.341fe83 + app_proto_identify: app_proto_identify-2.0.2.55a9520 + app_proto_engine: app_proto_engine-2.0.5.1df79c4 + gtp: gtp-1.0.5.afa055c + gtp_signaling_plug: gtp_signaling_plug-1.0.2.2dfced5 + +framework_rpm_version: + libcjson: libcjson-1.7.10.ab2896f + libdocumentanalyze: libdocumentanalyze-2.0.6.2d1abe0 + libmaatframe: libmaatframe-3.2.2.502a6e3 + libMESA_field_stat: libMESA_field_stat-1.0.2.6d45eed + libMESA_field_stat2: libMESA_field_stat2-2.9.10.72ac4f1 + libMESA_handle_logger: libMESA_handle_logger-2.0.8.f76af2f + libMESA_htable: libMESA_htable-3.10.12.cf4ccfc + libMESA_prof_load: libMESA_prof_load-1.0.6.c6da36a + librulescan: librulescan-2.2.3.93a68a2 + libtsglua: libtsglua-1.0.8.0dbf2e6 + libwiredcfg: libwiredcfg-2.0.6.67ae0ab + libWiredLB: libWiredLB-2.0.5.4629165 + libbreakpad_mini: libbreakpad_mini-1.0.2.a56ef00 + libhos-client-cpp: libhos-client-cpp-2.0.1.68f7b08 + +kni_rpm_version: + kni: kni-21.05.02.d64fa9a + +mrzcpd_rpm_version: + mrzcpd: mrzcpd-4.4.7.cea4bb9 + +sapp_rpm_version: + sapp: sapp-4.2.40.33f5b18 + tcpdump_mesa: tcpdump_mesa-1.0.6.faa4eba + +tfe_rpm_version: + tfe: tfe-4.5.3.d18b647 + +tsg_app_rpm_version: + app_sketch_local: app_sketch_local-4.0.1.157bff7 + +tsg_master_rpm_version: + tsg_master: tsg_master-5.0.2.0320b4b + +tsg_diagnose_rpm_version: + tsg_diagnose: tsg-diagnose-21.03.01.39beba7 + +http_healthcheck_rpm_version: + http_healthcheck: http_healthcheck-21.06.01.d0685bb + +wannat_wangw_rpm_version: + libwangw: libwangw-1.3.0.bcc9c59 + +wire_graft_rpm_version: + libwire_graft: libwire_graft-1.2.8.d123db9 + libwire_graft-devel: libwire_graft-devel-1.2.8.d123db9