├── scxcore.version ├── omi.version ├── .gitmodules ├── LICENSE ├── updateVersion.sh ├── SECURITY.md └── README.md /scxcore.version: -------------------------------------------------------------------------------- 1 | # -*- mode: Makefile; -*- 2 | 3 | # Build Version Information 4 | 5 | SCX_BUILDVERSION_MAJOR=1 6 | SCX_BUILDVERSION_MINOR=6 7 | SCX_BUILDVERSION_PATCH=8 8 | SCX_BUILDVERSION_BUILDNR=143 9 | SCX_BUILDVERSION_DATE=20250819 10 | SCX_BUILDVERSION_STATUS=Developer_Build 11 | 12 | #-------------------------------- End of File ----------------------------------- 13 | -------------------------------------------------------------------------------- /omi.version: -------------------------------------------------------------------------------- 1 | # -*- mode: Makefile; -*- 2 | 3 | # Build Version Information 4 | 5 | OMI_BUILDVERSION_MAJOR=1 6 | OMI_BUILDVERSION_MINOR=6 7 | OMI_BUILDVERSION_PATCH=8 8 | OMI_BUILDVERSION_BUILDNR=142 9 | OMI_BUILDVERSION_DATE=20250617 10 | OMI_BUILDVERSION_STATUS=Developer_Build 11 | OMI_BUILDVERSION_NUGET=1.6.108142 12 | 13 | #-------------------------------- End of File ----------------------------------- 14 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "omi"] 2 | path = omi 3 | url = git@github.com:Microsoft/omi.git 4 | branch = stable 5 | [submodule "pal"] 6 | path = pal 7 | url = git@github.com:Microsoft/pal.git 8 | branch = master 9 | [submodule "opsmgr"] 10 | path = opsmgr 11 | url = git@github.com:Microsoft/SCXcore.git 12 | branch = master 13 | [submodule "opsmgr-kits"] 14 | path = opsmgr-kits 15 | url = git@github.com:Microsoft/SCXcore-osskits.git 16 | branch = master 17 | [submodule "omi-kits"] 18 | path = omi-kits 19 | url = git@github.com:Microsoft/omi-kits.git 20 | branch = master 21 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Build-SCXcore 2 | 3 | Copyright (c) Microsoft Corporation 4 | All rights reserved. 5 | 6 | MIT License 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining 9 | a copy of this software and associated documentation files (the 10 | ""Software""), to deal in the Software without restriction, including 11 | without limitation the rights to use, copy, modify, merge, publish, 12 | distribute, sublicense, and/or sell copies of the Software, and to 13 | permit persons to whom the Software is furnished to do so, subject to 14 | the following conditions: 15 | 16 | The above copyright notice and this permission notice shall be 17 | included in all copies or substantial portions of the Software. 18 | 19 | THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, 20 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 23 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 24 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 25 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | -------------------------------------------------------------------------------- /updateVersion.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # 3 | # Update the version file each day for the daily build 4 | # 5 | 6 | # Exit on error 7 | set -e 8 | 9 | # Parsing logic 10 | 11 | usage() 12 | { 13 | echo "$0 " 14 | echo 15 | echo "Valid options are:" 16 | echo " -f: Version file to update (mandatory option)" 17 | echo " -h: This message" 18 | echo " -i: Increment build number and set date" 19 | echo " -r: Set for release build" 20 | echo " -v: Verbose output" 21 | echo 22 | echo "With only the -f option specified, -i is assumed" 23 | 24 | exit 1 25 | } 26 | 27 | P_INCREMENT=0 28 | P_RELEASE=0 29 | VERBOSE=0 30 | 31 | while getopts "h?f:irv" opt; do 32 | case "$opt" in 33 | h|\?) 34 | usage 35 | ;; 36 | f) 37 | VERSION_FILE=$OPTARG 38 | ;; 39 | 40 | i) 41 | P_INCREMENT=1 42 | ;; 43 | r) 44 | P_RELEASE=1 45 | ;; 46 | v) 47 | VERBOSE=1 48 | ;; 49 | esac 50 | done 51 | shift $((OPTIND-1)) 52 | 53 | if [ "$@ " != " " ]; then 54 | echo "Parsing error: '$@' is unparsed, use -h for help" 1>& 2 55 | exit 1 56 | fi 57 | 58 | if [ -z "$VERSION_FILE" ]; then 59 | echo "Must specify -f qualifier (version file)" 1>& 2 60 | exit 1 61 | fi 62 | 63 | if [ ! -f $VERSION_FILE ]; then 64 | echo "Can't find file $VERSION_FILE" 1>& 2 65 | exit 1 66 | fi 67 | 68 | if [ ! -w $VERSION_FILE ]; then 69 | echo "File $VERSION_FILE is not writeable" 1>& 2 70 | exit 1 71 | fi 72 | 73 | # Set default behavior 74 | [ $P_RELEASE -eq 0 ] && P_INCREMENT=1 75 | 76 | # Increment build number 77 | if [ $P_INCREMENT -ne 0 ]; then 78 | VERSION_OLD=`grep '^[A-Z]*_BUILDVERSION_BUILDNR' $VERSION_FILE | cut -d= -f2` 79 | DATE_OLD=`grep '^[A-Z]*_BUILDVERSION_DATE' $VERSION_FILE | cut -d= -f2` 80 | 81 | VERSION_NEW=$(( $VERSION_OLD + 1 )) 82 | DATE_NEW=`date +%Y%m%d` 83 | 84 | perl -i -pe "s/(^[A-Z]*_BUILDVERSION_BUILDNR)=.*/\1=$VERSION_NEW/" $VERSION_FILE 85 | perl -i -pe "s/(^[A-Z]*_BUILDVERSION_DATE)=.*/\1=$DATE_NEW/" $VERSION_FILE 86 | 87 | if [ $VERBOSE -ne 0 ]; then 88 | echo "Updated version number, Was: $VERSION_OLD, Now $VERSION_NEW" 89 | echo "Updated release date, Was: $DATE_OLD, Now $DATE_NEW" 90 | fi 91 | fi 92 | 93 | # Set release build 94 | if [ $P_RELEASE -ne 0 ]; then 95 | perl -i -pe "s/^([A-Z]*_BUILDVERSION_STATUS)=.*/\1=Release_Build/" $VERSION_FILE 96 | [ $VERBOSE -ne 0 ] && echo "Set BUILDVERSION_STATUS to \"Release_Build\"" 97 | echo "WARNING: Never commit $VERSION_FILE with release build set!" 1>& 2 98 | fi 99 | 100 | exit 0 101 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ## Security 4 | 5 | Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). 6 | 7 | If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below. 8 | 9 | ## Reporting Security Issues 10 | 11 | **Please do not report security vulnerabilities through public GitHub issues.** 12 | 13 | Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report). 14 | 15 | If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey). 16 | 17 | You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc). 18 | 19 | Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: 20 | 21 | * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) 22 | * Full paths of source file(s) related to the manifestation of the issue 23 | * The location of the affected source code (tag/branch/commit or direct URL) 24 | * Any special configuration required to reproduce the issue 25 | * Step-by-step instructions to reproduce the issue 26 | * Proof-of-concept or exploit code (if possible) 27 | * Impact of the issue, including how an attacker might exploit the issue 28 | 29 | This information will help us triage your report more quickly. 30 | 31 | If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs. 32 | 33 | ## Preferred Languages 34 | 35 | We prefer all communications to be in English. 36 | 37 | ## Policy 38 | 39 | Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd). 40 | 41 | 42 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## ⚠️ Deprecation & Archiving Notice ⚠️ 2 | 3 | Thank you for your support and contributions to **Build-SCXcore**. 4 | 5 | This repository is now **deprecated** and will be **archived soon**. 6 | 7 | - **No further development, maintenance, or updates** will be provided. 8 | - **Bug fixes, security patches, and feature enhancements** are no longer planned. 9 | - After archiving, this repository will remain **available in read-only mode** for reference. 10 | 11 | For any questions, please refer to the existing documentation or community discussions. 12 | 13 | --- 14 | # Operations Management Client (Build-SCXcore) 15 | 16 | ##### Table of Contents 17 | - [Glossary of Terms](#glossary-of-terms) 18 | - [Setting up a machine to build SCX](#setting-up-a-machine-to-build-scx) 19 | - [Sudoers configuration](#sudoers-configuration) 20 | - [Dependencies to build a native package](#dependencies-to-build-a-native-package) 21 | - [Setting up a system to build a shell bundle](#setting-up-a-system-to-build-a-shell-bundle) 22 | - [Cloning the repository](#cloning-the-repository) 23 | - [Building the agent](#building-the-agent) 24 | - [Code of Conduct](#code-of-conduct) 25 | 26 | If you are an active contributor to the SCXcore project, you should 27 | [set up your system](https://github.com/Microsoft/ostc-docs/blob/master/setup-git.md) 28 | and follow our [common workflow](https://github.com/Microsoft/ostc-docs/blob/master/workflow-workflow.md). 29 | New to git? Read [guidelines for development](https://github.com/Microsoft/ostc-docs/blob/master/setup-rules.md). 30 | 31 | ----- 32 | 33 | ### Glossary of Terms 34 | 35 | A short glossary might be helpful if this project is new to you: 36 | 37 | Term | Meaning 38 | ---- | ------- 39 | SCX | This is a historical term (System Center X-Plat (Cross Platform)), when SCX was the only product of its type. Now there are many different providers for many different purposes, and SCX is just one provider. 40 | Shell Bundle | A "shell bundle" is a distribution mechanism for the SCX agent. A shell bundle is a shell script that has, as part of it, .RPM and .DEB native package files for OMI and SCX itself. The shell bundle determines what has to be installed based on system configuration and installs the appropriate packages.

