Change concept of ULINUX (for universal SSL build, always build ULINUX)

Significant changes to how SCXCore agent deals with ULINUX. In the past,
--enable-ulinux meant two things: Build universal binaries (that can run
anywhere based on Linux features and not based on platform #ifdefs), and
build for universal SSL installations (link against both versions of SSL).

Now --enable-ulinux only builds for universal SSL installations. We will
always build universal binaries. This eliminates Redhat/SuSE-specific kits.

Other changes along the way:

1. Target directory is only populated with shipping bits. This means that
   lots of superflous stuff isn't copied on every system build to our
   build archives.

2. Eliminted the concept of universal_r and universal_d binaries. A
   universal binary is a universal binary, regardless of DPKG vs. RPM
   packaging. This squashes the universal_r/universal_d naming convention.

3. Made disable-port (disabling port 1270 listener) a configuration
   option, making it easier for packages that need this to specify it.
   Currently, this qualifier also disables "mega-bundles". The assumption
   is that, if you want a lightweight agent without the listener, you
   likely want to handle mega-bundles (bundles with other components)
   yourself, rather than to assume SCXCore behavior.

4. Reworked bundling packaging to be cleaner at build time, and to properly
   abort the build if a bundle build problem was encountered.

5. Reworked unit tests to actually pass on non-SuSE and non-Redhat systems.
   In the past, many unit tests would fail on CentOS platforms.
This commit is contained in:
Jeff Coffler 2015-12-28 09:19:17 -08:00
Родитель b77976f0b7
Коммит 17a8820ef4
35 изменённых файлов: 397 добавлений и 594 удалений

Просмотреть файл

@ -73,8 +73,8 @@ COREPROVIDERMODULE_LINK_STATICLIBS = $(addprefix -l, $(COREPROVIDERMODULE_STATIC
OMI_FORCED_TARGETS=$(STATIC_PROVIDERLIB_OBJFILES)
OMI_DYNAMIC_LIBS=-lmicxx
$(TARGET_DIR)/libSCXCoreProviderModule.$(PF_DYN_LIB_FILE_SUFFIX) : $(COREPROVIDERMODULE_STATICLIB_DEPFILES) $(SCXPAL_STATICLIB_DEPFILES) $(INTERMEDIATE_DIR)/liblogpolicy.$(PF_STAT_LIB_FILE_SUFFIX)
-$(MKPATH) $(TARGET_DIR)
$(INTERMEDIATE_DIR)/libSCXCoreProviderModule.$(PF_DYN_LIB_FILE_SUFFIX) : $(COREPROVIDERMODULE_STATICLIB_DEPFILES) $(SCXPAL_STATICLIB_DEPFILES) $(INTERMEDIATE_DIR)/liblogpolicy.$(PF_STAT_LIB_FILE_SUFFIX)
-$(MKPATH) $(INTERMEDIATE_DIR)
$(PROFILING) $(LINK_DYNLIB) $(COREPROVIDERMODULE_EXTRA_LINKFLAGS) $(LINK_OUTFLAG) $(OMI_FORCED_TARGETS) -L$(SCXOMI_LIBS) $(COREPROVIDERMODULE_LINK_STATICLIBS) $(OMI_DYNAMIC_LIBS) $(SCXPAL_LINK_STATICLIBS) $(LDFLAGS_COREPROVIDERMODULE) $(CXX_CGEN_FLAGS) $(SCXPAL_SRC_ROOT)/scxcorelib/pal/noop.cpp
#--------------------------------------------------------------------------------
@ -95,8 +95,8 @@ TESTPROVIDERMODULE_LINK_STATICLIBS = $(addprefix -l, $(TESTPROVIDERMODULE_STATIC
# Get the flags used for retaining exposed symbols
TESTPROVIDERMODULE_SYMBOLS_LINKFLAGS = $(call get_ld_flags_for_retaining_symbols,$(TESTPROVIDERMODULE_EXPOSED_SYMS))
$(TARGET_DIR)/libSCXTestProviderModule.$(PF_DYN_LIB_FILE_SUFFIX) : $(TESTPROVIDERMODULE_STATICLIB_DEPFILES) $(INTERMEDIATE_DIR)/testprovider.map $(INTERMEDIATE_DIR)/testprovider.exp
-$(MKPATH) $(TARGET_DIR)
$(INTERMEDIATE_DIR)/libSCXTestProviderModule.$(PF_DYN_LIB_FILE_SUFFIX) : $(TESTPROVIDERMODULE_STATICLIB_DEPFILES) $(INTERMEDIATE_DIR)/testprovider.map $(INTERMEDIATE_DIR)/testprovider.exp
-$(MKPATH) $(INTERMEDIATE_DIR)
$(PROFILING) $(LINK_DYNLIB) $(TESTPROVIDERMODULE_EXTRA_LINKFLAGS) $(LINK_OUTFLAG) $(TESTPROVIDERMODULE_SYMBOLS_LINKFLAGS) $(TESTPROVIDERMODULE_LINK_STATICLIBS) $(SCXPAL_LINK_STATICLIBS) $(LDFLAGS_TESTPROVIDERMODULE) $(PF_TESTPROVIDERLIB_EXTRA_LIBS)
$(INTERMEDIATE_DIR)/testprovider.map:
@ -161,9 +161,9 @@ endif
# Foreach XYZ in the list above, build $(INTERMEDIATE_DIR)/libXYZ.a
SCXADMIN_STATICLIB_DEPFILES = $(addprefix $(INTERMEDIATE_DIR)/lib, $(addsuffix .$(PF_STAT_LIB_FILE_SUFFIX), $(SCXADMIN_STATICLIB_DEPS)))
$(TARGET_DIR)/scxadmin$(PF_EXE_FILE_SUFFIX): \
$(INTERMEDIATE_DIR)/scxadmin$(PF_EXE_FILE_SUFFIX): \
$(SCXADMIN_OBJFILES) $(INTERMEDIATE_DIR)/libscxadmin.$(PF_STAT_LIB_FILE_SUFFIX) $(SCXADMIN_DEPFILES) $(SCXADMIN_STATICLIB_DEPFILES)
-$(MKPATH) $(TARGET_DIR)/tools
-$(MKPATH) $(INTERMEDIATE_DIR)/tools
$(PROFILING) $(LINK) $(LINK_OUTFLAG) $(SCXADMIN_OBJFILES) $(SCXADMIN_STATICLIB_DEPFILES) $(SCXPAL_STATICLIB_DEPFILES) $(LDFLAGS_SCX_ADMIN_TOOL) $(LDFLAGS_EXECUTABLE)
#================================================================================
@ -197,9 +197,9 @@ LOGFILEREADER_STATICLIB_DEPS = \
# Foreach XYZ in the list above, build $(INTERMEDIATE_DIR)/libXYZ.a
LOGFILEREADER_STATICLIB_DEPFILES = $(addprefix $(INTERMEDIATE_DIR)/lib, $(addsuffix .$(PF_STAT_LIB_FILE_SUFFIX), $(LOGFILEREADER_STATICLIB_DEPS)))
$(TARGET_DIR)/scxlogfilereader$(PF_EXE_FILE_SUFFIX): \
$(INTERMEDIATE_DIR)/scxlogfilereader$(PF_EXE_FILE_SUFFIX): \
$(LOGFILEREADER_OBJFILES) $(INTERMEDIATE_DIR)/libscxlogfilereader.$(PF_STAT_LIB_FILE_SUFFIX) $(LOGFILEREADER_DEPFILES) $(LOGFILEREADER_STATICLIB_DEPFILES) $(SCXPAL_STATICLIB_DEPFILES)
-$(MKPATH) $(TARGET_DIR)/tools
-$(MKPATH) $(INTERMEDIATE_DIR)/tools
$(PROFILING) $(LINK) $(LINK_OUTFLAG) $(LOGFILEREADER_OBJFILES) $(LOGFILEREADER_STATICLIB_DEPFILES) $(SCXPAL_STATICLIB_DEPFILES) $(LDFLAGS_SCX_ADMIN_TOOL) $(LDFLAGS_EXECUTABLE)
#================================================================================
@ -215,9 +215,9 @@ REGEX_TEST_OBJFILES = $(call src_to_obj,$(REGEX_TEST_SRCFILES))
REGEX_TEST_DEPFILES=$(REGEX_TEST_OBJFILES:.$(PF_OBJ_FILE_SUFFIX)=.d)
$(TARGET_DIR)/regex_test$(PF_EXE_FILE_SUFFIX): \
$(INTERMEDIATE_DIR)/regex_test$(PF_EXE_FILE_SUFFIX): \
$(REGEX_TEST_OBJFILES) $(REGEX_TEST_DEPFILES) $(REGEX_TEST_STATICLIB_DEPFILES)
-$(MKPATH) $(TARGET_DIR)/tools
-$(MKPATH) $(INTERMEDIATE_DIR)/tools
$(PROFILING) $(LINK) $(LINK_OUTFLAG) $(REGEX_TEST_OBJFILES) $(SCXPAL_STATICLIB_DEPFILES) $(LDFLAGS_TESTRUNNER) $(LDFLAGS_EXECUTABLE)
#================================================================================
@ -233,40 +233,40 @@ OMI_PREEXEC_OBJFILES = $(call src_to_obj,$(OMI_PREEXEC_SRCFILES))
OMI_PREEXEC_DEPFILES=$(OMI_PREEXEC_OBJFILES:.$(PF_OBJ_FILE_SUFFIX)=.d)
$(TARGET_DIR)/omi_preexec$(PF_EXE_FILE_SUFFIX): $(OMI_PREEXEC_OBJFILES) $(OMI_PREEXEC_DEPFILES)
-$(MKPATH) $(TARGET_DIR)/tools
$(INTERMEDIATE_DIR)/omi_preexec$(PF_EXE_FILE_SUFFIX): $(OMI_PREEXEC_OBJFILES) $(OMI_PREEXEC_DEPFILES)
-$(MKPATH) $(INTERMEDIATE_DIR)/tools
$(PROFILING) $(LINK) $(LINK_OUTFLAG) $(OMI_PREEXEC_OBJFILES) $(LDFLAGS_EXECUTABLE)
#================================================================================
# Development Convenience Targets
#================================================================================
logfilereader-tool: $(TARGET_DIR)/scxlogfilereader$(PF_EXE_FILE_SUFFIX)
admin-tool: $(TARGET_DIR)/scxadmin$(PF_EXE_FILE_SUFFIX)
regex-test: $(TARGET_DIR)/regex_test$(PF_EXE_FILE_SUFFIX)
omi-preexec: $(TARGET_DIR)/omi_preexec$(PF_EXE_FILE_SUFFIX)
logfilereader-tool: $(INTERMEDIATE_DIR)/scxlogfilereader$(PF_EXE_FILE_SUFFIX)
admin-tool: $(INTERMEDIATE_DIR)/scxadmin$(PF_EXE_FILE_SUFFIX)
regex-test: $(INTERMEDIATE_DIR)/regex_test$(PF_EXE_FILE_SUFFIX)
omi-preexec: $(INTERMEDIATE_DIR)/omi_preexec$(PF_EXE_FILE_SUFFIX)
ifeq ($(PF_DISTRO),ULINUX)
ssl-tool: $(TARGET_DIR)/$(OPENSSL098DIR)/scxsslconfig$(PF_EXE_FILE_SUFFIX) $(TARGET_DIR)/$(OPENSSL100DIR)/scxsslconfig$(PF_EXE_FILE_SUFFIX)
ifeq ($(COMBINED_PACKAGES),1)
ssl-tool: $(INTERMEDIATE_DIR)/$(OPENSSL098DIR)/scxsslconfig$(PF_EXE_FILE_SUFFIX) $(INTERMEDIATE_DIR)/$(OPENSSL100DIR)/scxsslconfig$(PF_EXE_FILE_SUFFIX)
else
ssl-tool: $(TARGET_DIR)/scxsslconfig$(PF_EXE_FILE_SUFFIX)
ssl-tool: $(INTERMEDIATE_DIR)/scxsslconfig$(PF_EXE_FILE_SUFFIX)
endif
# All SCX tools
scx-tools: logfilereader-tool admin-tool regex-test omi-preexec ssl-tool
coreprovider: \
$(TARGET_DIR)/libSCXCoreProviderModule.$(PF_DYN_LIB_FILE_SUFFIX)
$(INTERMEDIATE_DIR)/libSCXCoreProviderModule.$(PF_DYN_LIB_FILE_SUFFIX)
providers: \
$(TARGET_DIR)/libSCXTestProviderModule.$(PF_DYN_LIB_FILE_SUFFIX) \
$(TARGET_DIR)/libSCXCoreProviderModule.$(PF_DYN_LIB_FILE_SUFFIX)
$(INTERMEDIATE_DIR)/libSCXTestProviderModule.$(PF_DYN_LIB_FILE_SUFFIX) \
$(INTERMEDIATE_DIR)/libSCXCoreProviderModule.$(PF_DYN_LIB_FILE_SUFFIX)
# An alias
omi: omi_all
omi_all:
ifeq ($(PF_DISTRO),ULINUX)
ifeq ($(COMBINED_PACKAGES),1)
$(ECHO) "========================= Performing make omi"
@ -319,27 +319,27 @@ endif
# Used to generate compontents necessary for other projects to compile with the
# core components
devel-deps: $(COREPROVIDERMODULE_STATICLIB_DEPFILES) $(SCXPAL_TARGET_DIR)/libscxassertcppunit.$(PF_STAT_LIB_FILE_SUFFIX) omi
-$(RMDIR) $(TARGET_DIR)/scxcore-devel
ifeq ($(PF_DISTRO),ULINUX)
$(MKPATH) $(TARGET_DIR)/scxcore-devel/lib/$(OPENSSL098DIR)
$(MKPATH) $(TARGET_DIR)/scxcore-devel/lib/$(OPENSSL100DIR)
-$(RMDIR) $(INTERMEDIATE_DIR)/scxcore-devel
ifeq ($(COMBINED_PACKAGES),1)
$(MKPATH) $(INTERMEDIATE_DIR)/scxcore-devel/lib/$(OPENSSL098DIR)
$(MKPATH) $(INTERMEDIATE_DIR)/scxcore-devel/lib/$(OPENSSL100DIR)
else
$(MKPATH) $(TARGET_DIR)/scxcore-devel/lib
$(MKPATH) $(INTERMEDIATE_DIR)/scxcore-devel/lib
endif
$(COPYDIR) $(SCX_SHARED_INCLUDE_DIR) $(TARGET_DIR)/scxcore-devel/shared
$(COPY) $(SCXPAL_STATICLIB_DEPFILES) $(TARGET_DIR)/scxcore-devel/lib
$(COPY) $(COREPROVIDERMODULE_STATICLIB_DEPFILES) $(TARGET_DIR)/scxcore-devel/lib
$(COPY) $(SCXPAL_TARGET_DIR)/libscxassertcppunit.$(PF_STAT_LIB_FILE_SUFFIX) $(TARGET_DIR)/scxcore-devel/lib
$(MKPATH) $(TARGET_DIR)/scxcore-devel/include/testutils
$(COPY) $(SCXPAL_TEST_ROOT)/include/testutils/scxunit.h $(TARGET_DIR)/scxcore-devel/include/testutils
$(COPYDIR) $(SCX_SHARED_INCLUDE_DIR) $(INTERMEDIATE_DIR)/scxcore-devel/shared
$(COPY) $(SCXPAL_STATICLIB_DEPFILES) $(INTERMEDIATE_DIR)/scxcore-devel/lib
$(COPY) $(COREPROVIDERMODULE_STATICLIB_DEPFILES) $(INTERMEDIATE_DIR)/scxcore-devel/lib
$(COPY) $(SCXPAL_TARGET_DIR)/libscxassertcppunit.$(PF_STAT_LIB_FILE_SUFFIX) $(INTERMEDIATE_DIR)/scxcore-devel/lib
$(MKPATH) $(INTERMEDIATE_DIR)/scxcore-devel/include/testutils
$(COPY) $(SCXPAL_TEST_ROOT)/include/testutils/scxunit.h $(INTERMEDIATE_DIR)/scxcore-devel/include/testutils
ifeq ($(LOCAL_OMI),1)
# Create an OMI development area for use in running utilities
# TODO - Is there an alias for mkdir? Not $(MKDIR) or $(MAKEDIR), those didn't work
$(RMDIR) -rf $(TARGET_DIR)/omi
-mkdir -p $(TARGET_DIR)/omi/etc/omiregister/root-scx
$(COPY) -r $(SCXOMI_DIR)/etc $(TARGET_DIR)/omi
$(COPY) -r $(SCXOMI_DEV_ROOT)/* $(TARGET_DIR)/omi
$(COPY) -r $(SCXOMI_DIR)/share $(TARGET_DIR)/omi
$(RMDIR) -rf $(INTERMEDIATE_DIR)/omi
-mkdir -p $(INTERMEDIATE_DIR)/omi/etc/omiregister/root-scx
$(COPY) -r $(SCXOMI_DIR)/etc $(INTERMEDIATE_DIR)/omi
$(COPY) -r $(SCXOMI_DEV_ROOT)/* $(INTERMEDIATE_DIR)/omi
$(COPY) -r $(SCXOMI_DIR)/share $(INTERMEDIATE_DIR)/omi
endif
#================================================================================
@ -353,8 +353,8 @@ doxygen_corelib:
( cat doxygen_scxcore.cfg ; \
echo "STRIP_FROM_PATH=$(SCX_SRC_ROOT)"; \
echo "OUTPUT_DIRECTORY=$(DOXYGEN_OUTPUT_DIR)/scxcore_doc"; \
echo "WARN_LOGFILE=$(TARGET_DIR)/doxygen_build.log"; ) | doxygen -
if [ -s $(TARGET_DIR)/doxygen_build.log ] ; then echo "$(TARGET_DIR)/doxygen_build.log:1:Warnings in doxygenlog"; fi
echo "WARN_LOGFILE=$(INTERMEDIATE_DIR)/doxygen_build.log"; ) | doxygen -
if [ -s $(INTERMEDIATE_DIR)/doxygen_build.log ] ; then echo "$(INTERMEDIATE_DIR)/doxygen_build.log:1:Warnings in doxygenlog"; fi
doxygen_clean:
-$(RMDIR) $(DOXYGEN_OUTPUT_DIR)/scxcore_doc

Просмотреть файл

@ -5,64 +5,44 @@
# 2007-08-23
#--------------------------------------------------------------------------------
ifeq ($(PF_DISTRO_ULINUX_D),1)
PF_AGENTTYPE=D
else
ifeq ($(PF_DISTRO_ULINUX_R),1)
PF_AGENTTYPE=R
else
PF_AGENTTYPE=
endif
endif
ifneq ($(COMBINED_PACKAGES),1)
DATAFILES = Base_SCXCore.data $(PF_DEPENDENT_DATAFILES)
else
DATAFILES = Base_SCXCore.data Linux.data Linux_ULINUX.data
ifeq ($(PF_ARCH), x86)
DATAFILES += Linux_ULINUX_x86.data
else
DATAFILES += Linux_ULINUX_x64.data
endif
DATAFILES = Base_SCXCore.data Linux.data
DATAFILES_R = Linux_RPM.data
DATAFILES_D = Linux_DPKG.data
OUTPUT_PACKAGE_PREFIX=scx-cimprov-$(SCX_BUILDVERSION_MAJOR).$(SCX_BUILDVERSION_MINOR).$(SCX_BUILDVERSION_PATCH)-$(SCX_BUILDVERSION_BUILDNR).universal.$(PF_ARCH)
endif
ifneq ($(DISABLE_LISTENER),0)
DISABLE_PORT=--DISABLE_PORT=true
SCX_PREFIX=scx-cimprov
else
DISABLE_PORT=
SCX_PREFIX=scx
DISTRO_TYPE = $(PF)
ifeq ($(PF),Linux)
DISTRO_TYPE = $(PF)_$(PF_DISTRO)
ifneq ($(COMBINED_PACKAGES),1)
ifeq ($(PF_DISTRO_ULINUX_R),1)
DISTRO_TYPE = $(PF)_$(PF_DISTRO)_R
endif
ifeq ($(PF_DISTRO_ULINUX_D),1)
DISTRO_TYPE = $(PF)_$(PF_DISTRO)_D
endif
endif
endif
ifneq ($(COMBINED_PACKAGES),1)
ifneq ($(PF),SunOS)
ifeq ($(PF_ARCH),x86)
OSS_KITS:=$(shell cd $(SCX_BRD)/installer/oss-kits; ls *-oss-test.sh *.i686.sh)
else
ifeq ($(PF_ARCH),x64)
OSS_KITS:=$(shell cd $(SCX_BRD)/installer/oss-kits; ls *-oss-test.sh *.x86_64.sh)
# Currently, if we have an active listener, we want OSS bits.
# If this ever changes, we'll likely need a setting in configure script.
ifneq ($(PF),SunOS)
ifeq ($(PF_ARCH),x86)
OSS_KITS:=$(shell cd $(SCX_BRD)/installer/oss-kits; ls *-oss-test.sh *.i686.sh)
else
ifeq ($(PF_ARCH),x64)
OSS_KITS:=$(shell cd $(SCX_BRD)/installer/oss-kits; ls *-oss-test.sh *.x86_64.sh)
endif
endif
endif
endif
OUTPUT_PACKAGE_PREFIX=$(SCX_PREFIX)-$(SCX_BUILDVERSION_MAJOR).$(SCX_BUILDVERSION_MINOR).$(SCX_BUILDVERSION_PATCH)-$(SCX_BUILDVERSION_BUILDNR).universal.$(PF_ARCH)
endif
DISTRO_TYPE = $(PF)
installerOnly: compressed_kit bundle
STAGING_DIR = $(SCX_BRD)/installer/intermediate/staging
# Easy way to just run installer (if you know all targets are built properly)
native_kit: GetLinuxOS scx_scripts
kit : GetLinuxOS scx_scripts
$(ECHO) "========================= Performing make installer"
$(ECHO) PF=$(PF) > $(SCX_BRD)/intermediate/$(BUILD_CONFIGURATION)/pf_file.sh
$(ECHO) PF_DISTRO=$(PF_DISTRO) >> $(SCX_BRD)/intermediate/$(BUILD_CONFIGURATION)/pf_file.sh
@ -72,11 +52,11 @@ native_kit: GetLinuxOS scx_scripts
# The options passed to the installbuilder are inserted into the Variables list. They will override whatever variables are specified in the datafiles.
ifneq ($(COMBINED_PACKAGES),1)
ifneq ($(PF_DISTRO),ULINUX)
sudo rm -rf $(STAGING_DIR)
python $(SCXPAL_DIR)/installer/InstallBuilder/installbuilder.py \
--BASE_DIR=$(SCX_BRD) \
--TARGET_DIR=$(TARGET_DIR) \
--TARGET_DIR=$(INTERMEDIATE_DIR) \
--INTERMEDIATE_DIR=$(SCX_BRD)/installer/intermediate \
--STAGING_DIR=$(STAGING_DIR) \
--OMI_DIR=$(SCXOMI_DIR) \
@ -90,53 +70,18 @@ ifneq ($(COMBINED_PACKAGES),1)
--ULINUX_POSTFIX= \
--DATAFILE_PATH=$(SCX_BRD)/installer/datafiles \
$(DATAFILES)
else
sudo rm -rf $(STAGING_DIR)
rm -rf $(TARGET_DIR)/{098,100}
mkdir -p $(TARGET_DIR)/{098,100}
python $(SCXPAL_DIR)/installer/InstallBuilder/installbuilder.py \
--BASE_DIR=$(SCX_BRD) \
--TARGET_DIR=$(TARGET_DIR)/098 \
--INTERMEDIATE_DIR=$(SCX_BRD)/installer/intermediate \
--STAGING_DIR=$(STAGING_DIR) \
--OMI_DIR=$(SCXOMI_DIR) \
--BUILD_TYPE=$(BUILD_TYPE) \
--BUILD_CONFIGURATION=$(BUILD_CONFIGURATION) \
--PFARCH=$(PF_ARCH) \
--PFMAJOR=$(PF_MAJOR) \
--PFMINOR=$(PF_MINOR) \
--VERSION=$(SCX_BUILDVERSION_MAJOR).$(SCX_BUILDVERSION_MINOR).$(SCX_BUILDVERSION_PATCH) \
--RELEASE=$(SCX_BUILDVERSION_BUILDNR) \
--ULINUX_POSTFIX=/openssl_0.9.8 \
--DATAFILE_PATH=$(SCX_BRD)/installer/datafiles \
$(DATAFILES)
sudo rm -rf $(STAGING_DIR)
python $(SCXPAL_DIR)/installer/InstallBuilder/installbuilder.py \
--BASE_DIR=$(SCX_BRD) \
--TARGET_DIR=$(TARGET_DIR)/100 \
--INTERMEDIATE_DIR=$(SCX_BRD)/installer/intermediate \
--STAGING_DIR=$(STAGING_DIR) \
--OMI_DIR=$(SCXOMI_DIR) \
--BUILD_TYPE=$(BUILD_TYPE) \
--BUILD_CONFIGURATION=$(BUILD_CONFIGURATION) \
--PFARCH=$(PF_ARCH) \
--PFMAJOR=$(PF_MAJOR) \
--PFMINOR=$(PF_MINOR) \
--VERSION=$(SCX_BUILDVERSION_MAJOR).$(SCX_BUILDVERSION_MINOR).$(SCX_BUILDVERSION_PATCH) \
--RELEASE=$(SCX_BUILDVERSION_BUILDNR) \
--ULINUX_POSTFIX=/openssl_1.0.0 \
--DATAFILE_PATH=$(SCX_BRD)/installer/datafiles \
$(DATAFILES)
endif
else
# Build for COMBINED_PACKAGES (.rpm and .deb living together)
# Build for COMBINED_PACKAGES (.rpm and .deb living together, mass hysteria)
# First comes RPM packages
sudo rm -rf $(STAGING_DIR)
rm -rf $(TARGET_DIR)/{098,100}
mkdir -p $(TARGET_DIR)/{098,100}
rm -rf $(INTERMEDIATE_DIR)/{098,100}
mkdir -p $(INTERMEDIATE_DIR)/{098,100}
python $(SCXPAL_DIR)/installer/InstallBuilder/installbuilder.py \
--BASE_DIR=$(SCX_BRD) \
--TARGET_DIR=$(TARGET_DIR)/098 \
--TARGET_DIR=$(INTERMEDIATE_DIR)/098 \
--INTERMEDIATE_DIR=$(SCX_BRD)/installer/intermediate \
--STAGING_DIR=$(STAGING_DIR) \
--OMI_DIR=$(SCXOMI_DIR) \
@ -147,15 +92,14 @@ else
--PFMINOR=$(PF_MINOR) \
--VERSION=$(SCX_BUILDVERSION_MAJOR).$(SCX_BUILDVERSION_MINOR).$(SCX_BUILDVERSION_PATCH) \
--RELEASE=$(SCX_BUILDVERSION_BUILDNR) \
--ULINUX_POSTFIX=/openssl_0.9.8 \
--DISABLE_PORT=true \
--ULINUX_POSTFIX=/openssl_0.9.8 $(DISABLE_PORT) \
--DATAFILE_PATH=$(SCX_BRD)/installer/datafiles \
--OUTPUTFILE=$(OUTPUT_PACKAGE_PREFIX) \
$(DATAFILES) $(DATAFILES_R)
sudo rm -rf $(STAGING_DIR)
python $(SCXPAL_DIR)/installer/InstallBuilder/installbuilder.py \
--BASE_DIR=$(SCX_BRD) \
--TARGET_DIR=$(TARGET_DIR)/100 \
--TARGET_DIR=$(INTERMEDIATE_DIR)/100 \
--INTERMEDIATE_DIR=$(SCX_BRD)/installer/intermediate \
--STAGING_DIR=$(STAGING_DIR) \
--OMI_DIR=$(SCXOMI_DIR) \
@ -166,8 +110,7 @@ else
--PFMINOR=$(PF_MINOR) \
--VERSION=$(SCX_BUILDVERSION_MAJOR).$(SCX_BUILDVERSION_MINOR).$(SCX_BUILDVERSION_PATCH) \
--RELEASE=$(SCX_BUILDVERSION_BUILDNR) \
--ULINUX_POSTFIX=/openssl_1.0.0 \
--DISABLE_PORT=true \
--ULINUX_POSTFIX=/openssl_1.0.0 $(DISABLE_PORT) \
--DATAFILE_PATH=$(SCX_BRD)/installer/datafiles \
--OUTPUTFILE=$(OUTPUT_PACKAGE_PREFIX) \
$(DATAFILES) $(DATAFILES_R)
@ -176,7 +119,7 @@ else
sudo rm -rf $(STAGING_DIR)
python $(SCXPAL_DIR)/installer/InstallBuilder/installbuilder.py \
--BASE_DIR=$(SCX_BRD) \
--TARGET_DIR=$(TARGET_DIR)/098 \
--TARGET_DIR=$(INTERMEDIATE_DIR)/098 \
--INTERMEDIATE_DIR=$(SCX_BRD)/installer/intermediate \
--STAGING_DIR=$(STAGING_DIR) \
--OMI_DIR=$(SCXOMI_DIR) \
@ -187,16 +130,15 @@ else
--PFMINOR=$(PF_MINOR) \
--VERSION=$(SCX_BUILDVERSION_MAJOR).$(SCX_BUILDVERSION_MINOR).$(SCX_BUILDVERSION_PATCH) \
--RELEASE=$(SCX_BUILDVERSION_BUILDNR) \
--ULINUX_POSTFIX=/openssl_0.9.8 \
--ULINUX_POSTFIX=/openssl_0.9.8 $(DISABLE_PORT) \
--DPKG_LOCATION=$(SCXPAL_DIR)/installer/InstallBuilder/tools/bin/dpkg-deb-$(PF_ARCH) \
--DISABLE_PORT=true \
--DATAFILE_PATH=$(SCX_BRD)/installer/datafiles \
--OUTPUTFILE=$(OUTPUT_PACKAGE_PREFIX) \
$(DATAFILES) $(DATAFILES_D)
sudo rm -rf $(STAGING_DIR)
python $(SCXPAL_DIR)/installer/InstallBuilder/installbuilder.py \
--BASE_DIR=$(SCX_BRD) \
--TARGET_DIR=$(TARGET_DIR)/100 \
--TARGET_DIR=$(INTERMEDIATE_DIR)/100 \
--INTERMEDIATE_DIR=$(SCX_BRD)/installer/intermediate \
--STAGING_DIR=$(STAGING_DIR) \
--OMI_DIR=$(SCXOMI_DIR) \
@ -207,62 +149,61 @@ else
--PFMINOR=$(PF_MINOR) \
--VERSION=$(SCX_BUILDVERSION_MAJOR).$(SCX_BUILDVERSION_MINOR).$(SCX_BUILDVERSION_PATCH) \
--RELEASE=$(SCX_BUILDVERSION_BUILDNR) \
--ULINUX_POSTFIX=/openssl_1.0.0 \
--ULINUX_POSTFIX=/openssl_1.0.0 $(DISABLE_PORT) \
--DPKG_LOCATION=$(SCXPAL_DIR)/installer/InstallBuilder/tools/bin/dpkg-deb-$(PF_ARCH) \
--DISABLE_PORT=true \
--DATAFILE_PATH=$(SCX_BRD)/installer/datafiles \
--OUTPUTFILE=$(OUTPUT_PACKAGE_PREFIX) \
$(DATAFILES) $(DATAFILES_D)
endif
bundle: native_kit
bundle: kit
mkdir -p $(TARGET_DIR)
ifneq ($(OSS_KITS),)
# Copy OSS kit files to target directory if Linux or ULINUX
cd $(SCX_BRD)/installer/oss-kits; cp $(OSS_KITS) $(TARGET_DIR); cd $(TARGET_DIR); chmod u+wx $(OSS_KITS);
cd $(SCX_BRD)/installer/oss-kits; cp $(OSS_KITS) $(INTERMEDIATE_DIR); cd $(INTERMEDIATE_DIR); chmod u+wx $(OSS_KITS);
endif
# Copy remaining kit files to target directory
ifneq ($(COMBINED_PACKAGES),1)
ifneq ($(PF_DISTRO),ULINUX)
# (Copying for non-combined packages, not ULINUX)
cp `find $(SCXOMI_DIR)/output -name *.$(PACKAGE_SUFFIX)` $(TARGET_DIR)/
cp `find $(SCXOMI_DIR)/output -name package_filename` $(TARGET_DIR)/omi_package_filename
cd $(TARGET_DIR); tar cvf `cat $(TARGET_DIR)/package_filename`.tar `cat $(TARGET_DIR)/package_filename` `cat $(TARGET_DIR)/omi_package_filename` $(OSS_KITS)
../installer/bundle/create_bundle.sh $(DISTRO_TYPE) \
$(TARGET_DIR) \
`cat $(TARGET_DIR)/package_filename`.tar \
`cat $(TARGET_DIR)/package_filename` \
`cat $(TARGET_DIR)/omi_package_filename`
else
# (Copying for non-combined packages, ULINUX)
cp `find $(SCXOMI_DIR)/output_openssl_0.9.8 -name *.$(PACKAGE_SUFFIX)` $(TARGET_DIR)/098/
cp `find $(SCXOMI_DIR)/output_openssl_0.9.8 -name package_filename` $(TARGET_DIR)/098/omi_package_filename
cp `find $(SCXOMI_DIR)/output_openssl_1.0.0 -name *.$(PACKAGE_SUFFIX)` $(TARGET_DIR)/100/
cp `find $(SCXOMI_DIR)/output_openssl_1.0.0 -name package_filename` $(TARGET_DIR)/100/omi_package_filename
cd $(TARGET_DIR); tar cvf `cat 098/package_filename`.tar 098/`cat 098/package_filename` 098/`cat 098/omi_package_filename` 100/`cat 100/package_filename` 100/`cat 100/omi_package_filename` $(OSS_KITS)
../installer/bundle/create_bundle.sh $(DISTRO_TYPE) \
$(TARGET_DIR) \
`cat $(TARGET_DIR)/098/package_filename`.tar \
`cat $(TARGET_DIR)/098/package_filename` \
`cat $(TARGET_DIR)/098/omi_package_filename`
endif
else
# (Copying for non-combined packages)
cp `find $(SCXOMI_DIR)/output -name *.$(PACKAGE_SUFFIX)` $(INTERMEDIATE_DIR)/
cp `find $(SCXOMI_DIR)/output -name package_filename` $(INTERMEDIATE_DIR)/omi_package_filename
# We only build shell bundles for Linux (combined packages) or non-Linux platforms
ifneq ($(DISTRO_TYPE),Linux)
cd $(INTERMEDIATE_DIR); tar cvf `cat $(INTERMEDIATE_DIR)/package_filename`.tar `cat $(INTERMEDIATE_DIR)/package_filename` `cat $(INTERMEDIATE_DIR)/omi_package_filename` $(OSS_KITS)
../installer/bundle/create_bundle.sh $(DISTRO_TYPE) $(INTERMEDIATE_DIR) `cat $(INTERMEDIATE_DIR)/package_filename`.tar `cat $(INTERMEDIATE_DIR)/package_filename` `cat $(INTERMEDIATE_DIR)/omi_package_filename` $(DISABLE_LISTENER)
cd $(INTERMEDIATE_DIR); cp `cat $(INTERMEDIATE_DIR)/package_filename`.sh $(TARGET_DIR)
endif # ifneq ($(DISTRO_TYPE),Linux)
else # ifneq ($(COMBINED_PACKAGES),1)
# (Copying for combined packages)
cd $(TARGET_DIR); tar cvf $(OUTPUT_PACKAGE_PREFIX).tar 098/$(OUTPUT_PACKAGE_PREFIX).{rpm,deb} 100/$(OUTPUT_PACKAGE_PREFIX).{rpm,deb}
../installer/bundle/create_bundle.sh $(DISTRO_TYPE) $(TARGET_DIR) $(OUTPUT_PACKAGE_PREFIX).tar $(OUTPUT_PACKAGE_PREFIX) ""
endif
ifeq ($(DISABLE_LISTENER),0)
# Grab the OMI bits
cd $(INTERMEDIATE_DIR); cp $(SCXOMI_DIR)/output_openssl_0.9.8/release/omi-*.{rpm,deb} 098
cd $(INTERMEDIATE_DIR); cp $(SCXOMI_DIR)/output_openssl_1.0.0/release/omi-*.{rpm,deb} 100
endif
cd $(INTERMEDIATE_DIR); tar cvf $(OUTPUT_PACKAGE_PREFIX).tar 098/*.{rpm,deb} 100/*.{rpm,deb} $(OSS_KITS)
../installer/bundle/create_bundle.sh $(DISTRO_TYPE) $(INTERMEDIATE_DIR) $(OUTPUT_PACKAGE_PREFIX).tar $(OUTPUT_PACKAGE_PREFIX) `cat $(SCXOMI_DIR)/output_openssl_1.0.0/release/package_filename` $(DISABLE_LISTENER)
cp $(INTERMEDIATE_DIR)/$(OUTPUT_PACKAGE_PREFIX).sh $(TARGET_DIR)
endif # ifneq ($(COMBINED_PACKAGES),1)
# Technically, a compressed kit doesn't have a prereq on the bundle,
# but compressing the kit will make the uncompressed kit unavailable to the bundle...
compressed_kit: native_kit bundle
compressed_kit: kit bundle
ifeq ($(PF),SunOS)
compress -f $(TARGET_DIR)/`cat $(TARGET_DIR)/package_filename`
compress -f $(INTERMEDIATE_DIR)/`cat $(INTERMEDIATE_DIR)/package_filename`
endif
ifeq ($(PF),HPUX)
compress -f $(TARGET_DIR)/`cat $(TARGET_DIR)/package_filename`
compress -f $(INTERMEDIATE_DIR)/`cat $(INTERMEDIATE_DIR)/package_filename`
endif
ifeq ($(PF),AIX)
gzip -f $(TARGET_DIR)/`cat $(TARGET_DIR)/package_filename`
gzip -f $(INTERMEDIATE_DIR)/`cat $(INTERMEDIATE_DIR)/package_filename`
endif
# Generate scripts that are consumed by SCXCore
@ -276,7 +217,7 @@ scx_scripts:
--BT=$(BUILD_TYPE)
installerPackage: \
scxcore-status $(TARGET_DIR)/libSCXCoreProviderModule.$(PF_DYN_LIB_FILE_SUFFIX) \
scxcore-status $(INTERMEDIATE_DIR)/libSCXCoreProviderModule.$(PF_DYN_LIB_FILE_SUFFIX) \
scx-tools-status scx-tools installerOnly
ssl-tool-status:
@ -289,11 +230,11 @@ scxcore-status:
$(ECHO) "========================= Performing make OpsMgr"
ifeq ($(PF),Linux)
GetLinuxOS: $(TARGET_DIR)/GetLinuxOS.sh
GetLinuxOS: $(INTERMEDIATE_DIR)/GetLinuxOS.sh
$(TARGET_DIR)/GetLinuxOS.sh: $(SCXPAL_TARGET_DIR)/GetLinuxOS.sh
sed "s@<RelDir>@/etc/opt/microsoft/scx/conf@" $(SCXPAL_TARGET_DIR)/GetLinuxOS.sh > $(TARGET_DIR)/GetLinuxOS.sh
chmod +x $(TARGET_DIR)/GetLinuxOS.sh
$(INTERMEDIATE_DIR)/GetLinuxOS.sh: $(SCXPAL_TARGET_DIR)/GetLinuxOS.sh
sed "s@<RelDir>@/etc/opt/microsoft/scx/conf@" $(SCXPAL_TARGET_DIR)/GetLinuxOS.sh > $(INTERMEDIATE_DIR)/GetLinuxOS.sh
chmod +x $(INTERMEDIATE_DIR)/GetLinuxOS.sh
else
GetLinuxOS:
endif

Просмотреть файл

@ -8,7 +8,7 @@
#
#--------------------------------------------------------------------------------
ifeq ($(PF_DISTRO), ULINUX)
ifeq ($(COMBINED_PACKAGES),1)
# Reassign SCXOMI directories to any OMI output directory (generic non-SSL use)
SCXOMI_DEV_ROOT := $(SCXOMI_DIR)/output_openssl_1.0.0
SCXOMI_INCLUDE := $(SCXOMI_DEV_ROOT)/include
@ -24,17 +24,13 @@ ifeq (,$(PF_DISTRO))
$(warning "Unmatched version string")
endif
ifeq ($(PF_DISTRO)$(PF_MAJOR),REDHAT4)
include Makefile.gcc3
else
include Makefile.gcc4
endif
include Makefile.gcc4
#================================================================================
# OpenSSL
# For ULINUX, we need to build against two versions of OpenSSL, 0.9.8 and 1.0.0.
#================================================================================
ifeq ($(PF_DISTRO),ULINUX)
ifeq ($(COMBINED_PACKAGES),1)
# Let's figure out the system version of SSL installed (for unit test purposes)
@ -85,7 +81,7 @@ CPPUNIT_LIB_PATH=$(SCX_SHARED_TST_EXT_LIB_DIR)/linux/$(ARCH)/cppunit
#--------------------------------------------------------------------------------
# Link a dynamic lib
LINK_DYNLIB=g++ -shared -Wl,-rpath,/usr/lib
LINK_DYNLIB=g++ -shared -Wl,-rpath=/opt/microsoft/scx/lib -Wl,-rpath=/opt/omi/lib
ifeq ($(PF_ARCH),x86)
LINK_DYNLIB+= -m32
else
@ -101,7 +97,7 @@ LDFLAGS_RPM = -lrpm -lpopt
LDFLAGS_DYNLIB = -ldl -lpthread -lcrypt -lrt
LDFLAGS_EXECUTABLE = -ldl -lpthread -lrt
ifneq ($(PF_DISTRO),ULINUX)
ifneq ($(COMBINED_PACKAGES),1)
LDFLAGS_DYNLIB += $(LDFLAGS_RPM)
LDFLAGS_EXECUTABLE += $(LDFLAGS_RPM)
endif
@ -142,59 +138,11 @@ CXXFLAGS+=
#--------------------------------------------------------------------------------
PF_DEPENDENT_DATAFILES = Linux.data
ifeq ($(PF_DISTRO), REDHAT)
PF_DEPENDENT_DATAFILES += Linux_RPM.data Linux_RHEL.data
ifeq ($(PF_MAJOR), 7)
PF_DEPENDENT_DATAFILES += Linux_RHEL_7.data
endif
ifeq ($(PF_MAJOR), 6)
PF_DEPENDENT_DATAFILES += Linux_RHEL_6.data
endif
ifeq ($(PF_MAJOR), 5)
PF_DEPENDENT_DATAFILES += Linux_RHEL_5.data
endif
ifeq ($(PF_MAJOR), 4)
PF_DEPENDENT_DATAFILES += Linux_RHEL_4.data
endif
endif
ifeq ($(PF_DISTRO), SUSE)
PF_DEPENDENT_DATAFILES += Linux_RPM.data Linux_SLES.data
ifeq ($(PF_MAJOR), 12)
PF_DEPENDENT_DATAFILES += Linux_SLES_12.data
endif
ifeq ($(PF_MAJOR), 11)
PF_DEPENDENT_DATAFILES += Linux_SLES_11.data
endif
ifeq ($(PF_MAJOR), 10)
PF_DEPENDENT_DATAFILES += Linux_SLES_10.data
endif
ifeq ($(PF_MAJOR), 9)
PF_DEPENDENT_DATAFILES += Linux_SLES_9.data
endif
endif
ifeq ($(PF_DISTRO), UBUNTU)
PF_DEPENDENT_DATAFILES += Linux_DPKG.data Linux_ULINUX_D.data
PF_DEPENDENT_DATAFILES += Linux_ULINUX_x64.data Linux_UBUNTU.data
ifeq ($(PF_MAJOR), 14)
PF_DEPENDENT_DATAFILES += Linux_UBUNTU_14.data
endif
endif
ifeq ($(PF_DISTRO), ULINUX)
PF_DEPENDENT_DATAFILES += Linux_ULINUX.data
ifeq ($(PF_ARCH), x86)
PF_DEPENDENT_DATAFILES += Linux_ULINUX_x86.data
else
PF_DEPENDENT_DATAFILES += Linux_ULINUX_x64.data
endif
ifeq ($(PF_DISTRO_ULINUX_R), 1)
PF_DEPENDENT_DATAFILES += Linux_RPM.data Linux_ULINUX_R.data
endif
ifeq ($(PF_DISTRO_ULINUX_D), 1)
PF_DEPENDENT_DATAFILES += Linux_DPKG.data Linux_ULINUX_D.data
endif
ifeq ("$(wildcard /usr/bin/dpkg-deb)","")
PF_DEPENDENT_DATAFILES += Linux_RPM.data
else
PF_DEPENDENT_DATAFILES += Linux_DPKG.data
endif
#-------------------------------- End of File -----------------------------------

Просмотреть файл

@ -154,7 +154,7 @@ schema_gen :
# Note: For omi_reg to work properly, run './configure --enable-local-omi'
omi_reg :
export LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):$(TARGET_DIR)/omi/lib; cd $(TARGET_DIR)/omi; bin/omireg --destdir=$(TARGET_DIR)/omi -n root/scx -o @requestor@ $(TARGET_DIR)/libSCXCoreProviderModule.so
export LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):$(TARGET_DIR)/omi/lib; cd $(TARGET_DIR)/omi; bin/omireg --destdir=$(TARGET_DIR)/omi -n root/scx -o @requestor@ $(INTERMEDIATE_DIR)/libSCXCoreProviderModule.so
# bin/omiserver --destdir /home/jeffcof/dev/blue/opsmgr/target/Linux_REDHAT_6.1_x64_64_Debug/omi

Просмотреть файл

@ -14,13 +14,16 @@
# For now, providertestutils.cpp lives in PAL, but is built in OM. This creates
# some build issues. To resolve, create a link to the real file.
TESTPROVIDER_SUPPORT_DIR=$(SCX_UNITTEST_ROOT)/providers
$(SCX_UNITTEST_ROOT)/providers/providertestutils.cpp: $(SCXPAL_TEST_ROOT)/testutils/providertestutils.cpp
# We need to recreate the symlink if the link is older than what it points to. Touch will not work, and ln -fs does not work on Sun5.9
rm -f $(SCX_UNITTEST_ROOT)/providers/providertestutils.cpp
ln -s $(SCXPAL_TEST_ROOT)/testutils/providertestutils.cpp $(SCX_UNITTEST_ROOT)/providers/providertestutils.cpp
ln -s $(SCXPAL_TEST_ROOT)/testutils/providertestutils.cpp $(TESTPROVIDER_SUPPORT_DIR)/providertestutils.cpp
POSIX_UNITTESTS_PROVIDERS_SRCFILES = \
$(SCX_UNITTEST_ROOT)/providers/providertestutils.cpp \
$(SCX_UNITTEST_ROOT)/providers/testutilities.cpp \
$(SCX_UNITTEST_ROOT)/providers/meta_provider/metaprovider_test.cpp \
$(SCX_UNITTEST_ROOT)/providers/appserver_provider/appserverenumeration_test.cpp \
$(SCX_UNITTEST_ROOT)/providers/appserver_provider/appserverinstance_test.cpp \
@ -77,8 +80,14 @@ $(INTERMEDIATE_DIR)/test/code/providers/appserver_provider/persistappserverinsta
$(INTERMEDIATE_DIR)/test/code/providers/logfile_provider/logfileprovider_test.d: INCLUDES += -I$(PROVIDER_SUPPORT_DIR)
$(INTERMEDIATE_DIR)/test/code/providers/logfile_provider/logfileprovider_test.$(PF_OBJ_FILE_SUFFIX): INCLUDES += -I$(PROVIDER_SUPPORT_DIR)
$(INTERMEDIATE_DIR)/test/code/providers/logfile_provider/logfileprovider_test.d: INCLUDES += -I-I$(PROVIDER_SUPPORT_DIR)
$(INTERMEDIATE_DIR)/test/code/providers/logfile_provider/logfileprovider_test.$(PF_OBJ_FILE_SUFFIX): INCLUDES += -I$(PROVIDER_SUPPORT_DIR)
$(INTERMEDIATE_DIR)/test/code/providers/os_provider/osprovider_test.d: INCLUDES += -I$(TESTPROVIDER_SUPPORT_DIR)
$(INTERMEDIATE_DIR)/test/code/providers/os_provider/osprovider_test.$(PF_OBJ_FILE_SUFFIX): INCLUDES += -I$(TESTPROVIDER_SUPPORT_DIR)
$(INTERMEDIATE_DIR)/test/code/providers/process_provider/processprovider_test.d: INCLUDES += -I$(TESTPROVIDER_SUPPORT_DIR)
$(INTERMEDIATE_DIR)/test/code/providers/process_provider/processprovider_test.$(PF_OBJ_FILE_SUFFIX): INCLUDES += -I$(TESTPROVIDER_SUPPORT_DIR)
$(INTERMEDIATE_DIR)/test/code/providers/process_provider/unixprocesskey_test.d: INCLUDES += -I$(TESTPROVIDER_SUPPORT_DIR)
$(INTERMEDIATE_DIR)/test/code/providers/process_provider/unixprocesskey_test.$(PF_OBJ_FILE_SUFFIX): INCLUDES += -I$(TESTPROVIDER_SUPPORT_DIR)
$(INTERMEDIATE_DIR)/test/code/providers/runas_provider/scxrunasconfigurator_test.d: INCLUDES += -I$(PROVIDER_SUPPORT_DIR)
$(INTERMEDIATE_DIR)/test/code/providers/runas_provider/scxrunasconfigurator_test.$(PF_OBJ_FILE_SUFFIX): INCLUDES += -I$(PROVIDER_SUPPORT_DIR)

Просмотреть файл

@ -22,7 +22,7 @@ STATIC_SCXSSLCONFIG_OBJFILES = $(call src_to_obj,$(STATIC_SCXSSLCONFIG_SRCFILES)
SCXSSLCONFIG_SRCFILES=\
$(SCXSSLCONFIG_DIR)/scx_ssl_config.cpp
ifneq ($(PF_DISTRO),ULINUX)
ifneq ($(COMBINED_PACKAGES),1)
$(INTERMEDIATE_DIR)/libscxsslconfig.$(PF_STAT_LIB_FILE_SUFFIX) : $(STATIC_SCXSSLCONFIG_OBJFILES)
$(LINK_STATLIB) $(LINK_STATLIB_OUTFLAG) $^
@ -51,10 +51,10 @@ endif
# Static dependencies on POSIX platforms
ifneq ($(PF_DISTRO),ULINUX)
ifneq ($(COMBINED_PACKAGES),1)
#
# Not ULINUX
# Not Universal SSL Build
#
SCXSSLCONFIG_STATICLIB_DEPS = \
@ -63,15 +63,15 @@ SCXSSLCONFIG_STATICLIB_DEPS = \
# Foreach XYZ in the list above, build $(INTERMEDIATE_DIR)/libXYZ.a
SCXSSLCONFIG_STATICLIB_DEPFILES = $(addprefix $(INTERMEDIATE_DIR)/lib, $(addsuffix .$(PF_STAT_LIB_FILE_SUFFIX), $(SCXSSLCONFIG_STATICLIB_DEPS)))
$(TARGET_DIR)/scxsslconfig$(PF_EXE_FILE_SUFFIX): \
$(INTERMEDIATE_DIR)/scxsslconfig$(PF_EXE_FILE_SUFFIX): \
$(SCXSSLCONFIG_OBJFILES) $(INTERMEDIATE_DIR)/libscxsslconfig.$(PF_STAT_LIB_FILE_SUFFIX) $(SCXSSLCONFIG_DEPFILES) $(SCXSSLCONFIG_STATICLIB_DEPFILES) $(SCXPAL_STATICLIB_DEPFILES)
-$(MKPATH) $(TARGET_DIR)/tools
-$(MKPATH) $(INTERMEDIATE_DIR)/tools
$(PROFILING) $(LINK) $(LINK_OUTFLAG) $(SCXSSLCONFIG_OBJFILES) $(SCXSSLCONFIG_STATICLIB_DEPFILES) $(SCXPAL_STATICLIB_DEPFILES) $(SSL_LIBS) $(LDFLAGS_COREPROVIDERMODULE) $(LDFLAGS_EXECUTABLE)
else
#
# ULINUX
# Universal SSL Build
#
SCXSSLCONFIG_STATICLIB_DEPS_OPENSSL = \
@ -82,8 +82,8 @@ SCXSSLCONFIG_DEPFILES=$(SCXSSLCONFIG_OBJFILES:.$(PF_OBJ_FILE_SUFFIX)=.d) $(STATI
# Need two targets, one for each flavor of OpenSSL
scxsslconfig_both_targets: \
$(TARGET_DIR)/$(OPENSSL098DIR)/scxsslconfig$(PF_EXE_FILE_SUFFIX) \
$(TARGET_DIR)/$(OPENSSL100DIR)/scxsslconfig$(PF_EXE_FILE_SUFFIX)
$(INTERMEDIATE_DIR)/$(OPENSSL098DIR)/scxsslconfig$(PF_EXE_FILE_SUFFIX) \
$(INTERMEDIATE_DIR)/$(OPENSSL100DIR)/scxsslconfig$(PF_EXE_FILE_SUFFIX)
# These targets override those in the Makefile.rules file
# They build code and everything downstream to order for each version of OpenSSL
@ -112,18 +112,18 @@ $(INTERMEDIATE_DIR)/$(OPENSSL100DIR)/libscxsslconfig.$(PF_STAT_LIB_FILE_SUFFIX)
export LD_LIBRARY_PATH=$(LD_LIBRARY_PATH_OPENSSL100); \
$(LINK_STATLIB) $(LINK_STATLIB_OUTFLAG) $^
$(TARGET_DIR)/$(OPENSSL098DIR)/scxsslconfig$(PF_EXE_FILE_SUFFIX): $(SCXSSLCONFIG_OBJFILES_OPENSSL098) $(INTERMEDIATE_DIR)/$(OPENSSL098DIR)/libscxsslconfig.$(PF_STAT_LIB_FILE_SUFFIX) $(SCXSSLCONFIG_DEPFILES) $(SCXPAL_STATICLIB_DEPFILES)
-$(MKPATH) $(TARGET_DIR)/$(OPENSSL098DIR)
-$(MKPATH) $(TARGET_DIR)/tools
$(INTERMEDIATE_DIR)/$(OPENSSL098DIR)/scxsslconfig$(PF_EXE_FILE_SUFFIX): $(SCXSSLCONFIG_OBJFILES_OPENSSL098) $(INTERMEDIATE_DIR)/$(OPENSSL098DIR)/libscxsslconfig.$(PF_STAT_LIB_FILE_SUFFIX) $(SCXSSLCONFIG_DEPFILES) $(SCXPAL_STATICLIB_DEPFILES)
-$(MKPATH) $(INTERMEDIATE_DIR)/$(OPENSSL098DIR)
-$(MKPATH) $(INTERMEDIATE_DIR)/tools
# Use appropriate pkg-config environment variable to set library and header paths
export PKG_CONFIG_PATH=$(PKG_CONFIG_PATH_OPENSSL098); \
export LD_LIBRARY_PATH=$(LD_LIBRARY_PATH_OPENSSL098); \
$(PROFILING) $(LINK_OPENSSL098) $(LINK_OUTFLAG) $(STATIC_SCXSSLCONFIG_OBJFILES_OPENSSL098) $(SCXSSLCONFIG_OBJFILES_OPENSSL098) $(SCXPAL_STATICLIB_DEPFILES) $(SSL_LIBS) $(LDFLAGS_EXECUTABLE)
$(TARGET_DIR)/$(OPENSSL100DIR)/scxsslconfig$(PF_EXE_FILE_SUFFIX): $(SCXSSLCONFIG_OBJFILES_OPENSSL100) $(INTERMEDIATE_DIR)/$(OPENSSL100DIR)/libscxsslconfig.$(PF_STAT_LIB_FILE_SUFFIX) $(SCXSSLCONFIG_DEPFILES) $(SCXPAL_STATICLIB_DEPFILES)
-$(MKPATH) $(TARGET_DIR)/$(OPENSSL100DIR)
-$(MKPATH) $(TARGET_DIR)/tools
$(INTERMEDIATE_DIR)/$(OPENSSL100DIR)/scxsslconfig$(PF_EXE_FILE_SUFFIX): $(SCXSSLCONFIG_OBJFILES_OPENSSL100) $(INTERMEDIATE_DIR)/$(OPENSSL100DIR)/libscxsslconfig.$(PF_STAT_LIB_FILE_SUFFIX) $(SCXSSLCONFIG_DEPFILES) $(SCXPAL_STATICLIB_DEPFILES)
-$(MKPATH) $(INTERMEDIATE_DIR)/$(OPENSSL100DIR)
-$(MKPATH) $(INTERMEDIATE_DIR)/tools
# Use appropriate pkg-config environment variable to set library and header paths
export PKG_CONFIG_PATH=$(PKG_CONFIG_PATH_OPENSSL100); \

Просмотреть файл

@ -189,7 +189,7 @@ testrun_copy : $(TARGET_DIR)/closefiledescriptors
$(shell [ $(OMI_LIBS)/libpal.s? ] && $(COPY) $(SCXOMI_LIBS)/libpal.s? $(TARGET_DIR))
create_environment_sh :
ifeq ($(PF_DISTRO),ULINUX)
ifeq ($(COMBINED_PACKAGES),1)
cd $(TARGET_DIR); LD_LIBRARY_PATH=`cd /usr/local_ssl_1.0.0/lib*; pwd` testfiles/createEnv.sh
else
cd $(TARGET_DIR); testfiles/createEnv.sh

33
build/configure поставляемый
Просмотреть файл

@ -3,6 +3,7 @@
scxpal_dir="../../pal"
scxomi_dir=`(cd ../../omi/Unix; pwd -P)`
build_type="Release"
disable_listener=0
enable_debug=""
enable_purify_agent=""
enable_purify_server=""
@ -31,7 +32,11 @@ do
-h | --help)
help=1
;;
;;
--disable-listener)
disable_listener=1
;;
--enable-debug)
if [ "$build_type" = "Bullseye" ]; then
@ -40,7 +45,7 @@ do
fi
build_type="Debug"
enable_debug="--enable-debug"
;;
;;
--enable-bullseye)
if [ "$build_type" = "Debug" ]; then
@ -49,20 +54,20 @@ do
fi
build_type="Bullseye"
enable_bullseye="--enable-bullseye"
;;
;;
--enable-purify-agent)
enable_purify_agent="--enable-purify-agent"
;;
;;
--enable-purify-server)
enable_purify_server="--enable-purify-server"
;;
;;
--enable-local-omi)
omi_configure_quals="--prefix=. --disable-libpath"
local_omi="1"
;;
;;
--enable-ulinux)
if [ ! -d "/usr/local_ssl_0.9.8" -o ! -d "/usr/local_ssl_1.0.0" ]; then
@ -71,13 +76,13 @@ do
fi
enable_ulinux_qual="--enable-ulinux"
combined_packages=1
;;
;;
*)
echo "configure: invalid option '$opt'"
echo "Try configure --help' for more information."
exit 1
;;
;;
esac
@ -98,12 +103,13 @@ This script configures SCXOM for building. Type the following commands.
OPTIONS:
-h, --help Print this help message.
--disable-listener Disable listening on port 1270 (normally enabled by default)
--enable-debug Perform a debug build.
--enable-purify-agent Allow agent to be run with purify (memory leak detection)
--enable-purify-server Allow server to be run with purify (memory leak detection)
--enable-local-omi Allow local OMI commands to be issued (not for use when building a kit)
--enable-bullseye Enables the use of code coverage tools (Bullseye).
--enable-ulinux Force provider-only, universal RPM/DEB kits
--enable-ulinux Build universal RPM/DEB kits
EOF
exit 0
@ -125,13 +131,7 @@ openssl_cflags=`$pkgconfig --cflags openssl`
openssl_libs=`$pkgconfig --libs openssl`
openssl_libdir=`$pkgconfig --variable=libdir openssl`
FORCE_UNIVERSAL=$combined_packages
if [ -d "/usr/local_ssl_0.9.8" -a -d "/usr/local_ssl_1.0.0" ]; then
FORCE_UNIVERSAL=1
fi
if [ $FORCE_UNIVERSAL -ne 0 ]; then
if [ $combined_packages -ne 0 ]; then
case "`uname -m`" in
x86_64 )
openssl098_libdir=/usr/local_ssl_0.9.8/lib
@ -167,6 +167,7 @@ fi
cat <<EOF > config.mak
COMBINED_PACKAGES=$combined_packages
DISABLE_LISTENER=$disable_listener
LOCAL_OMI=$local_omi
OMI_CONFIGURE_QUALS=$omi_configure_quals
OPENSSL_CFLAGS=$openssl_cflags

Просмотреть файл

@ -4,32 +4,6 @@
# Shell Bundle installer package for the SCX project
#
# This script is a skeleton bundle file for primary platforms (Redhat, SUSE,
# AIX, HP, and Solaris), as well as ULINUX.
#
# Use this script by concatenating it with some binary package.
#
# The bundle is created by cat'ing the script in front of the binary, so for
# the gzip'ed tar example, a command like the following will build the bundle:
#
# tar -czvf - <target-dir> | cat sfx.skel - > my.bundle
#
# The bundle can then be copied to a system, made executable (chmod +x) and
# then run.
#
# This script has some useful helper options to split out the script and/or
# binary in place, and to turn on shell debugging.
#
# This script is paired with create_bundle.sh, which will edit constants in
# this script for proper execution at runtime. The "magic", here, is that
# create_bundle.sh encodes the length of this script in the script itself.
# Then the script can use that with 'tail' in order to strip the script from
# the binary package.
#
# Developer note: A prior incarnation of this script used 'sed' to strip the
# script from the binary package. That didn't work on AIX 5, where 'sed' did
# strip the binary package - AND null bytes, creating a corrupted stream.
set -e
PATH=/usr/bin:/usr/sbin:/bin:/sbin
umask 022
@ -54,8 +28,7 @@ DPKG_CONF_QUALS="--force-confold --force-confdef"
# These symbols will get replaced during the bundle creation process.
#
# The PLATFORM symbol should contain ONE of the following:
# Linux_REDHAT, Linux_SUSE, Linux_ULINUX_R, Linux_ULINUX_D, HPUX, AIX, SunOS
# Linux_ULINUX for special build (agent only, both RPM and DEB pacages)
# Linux, HPUX, AIX, SunOS
#
# The OM_PKG symbol should contain something like:
# scx-1.5.1-115.rhel.6.x64 (script adds .rpm or .deb, as appropriate)
@ -63,17 +36,15 @@ DPKG_CONF_QUALS="--force-confold --force-confdef"
#
# PROVIDER_ONLY is normally set to '0'. Set to non-zero if you wish to build a
# version of SCX that is only the provider (no OMI, no bundled packages). This
# essentially provides a "scx-cimprov" type package (still called "scx", though)
# if just the provider alone must be included as part of some other package.
# NOTE: For consistency, if PROVIDER_ONLY is set, it's expected that universal
# builds include both .RPM and .DEB packages. This is unlike regular versions of
# SCX, which has separate bundles for .RPM vs. .DEB package managers.
# essentially provides a "scx-cimprov" type package if just the provider alone
# must be included as part of some other package.
PLATFORM=<PLATFORM_TYPE>
TAR_FILE=<TAR_FILE>
OM_PKG=<OM_PKG>
OMI_PKG=<OMI_PKG>
PROVIDER_ONLY=0
SCRIPT_LEN=<SCRIPT_LEN>
SCRIPT_LEN_PLUS_ONE=<SCRIPT_LEN+1>
@ -248,15 +219,7 @@ ulinux_detect_installer()
# $1 - The name of the package to check as to whether it's installed
check_if_pkg_is_installed() {
case "$PLATFORM" in
Linux_REDHAT|Linux_SUSE|Linux_ULINUX_R)
rpm -q $1 2> /dev/null 1> /dev/null
;;
Linux_ULINUX_D)
dpkg -s $1 | grep Status | grep " installed" 2> /dev/null 1> /dev/null
;;
Linux_ULINUX)
Linux)
ulinux_detect_installer
if [ "$INSTALLER" = "DPKG" ]; then
@ -285,23 +248,12 @@ check_if_pkg_is_installed() {
# $2 - The package name of the package to be installed
pkg_add() {
pkg_filename=$1
case "$PLATFORM" in
Linux_ULINUX*)
Linux)
ulinux_detect_openssl_version
pkg_filename=$TMPBINDIR/$pkg_filename
;;
esac
case "$PLATFORM" in
Linux_REDHAT|Linux_SUSE|Linux_ULINUX_R)
rpm --install ${pkg_filename}.rpm
;;
Linux_UBUNTU_D|Linux_ULINUX_D)
dpkg ${DPKG_CONF_QUALS} --install --refuse-downgrade ${pkg_filename}.deb
;;
Linux_ULINUX)
ulinux_detect_installer
if [ "$INSTALLER" = "DPKG" ]; then
@ -329,19 +281,7 @@ pkg_add() {
# $2 - Optional parameter. Only used when forcibly removing omi on SunOS
pkg_rm() {
case "$PLATFORM" in
Linux_REDHAT|Linux_SUSE|Linux_ULINUX_R)
rpm --erase ${1}
;;
Linux_UBUNTU_D|Linux_ULINUX_D)
if [ "$installMode" = "P" ]; then
dpkg --purge ${1}
else
dpkg --remove ${1}
fi
;;
Linux_ULINUX)
Linux)
ulinux_detect_installer
if [ "$INSTALLER" = "DPKG" ]; then
if [ "$installMode" = "P" ]; then
@ -378,27 +318,12 @@ pkg_rm() {
pkg_upd() {
pkg_filename=$1
pkg_name=$2
case "$PLATFORM" in
Linux_ULINUX*)
Linux)
ulinux_detect_openssl_version
pkg_filename=$TMPBINDIR/$pkg_filename
;;
esac
case "$PLATFORM" in
Linux_REDHAT|Linux_SUSE|Linux_ULINUX_R)
[ -n "${forceFlag}" -o "${pkg_name}" = "omi" ] && FORCE="--force" || FORCE=""
rpm --upgrade $FORCE ${pkg_filename}.rpm
;;
Linux_UBUNTU_D|Linux_ULINUX_D)
[ -z "${forceFlag}" -o "${pkg_name}" = "omi" ] && FORCE="--refuse-downgrade" || FORCE=""
dpkg ${DPKG_CONF_QUALS} --install $FORCE ${pkg_filename}.deb
export PATH=/usr/local/sbin:/usr/sbin:/sbin:$PATH
;;
Linux_ULINUX)
ulinux_detect_installer
if [ "$INSTALLER" = "DPKG" ]; then
@ -461,7 +386,7 @@ pkg_upd() {
}
case "$PLATFORM" in
Linux_REDHAT|Linux_SUSE|Linux_ULINUX_R|Linux_UBUNTU_D|Linux_ULINUX_D|Linux_ULINUX|AIX|HPUX|SunOS)
Linux|AIX|HPUX|SunOS)
;;
*)
@ -527,6 +452,7 @@ then
then
echo "Purging all files in cross-platform agent ..."
rm -rf /etc/opt/microsoft/*-cimprov /etc/opt/microsoft/scx /opt/microsoft/*-cimprov /opt/microsoft/scx /var/opt/microsoft/*-cimprov /var/opt/microsoft/scx
rmdir /etc/opt/microsoft /opt/microsoft /var/opt/microsoft 1>/dev/null 2>/dev/null
# If OMI is not installed, purge its directories as well.
check_if_pkg_is_installed omi
@ -554,7 +480,7 @@ fi
echo "Extracting..."
case "$PLATFORM" in
Linux_*)
Linux)
tail -n +${SCRIPT_LEN_PLUS_ONE} "${SCRIPT}" | tar xzf -
;;

Просмотреть файл

@ -8,30 +8,56 @@
# We expect this script to run from the BUILD directory (i.e. scxcore/build).
# Directory paths are hard-coded for this location.
# Notes for file bundle_skel.sh (included here since we don't want to ship
# these comments in shell bundle):
#
# The bundle_skel.sh file is a shell bundle for all platforms (Redhat, SUSE,
# AIX, HP, and Solaris), as well as universal Linux platforms.
#
# Use this script by concatenating it with some binary package.
#
# The bundle is created by cat'ing the script in front of the binary, so for
# the gzip'ed tar example, a command like the following will build the bundle:
#
# tar -czvf - <target-dir> | cat sfx.skel - > my.bundle
#
# The bundle can then be copied to a system, made executable (chmod +x) and
# then run.
#
# This script has some useful helper options to split out the script and/or
# binary in place, and to turn on shell debugging.
#
# This script is paired with create_bundle.sh, which will edit constants in
# this script for proper execution at runtime. The "magic", here, is that
# create_bundle.sh encodes the length of this script in the script itself.
# Then the script can use that with 'tail' in order to strip the script from
# the binary package.
#
# Developer note: A prior incarnation of this script used 'sed' to strip the
# script from the binary package. That didn't work on AIX 5, where 'sed' did
# strip the binary package - AND null bytes, creating a corrupted stream.
SOURCE_DIR=`(cd ../installer/bundle; pwd -P)`
INTERMEDIATE_DIR=`(cd ../installer/intermediate; pwd -P)`
# Exit on error
set -e
set -x
# Don't display output
set +x
usage()
{
echo "usage: $0 platform directory tar-file scx-package-name omi-package-name [scx-package-name-100 omi-package-name-100]"
echo "usage: $0 platform directory tar-file scx-package-name omi-package-name <provider-only>"
echo " where"
echo " platform is one of: linux, ulinux-r, ulinux-d, aix, hpux, sun"
echo " platform is one of: linux, aix, hpux, sun"
echo " directory is directory path to package file"
echo " tar-file is the name of the tar file that contains the following packages"
echo " scx-package-name is the name of the scx installation package"
echo " omi-package-name is the name of the omi installation package"
echo " If ULINUX, the default packages above are for openssl 0.9.8 versions, and below:"
echo " scx-package-name-100 is the name of the openssl 1.0.0 scx installation package"
echo " omi-package-name-100 is the name of the openssl 1.0.0 omi installation package"
echo ""
echo " If omi-package-name is blank, we assume a 'combined' universal build, agent only."
echo " This means: No OMI is bundled, no open-source kits are bundled, we only include the"
echo " agent, but built for each of SSL 0.9.8 and SSL 1.0.0, RPM & Debian"
echo " provider-only is 1 (scx-cimprov style kit) or 0 (scx combined kit)"
echo " If omi-package-name is empty, then we assume universal SSL directories for OMI"
exit 1
}
@ -46,7 +72,7 @@ if [ -z "$PLATFORM_TYPE" ]; then
fi
case "$PLATFORM_TYPE" in
Linux_REDHAT|Linux_SUSE|Linux_UBUNTU_D|Linux_ULINUX_R|Linux_ULINUX_D|Linux_ULINUX|AIX|HPUX|SunOS)
Linux|AIX|HPUX|SunOS)
;;
*)
@ -80,31 +106,16 @@ if [ -z "$4" ]; then
exit 1
fi
SCX_PACKAGE=`echo $4 | sed -e 's/.rpm$//' -e 's/.deb$//'`
if [ -n "$5" ]; then
if [ "$PLATFORM_TYPE" = "ulinux-d" ]; then
# $6 and $7 need to be set for ULINUX
if [ -z "$6" ]; then
echo "Missing parameter: scx-package-name-098" >&2
echo ""
usage
exit 1
fi
if [ -z "$7" ]; then
echo "Missing parameter: omi-package-name-100" >&2
echo ""
usage
exit 1
fi
fi
COMBINED_PACKAGE=0
else
COMBINED_PACKAGE=1
if [ -z "$6" ]; then
echo "Missing parameter: provider-only" >&2
echo ""
usage
exit 1
fi
SCX_PACKAGE=`echo $4 | sed -e 's/.rpm$//' -e 's/.deb$//'`
OMI_PACKAGE=`echo $5 | sed -e 's/.rpm$//' -e 's/.deb$//'`
PROVIDER_ONLY=$6
if [ ! -f "$2/$3" ]; then
echo "Tar file \"$2/$3\" does not exist"
@ -119,36 +130,23 @@ OUTPUT_DIR=`(cd $2; pwd -P)`
cd $INTERMEDIATE_DIR
# Fetch the bundle skeleton file
cp $SOURCE_DIR/primary.skel .
chmod u+w primary.skel
cp $SOURCE_DIR/bundle_skel.sh .
chmod u+w bundle_skel.sh
# Edit the bundle file for hard-coded values
sed -e "s/PLATFORM=<PLATFORM_TYPE>/PLATFORM=$PLATFORM_TYPE/" < primary.skel > primary.$$
mv primary.$$ primary.skel
sed -i "s/PLATFORM=<PLATFORM_TYPE>/PLATFORM=$PLATFORM_TYPE/" bundle_skel.sh
sed -i "s/TAR_FILE=<TAR_FILE>/TAR_FILE=$3/" bundle_skel.sh
sed -i "s/OM_PKG=<OM_PKG>/OM_PKG=$SCX_PACKAGE/" bundle_skel.sh
sed -i "s/OMI_PKG=<OMI_PKG>/OMI_PKG=$OMI_PACKAGE/" bundle_skel.sh
sed -e "s/TAR_FILE=<TAR_FILE>/TAR_FILE=$3/" primary.skel > primary.$$
mv primary.$$ primary.skel
sed -e "s/OM_PKG=<OM_PKG>/OM_PKG=$SCX_PACKAGE/" primary.skel > primary.$$
mv primary.$$ primary.skel
sed -e "s/OMI_PKG=<OMI_PKG>/OMI_PKG=$OMI_PACKAGE/" primary.skel > primary.$$
mv primary.$$ primary.skel
if [ $COMBINED_PACKAGE -ne 0 ]; then
sed -e "s/PROVIDER_ONLY=0/PROVIDER_ONLY=1/" < primary.skel > primary.$$
mv primary.$$ primary.skel
fi
sed -i "s/PROVIDER_ONLY=0/PROVIDER_ONLY=$PROVIDER_ONLY/" bundle_skel.sh
SCRIPT_LEN=`wc -l < primary.skel | sed -e 's/ //g'`
SCRIPT_LEN=`wc -l < bundle_skel.sh | sed -e 's/ //g'`
SCRIPT_LEN_PLUS_ONE="$((SCRIPT_LEN + 1))"
sed -e "s/SCRIPT_LEN=<SCRIPT_LEN>/SCRIPT_LEN=${SCRIPT_LEN}/" < primary.skel > primary.$$
mv primary.$$ primary.skel
sed -e "s/SCRIPT_LEN_PLUS_ONE=<SCRIPT_LEN+1>/SCRIPT_LEN_PLUS_ONE=${SCRIPT_LEN_PLUS_ONE}/" < primary.skel > primary.$$
mv primary.$$ primary.skel
sed -i "s/SCRIPT_LEN=<SCRIPT_LEN>/SCRIPT_LEN=${SCRIPT_LEN}/" bundle_skel.sh
sed -i "s/SCRIPT_LEN_PLUS_ONE=<SCRIPT_LEN+1>/SCRIPT_LEN_PLUS_ONE=${SCRIPT_LEN_PLUS_ONE}/" bundle_skel.sh
# Fetch the kit
@ -156,34 +154,29 @@ cp $OUTPUT_DIR/$3 .
# Build the bundle
case "$PLATFORM_TYPE" in
Linux_REDHAT|Linux_SUSE|Linux_ULINUX_R)
BUNDLE_FILE=`echo $3 | sed -e "s/.rpm//" | sed -e "s/.tar//"`.sh
gzip -c $3 | cat primary.skel - > $BUNDLE_FILE
Linux)
BUNDLE_FILE=`echo $3 | sed -e "s/.rpm//" -e "s/.deb//" -e "s/.tar//"`.sh
gzip -c $3 | cat bundle_skel.sh - > $BUNDLE_FILE
;;
Linux_UBUNTU_D|Linux_ULINUX_D)
BUNDLE_FILE=`echo $3 | sed -e "s/.deb//" | sed -e "s/.tar//"`.sh
gzip -c $3 | cat primary.skel - > $BUNDLE_FILE
;;
Linux_ULINUX)
NEVERNEVERLAND_Linux_ULINUX)
BUNDLE_FILE=${SCX_PACKAGE}.sh
gzip -c $3 | cat primary.skel - > $BUNDLE_FILE
gzip -c $3 | cat bundle_skel.sh - > $BUNDLE_FILE
;;
AIX)
BUNDLE_FILE=`echo $3 | sed -e "s/.lpp//" | sed -e "s/.tar//"`.sh
gzip -c $3 | cat primary.skel - > $BUNDLE_FILE
BUNDLE_FILE=`echo $3 | sed -e "s/.lpp//" -e "s/.tar//"`.sh
gzip -c $3 | cat bundle_skel.sh - > $BUNDLE_FILE
;;
HPUX)
BUNDLE_FILE=`echo $3 | sed -e "s/.depot//" | sed -e "s/.tar//"`.sh
compress -c $3 | cat primary.skel - > $BUNDLE_FILE
BUNDLE_FILE=`echo $3 | sed -e "s/.depot//" -e "s/.tar//"`.sh
compress -c $3 | cat bundle_skel.sh - > $BUNDLE_FILE
;;
SunOS)
BUNDLE_FILE=`echo $3 | sed -e "s/.pkg//" | sed -e "s/.tar//"`.sh
compress -c $3 | cat primary.skel - > $BUNDLE_FILE
BUNDLE_FILE=`echo $3 | sed -e "s/.pkg//" -e "s/.tar//"`.sh
compress -c $3 | cat bundle_skel.sh - > $BUNDLE_FILE
;;
*)
@ -192,7 +185,7 @@ case "$PLATFORM_TYPE" in
esac
chmod +x $BUNDLE_FILE
rm primary.skel
rm bundle_skel.sh
# Remove the kit and copy the bundle to the kit location
rm $3

Просмотреть файл

@ -36,11 +36,11 @@ MAINTAINER: 'Microsoft Corporation'
/opt/microsoft/scx/bin/tools/setup.sh; intermediate/${{BUILD_CONFIGURATION}}/scx_setup_tools.sh; 644; root; ${{ROOT_GROUP_NAME}}
/opt/microsoft/scx/bin/tools/scxadmin; intermediate/${{BUILD_CONFIGURATION}}/scxadmin.sh; 755; root; ${{ROOT_GROUP_NAME}}
/opt/microsoft/scx/bin/tools/scxsslconfig; intermediate/${{BUILD_CONFIGURATION}}/scxsslconfig.sh; 755; root; ${{ROOT_GROUP_NAME}}
/opt/microsoft/scx/bin/tools/.scxsslconfig; target/${{BUILD_CONFIGURATION}}${{ULINUX_POSTFIX}}/scxsslconfig; 755; root; ${{ROOT_GROUP_NAME}}
/opt/microsoft/scx/bin/tools/.scxadmin; target/${{BUILD_CONFIGURATION}}/scxadmin; 755; root; ${{ROOT_GROUP_NAME}}
/opt/microsoft/scx/bin/omi_preexec; target/${{BUILD_CONFIGURATION}}/omi_preexec; 755; root; ${{ROOT_GROUP_NAME}}
/opt/microsoft/scx/bin/scxlogfilereader; target/${{BUILD_CONFIGURATION}}/scxlogfilereader; 755; root; ${{ROOT_GROUP_NAME}}
/opt/microsoft/scx/lib/libSCXCoreProviderModule.${{SHLIB_EXT}}; target/${{BUILD_CONFIGURATION}}/libSCXCoreProviderModule.${{SHLIB_EXT}}; 755; root; ${{ROOT_GROUP_NAME}}
/opt/microsoft/scx/bin/tools/.scxsslconfig; intermediate/${{BUILD_CONFIGURATION}}${{ULINUX_POSTFIX}}/scxsslconfig; 755; root; ${{ROOT_GROUP_NAME}}
/opt/microsoft/scx/bin/tools/.scxadmin; intermediate/${{BUILD_CONFIGURATION}}/scxadmin; 755; root; ${{ROOT_GROUP_NAME}}
/opt/microsoft/scx/bin/omi_preexec; intermediate/${{BUILD_CONFIGURATION}}/omi_preexec; 755; root; ${{ROOT_GROUP_NAME}}
/opt/microsoft/scx/bin/scxlogfilereader; intermediate/${{BUILD_CONFIGURATION}}/scxlogfilereader; 755; root; ${{ROOT_GROUP_NAME}}
/opt/microsoft/scx/lib/libSCXCoreProviderModule.${{SHLIB_EXT}}; intermediate/${{BUILD_CONFIGURATION}}/libSCXCoreProviderModule.${{SHLIB_EXT}}; 755; root; ${{ROOT_GROUP_NAME}}
/etc/opt/microsoft/scx/pf_file.sh; intermediate/${{BUILD_CONFIGURATION}}/pf_file.sh; 444; root; sys
/etc/opt/microsoft/scx/conf/scxconfig.conf; installer/conf/scxconfig.conf; 644; root; ${{ROOT_GROUP_NAME}}; conffile

Просмотреть файл

@ -2,11 +2,27 @@
PF: 'Linux'
OMI_SERVICE: '/opt/omi/bin/service_control'
PFDISTRO: 'ULINUX'
PFMAJOR: '1'
PFMINOR: '0'
%Defines
ULINUX
%Files
/opt/microsoft/scx/bin/tools/GetLinuxOS.sh; target/${{BUILD_CONFIGURATION}}/GetLinuxOS.sh; 755; root; root
/opt/microsoft/scx/bin/tools/GetLinuxOS.sh; intermediate/${{BUILD_CONFIGURATION}}/GetLinuxOS.sh; 755; root; root
/etc/opt/microsoft/scx/conf/scx-release; installer/conf/scx-release; 644; root; ${{ROOT_GROUP_NAME}}; conffile
%Preinstall_50
# VerifySSLVersion
openssl version | awk '{print $2}' | grep -Eq '^0.9.8|^1.0.'
if [ $? -ne 0 ]; then
echo 'Unsupported OpenSSL version - must be either 0.9.8* or 1.0.*.'
echo 'Installation cannot proceed.'
exit 1
fi
%Postinstall_875
set -e

Просмотреть файл

@ -1,4 +0,0 @@
%Variables
PFDISTRO: 'REDHAT'

Просмотреть файл

@ -1,2 +0,0 @@
%Variables
PFMAJOR: '4'

Просмотреть файл

@ -1,2 +0,0 @@
%Variables
PFMAJOR: '5'

Просмотреть файл

@ -1,2 +0,0 @@
%Variables
PFMAJOR: '6'

Просмотреть файл

@ -1,2 +0,0 @@
%Variables
PFMAJOR: '7'

Просмотреть файл

@ -1,3 +0,0 @@
%Variables
PFDISTRO: 'SUSE'
PFMINOR: '0'

Просмотреть файл

@ -1,2 +0,0 @@
%Variables
PFMAJOR: '10'

Просмотреть файл

@ -1,2 +0,0 @@
%Variables
PFMAJOR: '11'

Просмотреть файл

@ -1,2 +0,0 @@
%Variables
PFMAJOR: '12'

Просмотреть файл

@ -1,2 +0,0 @@
%Variables
PFMAJOR: '9'

Просмотреть файл

@ -1,5 +0,0 @@
%Variables
PFDISTRO: 'UBUNTU'
%Defines
ULINUX

Просмотреть файл

@ -1,2 +0,0 @@
%Variables
PFMAJOR: '14'

Просмотреть файл

@ -1,16 +0,0 @@
%Variables
PFDISTRO: 'ULINUX'
PFMAJOR: '1'
PFMINOR: '0'
%Defines
ULINUX
%Preinstall_50
# VerifySSLVersion
openssl version | awk '{print $2}' | grep -Eq '^0.9.8|^1.0.'
if [ $? -ne 0 ]; then
echo 'Unsupported OpenSSL version - must be either 0.9.8* or 1.0.*.'
echo 'Installation cannot proceed.'
exit 1
fi

Просмотреть файл

@ -1,2 +0,0 @@
%Variables
PFDISTRO_ULINUX_TYPE: 'D'

Просмотреть файл

@ -1,2 +0,0 @@
%Variables
PFDISTRO_ULINUX_TYPE: 'R'

Просмотреть файл

@ -1,2 +0,0 @@
%Variables
SYSLIB_DIR: '/usr/lib64'

Просмотреть файл

@ -1,2 +0,0 @@
%Variables
SYSLIB_DIR: '/usr/lib'

Просмотреть файл

@ -21,6 +21,8 @@
#include "support/osprovider.h"
#include "SCX_OperatingSystem_Class_Provider.h"
#include "testutilities.h"
using namespace SCXCore;
using namespace SCXCoreLib;
using namespace SCXSystemLib;
@ -117,7 +119,7 @@ public:
const TestableInstance &instance = context[0];
CPPUNIT_ASSERT_EQUAL_MESSAGE(ERROR_MESSAGE,
GetDistributionName(CALL_LOCATION(errMsg)), instance.GetKeyValue(0, CALL_LOCATION(errMsg)));
SCXCore::GetActualDistributionName(CALL_LOCATION(errMsg)), instance.GetKeyValue(0, CALL_LOCATION(errMsg)));
CPPUNIT_ASSERT_EQUAL_MESSAGE(ERROR_MESSAGE, L"SCX_ComputerSystem", instance.GetKeyValue(1, CALL_LOCATION(errMsg)));
CPPUNIT_ASSERT_EQUAL_MESSAGE(ERROR_MESSAGE,
GetFQHostName(CALL_LOCATION(errMsg)), instance.GetKeyValue(2, CALL_LOCATION(errMsg)));

Просмотреть файл

@ -22,6 +22,8 @@
#include "SCX_UnixProcess_Class_Provider.h"
#include "SCX_UnixProcessStatisticalInformation_Class_Provider.h"
#include "testutilities.h"
//WI567597: Property ModulePath not returned during pbuild on ostcdev64-sles11-01, ostcdev-sles10-01, ostcdev64-rhel4-01 and ostcdev-rhel4-10.
//WI567598: Property Parameters not returned on ostcdev-sles9-10.
static bool brokenProvider = true;
@ -152,7 +154,7 @@ public:
keyValues.push_back(L"SCX_ComputerSystem");
keyValues.push_back(GetFQHostName(CALL_LOCATION(errMsg)));
keyValues.push_back(L"SCX_OperatingSystem");
keyValues.push_back(GetDistributionName(CALL_LOCATION(errMsg)));
keyValues.push_back(SCXCore::GetActualDistributionName(CALL_LOCATION(errMsg)));
keyValues.push_back(L"SCX_UnixProcess");
keyValues.push_back(SCXCoreLib::StrFrom(getpid()));
@ -177,7 +179,7 @@ public:
keyValues.push_back(L"SCX_ComputerSystem");
keyValues.push_back(GetFQHostName(CALL_LOCATION(errMsg)));
keyValues.push_back(L"SCX_OperatingSystem");
keyValues.push_back(GetDistributionName(CALL_LOCATION(errMsg)));
keyValues.push_back(SCXCore::GetActualDistributionName(CALL_LOCATION(errMsg)));
keyValues.push_back(SCXCoreLib::StrFrom(getpid()));
keyValues.push_back(L"SCX_UnixProcessStatisticalInformation");

Просмотреть файл

@ -1,97 +0,0 @@
/*--------------------------------------------------------------------------------
Copyright (c) Microsoft Corporation. All rights reserved.
*/
/**
\file
\brief Provides a way into the process provider for testing purposes
\date 2008-09-23 08:59:31
*/
/*----------------------------------------------------------------------------*/
#ifndef TESTABLEPROCESSPROVIDER_H
#define TESTABLEPROCESSPROVIDER_H
#include <source/code/providers/process_provider/processprovider.h>
/*----------------------------------------------------------------------------*/
/**
Class that exposes the protected methods of the process provider for
testing purposes.
*/
class TestableProcessProvider : public TestableProvider, public SCXCore::ProcessProvider
{
public:
void TestDoInit()
{
DoInit();
}
void TestDoEnumInstanceNames(const SCXProviderLib::SCXCallContext& callContext,
SCXProviderLib::SCXInstanceCollection &names)
{
DoEnumInstanceNames(callContext, names);
if (SupportsSendInstance())
{
CPPUNIT_ASSERT( names.Size() == 0 );
names = m_testInstances;
m_testInstances.clear();
}
}
void TestDoEnumInstances(const SCXProviderLib::SCXCallContext& callContext,
SCXProviderLib::SCXInstanceCollection &instances)
{
DoEnumInstances(callContext, instances);
if (SupportsSendInstance())
{
CPPUNIT_ASSERT( instances.Size() == 0 );
instances = m_testInstances;
m_testInstances.clear();
}
}
void TestDoGetInstance(const SCXProviderLib::SCXCallContext& callContext,
SCXProviderLib::SCXInstance& instance)
{
DoGetInstance(callContext, instance);
}
void TestDoInvokeMethod(const SCXProviderLib::SCXCallContext& callContext,
const std::wstring& methodname, const SCXProviderLib::SCXArgs& args,
SCXProviderLib::SCXArgs& outargs, SCXProviderLib::SCXProperty& result)
{
DoInvokeMethod(callContext, methodname, args, outargs, result);
}
void TestDoCleanup()
{
DoCleanup();
m_testInstances.clear();
}
void ForceSample()
{
m_processes->SampleData();
}
protected:
// If we're configured to send by instance, we collect instances together here for test purposes
virtual void SendInstanceName(const SCXProviderLib::SCXInstance& instance)
{
m_testInstances.AddInstance(instance);
}
// If we're configured to send by instance, we collect instances together here for test purposes
virtual void SendInstance(const SCXProviderLib::SCXInstance& instance)
{
m_testInstances.AddInstance(instance);
}
private:
SCXProviderLib::SCXInstanceCollection m_testInstances;
};
#endif /* TESTABLEPROCESSPROVIDER_H */
/*----------------------------E-N-D---O-F---F-I-L-E---------------------------*/

Просмотреть файл

@ -19,6 +19,8 @@
#include "SCX_UnixProcess_Class_Provider.h"
#include "SCX_UnixProcessStatisticalInformation_Class_Provider.h"
#include "testutilities.h"
using namespace SCXCoreLib;
class SCXUnixProcessKeyTest : public CPPUNIT_NS::TestFixture
@ -118,7 +120,7 @@ public:
keyNames.push_back(L"OSCreationClassName");
keyValues.push_back(L"SCX_OperatingSystem");
keyNames.push_back(L"OSName");
keyValues.push_back(GetDistributionName(CALL_LOCATION(errMsg)));
keyValues.push_back(SCXCore::GetActualDistributionName(CALL_LOCATION(errMsg)));
keyNames.push_back(L"CreationClassName");
keyValues.push_back(L"SCX_UnixProcess");
StandardTestCheckKeyValues<mi::SCX_UnixProcess_Class_Provider>(
@ -141,7 +143,7 @@ public:
keyNames.push_back(L"OSCreationClassName");
keyValues.push_back(L"SCX_OperatingSystem");
keyNames.push_back(L"OSName");
keyValues.push_back(GetDistributionName(CALL_LOCATION(errMsg)));
keyValues.push_back(SCXCore::GetActualDistributionName(CALL_LOCATION(errMsg)));
keyNames.push_back(L"ProcessCreationClassName");
keyValues.push_back(L"SCX_UnixProcessStatisticalInformation");
StandardTestCheckKeyValues<mi::SCX_UnixProcessStatisticalInformation_Class_Provider>(

Просмотреть файл

@ -0,0 +1,86 @@
/*--------------------------------------------------------------------------------
Copyright (c) Microsoft Corporation. All rights reserved.
*/
/**
\file
\brief Test code for SCX Core Provider
\date 2015-12-23
Test support code for SCX Core Provider
*/
/*----------------------------------------------------------------------------*/
#include <scxcorelib/scxcmn.h>
#include <scxcorelib/scxexception.h>
#include <scxcorelib/scxlog.h>
#include <scxcorelib/stringaid.h>
#include <scxsystemlib/scxostypeinfo.h>
#include <testutils/scxunit.h>
#include <testutils/providertestutils.h>
using namespace SCXCoreLib;
namespace SCXCore
{
/**
Gets the actual O/S distribution for the current installation
\returns The actual O/S distribution for current installation
\notes Returning the actual O/S type, on Linux, is difficult. The main
issue is that it can vary based on numerous factors (not the
least of which includes: Is the kit currently installed, and
what kit was installed prior to this kit installation). These
issues make reliable tests extraordinarily difficult, partly
because the code that fetches this is up in the PAL (one level
up, and thus not mockable very easily).
Solution: On non-linux platforms, just rely on our trusty call
to GetDistributionName(), which works very reliably. On Linux,
however, call the actual code to return the distro name (what
the provider will do), validate for a list of valid responses,
and continue along our merry way.
*/
std::wstring GetActualDistributionName(std::wstring errMsg)
{
#if !defined(linux)
return GetDistributionName(errMsg);
#else
// Add a list of possible responses (add to list if needed)
std::vector<std::wstring> possibleResponses;
possibleResponses.push_back(L"Unknown Linux Distribution");
possibleResponses.push_back(L"Linux Distribution");
possibleResponses.push_back(L"Red Hat Distribution");
possibleResponses.push_back(L"SuSE Distribution");
// Call the actual routine to fetch the system name
std::wstring actualName;
try {
SCXSystemLib::SCXOSTypeInfo osinfo;
actualName = osinfo.GetOSName(true);
} catch (SCXException& e) {
std::wstringstream err;
err << L"Can't read OS name because of exception: " << e.What() << e.Where();
//CPPUNIT_ASSERT_MESSAGE(err, false);
}
bool matchFound = false;
for (std::vector<std::wstring>::const_iterator it = possibleResponses.begin(); it != possibleResponses.end(); ++it) {
if (actualName == *it) {
matchFound = true;
break;
}
}
CPPUNIT_ASSERT_MESSAGE("Unknown OSName returned: " + StrToMultibyte(actualName), matchFound);
return actualName;
#endif // !defined(linux)
}
}

Просмотреть файл

@ -0,0 +1,28 @@
/*--------------------------------------------------------------------------------
Copyright (c) Microsoft Corporation. All rights reserved.
*/
/**
\file
\brief Test code for SCX Core Provider
\date 2015-12-23
Test support code for SCX Core Provider
*/
/*----------------------------------------------------------------------------*/
#ifndef TESTUTILITIES_H
#define TESTUTILITIES_H
#include <scxcorelib/scxcmn.h>
#include <string>
namespace SCXCore
{
std::wstring GetActualDistributionName(std::wstring errMsg);
}
#endif // !defined(TESTUTILITIES_H)