From c2745341e327b99d1e3c16af5bb678f23cba860f Mon Sep 17 00:00:00 2001 From: "Jumping Yang[Wicresoft]" Date: Wed, 17 Apr 2024 13:19:45 +0800 Subject: [PATCH 1/2] Copying symbol binaries for WinDbg support. (#24) * Add windbg support. * Update Makefile.kits * Update Makefile.kits * Update Makefile.kits * Update Makefile.kits * Update Makefile.kits * Update Makefile.kits --- build/Makefile.kits | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/build/Makefile.kits b/build/Makefile.kits index 820982a1..31e541e8 100644 --- a/build/Makefile.kits +++ b/build/Makefile.kits @@ -136,6 +136,8 @@ kit : GetLinuxOS scx_scripts sepolicy ifneq ($(COMBINED_PACKAGES),1) sudo rm -rf $(STAGING_DIR) + mkdir -p $(INTERMEDIATE_DIR)/windbg + cp $(INTERMEDIATE_DIR)/libSCXCoreProviderModule.so $(INTERMEDIATE_DIR)/windbg/libSCXCoreProviderModule.so python $(SCXPAL_DIR)/installer/InstallBuilder/installbuilder.py \ --BASE_DIR=$(SCX_BRD) \ --TARGET_DIR=$(INTERMEDIATE_DIR) \ @@ -187,7 +189,14 @@ else # First comes RPM symbol packages sudo rm -rf $(STAGING_DIR) rm -rf $(INTERMEDIATE_DIR)/{098,100} - mkdir -p $(INTERMEDIATE_DIR)/{098,100} + mkdir -p $(INTERMEDIATE_DIR)/{098,100} $(INTERMEDIATE_DIR)/windbg + ifeq ($(ENABLE_SECURITY_HARDENING),1) + cp $(INTERMEDIATE_DIR)/libSCXCoreProviderModule.so $(INTERMEDIATE_DIR)/windbg/libSCXCoreProviderModule.so + else + ifneq ($(PF_ARCH),x64) + cp $(INTERMEDIATE_DIR)/libSCXCoreProviderModule.so $(INTERMEDIATE_DIR)/windbg/libSCXCoreProviderModule.so + endif + endif python $(SCXPAL_DIR)/installer/InstallBuilder/installbuilder.py \ --BASE_DIR=$(SCX_BRD) \ @@ -227,7 +236,14 @@ else sudo rm -rf $(STAGING_DIR) ifeq ($(PF_ARCH),x64) rm -rf $(INTERMEDIATE_DIR)/110 - mkdir -p $(INTERMEDIATE_DIR)/110 + mkdir -p $(INTERMEDIATE_DIR)/110 $(INTERMEDIATE_DIR)/windbg + ifeq ($(ENABLE_SECURITY_HARDENING),1) + cp $(INTERMEDIATE_DIR)/libSCXCoreProviderModule.so $(INTERMEDIATE_DIR)/windbg/libSCXCoreProviderModule.so + else + ifneq ($(PF_ARCH),x64) + cp $(INTERMEDIATE_DIR)/libSCXCoreProviderModule.so $(INTERMEDIATE_DIR)/windbg/libSCXCoreProviderModule.so + endif + endif python $(SCXPAL_DIR)/installer/InstallBuilder/installbuilder.py \ --BASE_DIR=$(SCX_BRD) \ --TARGET_DIR=$(INTERMEDIATE_DIR)/110 \ @@ -623,6 +639,10 @@ ifneq ($(COMBINED_PACKAGES),1) cd $(INTERMEDIATE_DIR); cp `cat $(INTERMEDIATE_DIR)/$(PACKAGE_FILENAME)`.sh $(TARGET_DIR) endif # ifneq ($(DISTRO_TYPE),Linux) + # copy the symbol binaries to PACKAGE_DIR/windbg for native building + mkdir -p $(TARGET_DIR)/windbg + cp $(INTERMEDIATE_DIR)/windbg/libSCXCoreProviderModule.so $(TARGET_DIR)/windbg/libSCXCoreProviderModule.so + else # ifneq ($(COMBINED_PACKAGES),1) # (Copying for combined packages) @@ -660,6 +680,15 @@ else # ifneq ($(COMBINED_PACKAGES),1) endif ../installer/bundle/create_bundle.sh $(DISTRO_TYPE) $(INTERMEDIATE_DIR) $(OUTPUT_BUNDLE_PREFIX).tar $(OUTPUT_BUNDLE_PREFIX) `cat $(INTERMEDIATE_DIR)/100/omi_package_filename` $(DISABLE_LISTENER) cp $(INTERMEDIATE_DIR)/$(OUTPUT_BUNDLE_PREFIX).sh $(TARGET_DIR) + mkdir -p $(TARGET_DIR)/windbg; + # copy the symbol binaries to PACKAGE_DIR/windbg for Linux building + ifeq ($(ENABLE_SECURITY_HARDENING),1) + cp $(INTERMEDIATE_DIR)/windbg/libSCXCoreProviderModule.so $(TARGET_DIR)/windbg/libSCXCoreProviderModule.so + else + ifneq ($(PF_ARCH),x64) + cp $(INTERMEDIATE_DIR)/windbg/libSCXCoreProviderModule.so $(TARGET_DIR)/windbg/libSCXCoreProviderModule.so + endif + endif endif # ifneq ($(COMBINED_PACKAGES),1) From 4ab023df103cb02af4a3d5d7a12d4ddcd9bd11c0 Mon Sep 17 00:00:00 2001 From: "Jumping Yang[Wicresoft]" Date: Tue, 4 Jun 2024 17:26:51 +0800 Subject: [PATCH 2/2] Support for openssl 3.x. (#26) * Supports openssl 3.x. * Update Linux.data --- installer/bundle/bundle_skel_Linux.sh | 4 ++-- installer/datafiles/Linux.data | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/installer/bundle/bundle_skel_Linux.sh b/installer/bundle/bundle_skel_Linux.sh index 189ff2ef..c380362c 100644 --- a/installer/bundle/bundle_skel_Linux.sh +++ b/installer/bundle/bundle_skel_Linux.sh @@ -201,7 +201,7 @@ ulinux_detect_openssl_version() { fi OPENSSL_SYSTEM_VERSION_100=`echo $OPENSSL_SYSTEM_VERSION_FULL | grep -Eq '^1.0.'; echo $?` [ `uname -m` = "x86_64" ] && OPENSSL_SYSTEM_VERSION_110=`echo $OPENSSL_SYSTEM_VERSION_FULL | grep -Eq '^1.1.'; echo $?` - [ `uname -m` = "x86_64" ] && OPENSSL_SYSTEM_VERSION_300=`echo $OPENSSL_SYSTEM_VERSION_FULL | grep -Eq '^3.0.'; echo $?` + [ `uname -m` = "x86_64" ] && OPENSSL_SYSTEM_VERSION_300=`echo $OPENSSL_SYSTEM_VERSION_FULL | grep -Eq '^3.'; echo $?` if [ $OPENSSL_SYSTEM_VERSION_100 = 0 ]; then TMPBINDIR=100 elif [ $OPENSSL_SYSTEM_VERSION_110 = 0 ]; then @@ -212,7 +212,7 @@ ulinux_detect_openssl_version() { echo "Error: This system does not have a supported version of OpenSSL installed." echo "This system's OpenSSL version: $OPENSSL_SYSTEM_VERSION_FULL" if [ `uname -m` = "x86_64" ];then - echo "Supported versions: 1.0.*, 1.1.*, 3.0.*" + echo "Supported versions: 1.0.*, 1.1.*, 3.*" else echo "Supported versions: 1.0.*" fi diff --git a/installer/datafiles/Linux.data b/installer/datafiles/Linux.data index 8915e86c..ebbc785e 100644 --- a/installer/datafiles/Linux.data +++ b/installer/datafiles/Linux.data @@ -92,9 +92,9 @@ if [ `uname -m` != "x86_64" ];then exit 1 fi else - $OPENSSL_PATH version | awk '{print $2}' | grep -Eq '^1.0.|^1.1|^3.0' + $OPENSSL_PATH version | awk '{print $2}' | grep -Eq '^1.0.|^1.1|^3.' if [ $? -ne 0 ]; then - echo 'Unsupported OpenSSL version - must be either 1.0.* or 1.1.*,3.0.*.' + echo 'Unsupported OpenSSL version - must be either 1.0.* or 1.1.*,3.*.' echo 'Installation cannot proceed.' exit 1 fi