Note that the SCX shell bundle contains other shell bundles to install other packages as well (Apache and MySQL, for example). Due to this, we consider the SCX shell bundle to be a "mega-bundle". 41 | ULinux | A "Universal Linux" build is a type of build that will install and run on any Linux system that we support. We have two universal builds for Linux: One for 32-bit systems, and one for 64-bit systems. 42 | 43 | ----- 44 | 45 | ### Setting up a machine to build SCX 46 | 47 | There are two ways to build SCX: 48 | 49 | 1. As an RPM or DEB package that can be installed on the local system, 50 | assuming all dependencies are met (most easily met if a shell bundle 51 | was previously installed to "seed" the system), or 52 | 53 | 2. As a shell bundle. 54 | 55 | Building a shell bundle is a superset of setting up a system to build a local RPM, so we will cover that first. 56 | 57 | #### Sudoers configuration 58 | 59 | [Configure sudo](https://github.com/Microsoft/ostc-docs/blob/master/setup-build.md) 60 | 61 | #### Dependencies to build a native package 62 | 63 | Note that it's very nice to be able to use the [updatedns](https://github.com/jeffaco/msft-updatedns) project to use host names 64 | rather than IP numbers in a Hyper-V environment. On CentOS systems, 65 | this requires the bind-utils package (updatedns requires the `dig` 66 | program). The bind-utils package isn't otherwise necessary. 67 | 68 | - On CentOS 7.x 69 | ``` 70 | sudo yum install git bind-utils gcc-c++ rpm-devel pam-devel openssl-devel rpm-build 71 | ``` 72 | - On Ubuntu 14.04 73 | ``` 74 | sudo apt-get install git pkg-config make g++ rpm librpm-dev libpam0g-dev libssl-dev 75 | ``` 76 | 77 | - Notes on other platforms 78 | 79 | When building a machine for ULINUX builds (such as SuSE 10), we 80 | suggest using the O/S distribution CD to install the packages. It's 81 | not as easy, but that's the only way to guarantee that packages 82 | aren't updated such that generated binaries are not backwards 83 | compatible. (See notes on building a shell bundle, elsewhere in this 84 | document.) Note that ULinux builds are controlled via the configure 85 | script, discussed below. 86 | 87 | Also note that since you won't use `yum`, you must also handle the dependent 88 | packages manually (keep adding lines to the `rpm install` command line until 89 | all dependencies are satisfied). 90 | 91 | Similar methods would be utilized if building a Redhat system that is not 92 | registered for use for up2date. 93 | 94 | #### Setting up a system to build a shell bundle 95 | 96 | To build a shell bundle, we need and older Linux system (we typically use 97 | SuSE 10.0 for this), as binary images created with older Linux systems 98 | are generally upwards compatible when installed on newer Linux systems. 99 | 100 | A notable exception: We use the OpenSSL package, and we can't tell if 101 | we need OpenSSL v0.9.8 or OpenSSL v1.0.x. As a result, we have a [special process](https://github.com/Microsoft/ostc-openssl/blob/master/README.md) to build both versions of OpenSSL that we can link against. 102 | 103 | Once OpenSSL is set up, you need to configure omsagent to include the 104 | ```--enable-ulinux``` qualifier, like this:
```./configure --enable-ulinux``` 105 | 106 | ### Cloning the repository 107 | 108 | Note that there are several subprojects, and authentication is a hassle 109 | unless you set up an SSH key via your GitHub account. [Set up your machine](https://github.com/Microsoft/ostc-docs/blob/master/setup-git.md) properly for a much easier workflow. 110 | 111 | To clone the repository to build SCXcore, issue the following command: 112 | 113 | ``` 114 | git clone --recursive git@github.com:Microsoft/Build-SCXcore.git bld-scxcore 115 | ``` 116 | 117 | After this, you need to make sure that you're on the master branch for each 118 | of the subprojects. To do this, issue the following commands: 119 | 120 | ``` 121 | cd bld-scxcore 122 | git checkout master 123 | git submodule foreach git checkout master 124 | ``` 125 | 126 | You can also use an alias like ```git co-master``` if you followed 127 | [Configuring git](https://github.com/Microsoft/ostc-docs/blob/master/setup-git.md) 128 | recommendations. 129 | 130 | 131 | ### Building the Agent 132 | 133 | From the `bld-scxcore` directory (created above from `git clone`, do the 134 | following: 135 | 136 | ``` 137 | cd opsmgr/build 138 | ./configure 139 | make 140 | make test 141 | ``` 142 | 143 | Note that the ```configure``` script takes a variety of options. You 144 | can use ```configure --help``` to see the options available. 145 | 146 | When the build completes, you should have a native package that you 147 | can install on your system. The native package should be in a 148 | subdirectory off of `bld-scxcore/opsmgr/intermediate` (the directory 149 | name varies based on debug vs. release builds). 150 | 151 | As mentioned above, this form of build requires a shell bundle to be 152 | installed to "seed" your system with other required dependencies. 153 | Alternatively, you can simply install the OMI and SCX packages for 154 | your system, in that order. 155 | 156 | Note that a shell bundle can install more than OMI and SCX on your 157 | system. Depending on your system configuration, providers for Apache 158 | and MySQL may also be installed. 159 | 160 | ### Code of Conduct 161 | 162 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more 163 | information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact 164 | [opencode@microsoft.com](mailto:opencode@microsoft.com) with any 165 | additional questions or comments. 166 | --------------------------------------------------------------------------------