Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions .github/test-matrix.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
[
{"name":"almalinux-9","arch":"amd64","tag":"@sha256:457a85686d95bd324c1ddbdba43fccb79d8c127c11b1189941ccc913989461c5"},
{"name":"amazonlinux-2","arch":"amd64","tag":"@sha256:5f78d184712b39087d4448d1fe04ffa6a4dbb6e5ff0e29cdef0eff1f3980cfd8"},
{"name":"azurelinux-3","arch":"amd64","tag":"@sha256:6d8d1134816ee789c5579570d83671cd572ac0634a1ffdc04a0ef5471f8b0877"},
{"name":"centos-7","arch":"amd64","tag":"@sha256:0e72fef7615ffd41db07a0cb4a2d989f74925bc49a546c719f7ccb857852108a"},
{"name":"centos-8","arch":"amd64","tag":"@sha256:2fb02a9f8259b91ea938c003a845b7e9dc7150ea643bf8c1b6ae8bd4087d8706"},
{"name":"debian-10","arch":"amd64","tag":"@sha256:a05ae3e90f16cd284e3c0c818420c2685c17f327c0e6a1967837573490a2a327"},
{"name":"debian-11","arch":"amd64","tag":"@sha256:368dac89e858472de6435c86905c26749eb42e4a944b177b0df5c2dcb741b693"},
{"name":"debian-12","arch":"amd64","tag":"@sha256:63a8712390f4aed657924706ed0c4ce1c37d4c5d5c189625a09785e00fceac62"},
{"name":"debian-9","arch":"amd64","tag":"@sha256:7665a7e37457e59e3d240219230cf2a030aa9fe1a00e08a92b144ba8c383419e"},
{"name":"mariner-2","arch":"amd64","tag":"@sha256:7080c3c0e03bf530e09ac94ae7f486e005534706cebe4df623f71de49d0f2904"},
{"name":"oraclelinux-7","arch":"amd64","tag":"@sha256:0561e7c5d0ae0486450ad086bf3e25a69be721e52df1df63bd835972322fb1e4"},
{"name":"oraclelinux-8","arch":"amd64","tag":"@sha256:1bf1d1622e5163d02c2066b15bd18294bf301a1df1d60318d7a396fc0e795b66"},
{"name":"rhel-7","arch":"amd64","tag":"@sha256:5739b3749eea6af70f6a76ce092e9a3b1b2f8f8ed1b6002bade36c28e74426c4"},
{"name":"rhel-8","arch":"amd64","tag":"@sha256:fd4b3005958abe0c8a3f9aee3be3604c9a778de80e89dd9d62b3c0864a701383"},
{"name":"rhel-9","arch":"amd64","tag":"@sha256:7cfb079ea2887a9cc8a524f109873126a76684076bec13bbd87e139d8d053b78"},
{"name":"rockylinux-9","arch":"amd64","tag":"@sha256:93c24f671cd27cfbf92a25177fbaa43fdf4a1da4911794ce771cb44bad096604"},
{"name":"sles-15","arch":"amd64","tag":"@sha256:b633a6effbe084b5cf34f1e10995374feb61b0a366160c5e7a786237aeb877a8"},
{"name":"ubuntu-18.04","arch":"amd64","tag":"@sha256:d0bf753624703349ad20886de2b7795caf46db005d5a5ece633aaa5aec7505f9"},
{"name":"ubuntu-20.04","arch":"amd64","tag":"@sha256:31687451ce1b8f50f4f26884bd0947fb5d5dba8711c63601b14bc0b19cb5c6ca"},
{"name":"ubuntu-22.04","arch":"amd64","tag":"@sha256:de2c11da255fa2c0ec39c9f56a53aaefbb4db97982e11c9487116551fc4ecae0"},
{"name":"ubuntu-24.04","arch":"amd64","tag":"@sha256:f660171fcbb5ef1669303456c85b7a0f9fba447c2e35ae89953f9070200f5c15"}
{"name": "almalinux-9", "arch": "amd64", "tag": "@sha256:4b939b0a50c007c9886e216bab5b9342120f65bcf02ddd95ac730180fe976c9b"},
{"name": "amazonlinux-2", "arch": "amd64", "tag": "@sha256:e0fc34dcb478f9237a667f5c0088aaa56f0c5e10b58104e75995980aa860c9af"},
{"name": "azurelinux-3", "arch": "amd64", "tag": "@sha256:57c5bd226dfca2b692e2c7aeb3cb8092413d2603246aa516d0438b4592210109"},
{"name": "centos-7", "arch": "amd64", "tag": "@sha256:d9639307d5071d8991416cc722ca9ee3c55da1e35fbf6599a466f47219d04bac"},
{"name": "centos-8", "arch": "amd64", "tag": "@sha256:34387edefed51323f52976ad93c35967e48bcfedcdd592425e7c0e0df5947848"},
{"name": "debian-10", "arch": "amd64", "tag": "@sha256:535ce8c25e29acccc0070ab748719450ee27f1700f745e309ccbc3db8af58575"},
{"name": "debian-11", "arch": "amd64", "tag": "@sha256:e44fc64d1d92f523fae302112eaea6a695cc3963719a8434247d0283bbba59bc"},
{"name": "debian-12", "arch": "amd64", "tag": "@sha256:d7cc88bcc11041dfcc02024f2f89c64e01458ee0054ab5caecb63fa2325b5ed0"},
{"name": "debian-9", "arch": "amd64", "tag": "@sha256:1f7ac1c13711396dc69ff0c541c2b2ea6a08f62e572ab9021c7cc426b96a6a9d"},
{"name": "mariner-2", "arch": "amd64", "tag": "@sha256:38e369247cf1059449c58e240e0c7f391becea75bde37dfb537997498cf2aa62"},
{"name": "oraclelinux-7", "arch": "amd64", "tag": "@sha256:67f4e98781eda7b7cac6df23214a54bf4533ad1d062ee4f183d84ac7027bc452"},
{"name": "oraclelinux-8", "arch": "amd64", "tag": "@sha256:4aab402b38a8e455cf02595da737c9e81c4877c202687c5bfe32483922d99b89"},
{"name": "rhel-7", "arch": "amd64", "tag": "@sha256:5a3a5c42d677e985aea6a21db67f937a0fc60ad655b8125f50df4d27627db7ce"},
{"name": "rhel-8", "arch": "amd64", "tag": "@sha256:b01a5fbd1f58843550aa39fdd6928b01d1642cd91fe928a323336ffc491c0dce"},
{"name": "rhel-9", "arch": "amd64", "tag": "@sha256:8675a833d0135e10b7e2a9c1a136db2b643a093b22118aba7c9615de90fb0c85"},
{"name": "rockylinux-9", "arch": "amd64", "tag": "@sha256:bfa096737f2b38151322db6c5886d9961465deae4cff32ff6e40cba5c1bbc2b6"},
{"name": "sles-15", "arch": "amd64", "tag": "@sha256:e4b36f00fdcd9892f19a118f0b7ca6781c368d086ae37e4ebc93ea23a9dd7327"},
{"name": "ubuntu-18.04", "arch": "amd64", "tag": "@sha256:eb03654ec4eef4f470be0a24a48268e38344b831c0127ecb01e8dbc99230aa9e"},
{"name": "ubuntu-20.04", "arch": "amd64", "tag": "@sha256:544b65bc43c6f1cbd3d9bc0c0085d64ccb1c7c6a9a7d82497a9edc166faa8677"},
{"name": "ubuntu-22.04", "arch": "amd64", "tag": "@sha256:04d0c74948ff005746df559bad00e257ddcdf309082807da04e150ab5cd5a736"},
{"name": "ubuntu-24.04", "arch": "amd64", "tag": "@sha256:7ac74b5fbe9bce992322cf1ce2c9d095b02ad82ce3aaab2ad0cb795c872a524b"}
]
2 changes: 1 addition & 1 deletion .github/workflows/ci-gcovr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
run: |
matrix="$(cat <<'EOL'
[
{ "name": "ubuntu-22.04", "arch": "amd64", "tag": "@sha256:7ba3a3bd055c507c2a42ce71448c3ff71889a3b58a7656900baf23e1dac0ced6" }
{ "name": "ubuntu-22.04", "arch": "amd64", "tag": "@sha256:04d0c74948ff005746df559bad00e257ddcdf309082807da04e150ab5cd5a736" }
]
EOL
)"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-sanitizers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
run: |
matrix="$(cat <<'EOL'
[
{ "name": "ubuntu-22.04", "arch": "amd64", "tag": "@sha256:7ba3a3bd055c507c2a42ce71448c3ff71889a3b58a7656900baf23e1dac0ced6" }
{ "name": "ubuntu-22.04", "arch": "amd64", "tag": "@sha256:04d0c74948ff005746df559bad00e257ddcdf309082807da04e150ab5cd5a736" }
]
EOL
)"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fuzzing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
matrix:
target:
[
{ os: ubuntu, version: 22.04, package-type: DEB, container-tag: '@sha256:7ba3a3bd055c507c2a42ce71448c3ff71889a3b58a7656900baf23e1dac0ced6' },
{ os: ubuntu, version: 22.04, package-type: DEB, container-tag: '@sha256:04d0c74948ff005746df559bad00e257ddcdf309082807da04e150ab5cd5a736' },
]
arch: [amd64]
with:
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/module-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ jobs:
matrix:
target:
[
{ os: almalinux, version: 9, package-type: RPM, container-tag: "@sha256:457a85686d95bd324c1ddbdba43fccb79d8c127c11b1189941ccc913989461c5" },
{ os: azurelinux, version: 3, package-type: RPM, container-tag: "@sha256:6d8d1134816ee789c5579570d83671cd572ac0634a1ffdc04a0ef5471f8b0877" },
{ os: debian, version: 11, package-type: DEB, container-tag: "@sha256:368dac89e858472de6435c86905c26749eb42e4a944b177b0df5c2dcb741b693" },
{ os: debian, version: 12, package-type: DEB, container-tag: "@sha256:63a8712390f4aed657924706ed0c4ce1c37d4c5d5c189625a09785e00fceac62" },
{ os: oraclelinux, version: 8, package-type: RPM, container-tag: "@sha256:1bf1d1622e5163d02c2066b15bd18294bf301a1df1d60318d7a396fc0e795b66" },
{ os: rhel, version: 8, package-type: RPM, container-tag: "@sha256:fd4b3005958abe0c8a3f9aee3be3604c9a778de80e89dd9d62b3c0864a701383" },
{ os: rhel, version: 9, package-type: RPM, container-tag: "@sha256:7cfb079ea2887a9cc8a524f109873126a76684076bec13bbd87e139d8d053b78" },
{ os: sles, version: 15, package-type: RPM, container-tag: "@sha256:b633a6effbe084b5cf34f1e10995374feb61b0a366160c5e7a786237aeb877a8" },
{ os: ubuntu, version: 20.04, package-type: DEB, container-tag: "@sha256:31687451ce1b8f50f4f26884bd0947fb5d5dba8711c63601b14bc0b19cb5c6ca" },
{ os: ubuntu, version: 22.04, package-type: DEB, container-tag: "@sha256:7ba3a3bd055c507c2a42ce71448c3ff71889a3b58a7656900baf23e1dac0ced6" },
{ os: ubuntu, version: 24.04, package-type: DEB, container-tag: "@sha256:f660171fcbb5ef1669303456c85b7a0f9fba447c2e35ae89953f9070200f5c15" },
{ os: almalinux, version: 9, package-type: RPM, container-tag: "@sha256:4b939b0a50c007c9886e216bab5b9342120f65bcf02ddd95ac730180fe976c9b" },
{ os: azurelinux, version: 3, package-type: RPM, container-tag: "@sha256:57c5bd226dfca2b692e2c7aeb3cb8092413d2603246aa516d0438b4592210109" },
{ os: debian, version: 11, package-type: DEB, container-tag: "@sha256:e44fc64d1d92f523fae302112eaea6a695cc3963719a8434247d0283bbba59bc" },
{ os: debian, version: 12, package-type: DEB, container-tag: "@sha256:d7cc88bcc11041dfcc02024f2f89c64e01458ee0054ab5caecb63fa2325b5ed0" },
{ os: oraclelinux, version: 8, package-type: RPM, container-tag: "@sha256:4aab402b38a8e455cf02595da737c9e81c4877c202687c5bfe32483922d99b89" },
{ os: rhel, version: 8, package-type: RPM, container-tag: "@sha256:b01a5fbd1f58843550aa39fdd6928b01d1642cd91fe928a323336ffc491c0dce" },
{ os: rhel, version: 9, package-type: RPM, container-tag: "@sha256:8675a833d0135e10b7e2a9c1a136db2b643a093b22118aba7c9615de90fb0c85" },
{ os: sles, version: 15, package-type: RPM, container-tag: "@sha256:e4b36f00fdcd9892f19a118f0b7ca6781c368d086ae37e4ebc93ea23a9dd7327" },
{ os: ubuntu, version: 20.04, package-type: DEB, container-tag: "@sha256:544b65bc43c6f1cbd3d9bc0c0085d64ccb1c7c6a9a7d82497a9edc166faa8677" },
{ os: ubuntu, version: 22.04, package-type: DEB, container-tag: "@sha256:04d0c74948ff005746df559bad00e257ddcdf309082807da04e150ab5cd5a736" },
{ os: ubuntu, version: 24.04, package-type: DEB, container-tag: "@sha256:7ac74b5fbe9bce992322cf1ce2c9d095b02ad82ce3aaab2ad0cb795c872a524b" },
]
arch: [amd64]
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nrp-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
matrix:
target:
[
{ os: ubuntu, version: 14.04, arch: amd64, dist: trusty, package-type: DEB, tag: "@sha256:d6f9c8072541d23779b0fbd4ff53d7b55dbdcf5d8998aa44a790546d9ec1e747" },
{ os: ubuntu, version: 14.04, arch: amd64, dist: trusty, package-type: DEB, tag: "@sha256:1420b5ddf538bd058c77ef94ea65f6d8178ed18df613f39c6aba5f77067500ed" },
]
secrets:
onedstenant: >-
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
name: Analyze
runs-on: ubuntu-latest
container:
image: ghcr.io/azure/azure-osconfig/ubuntu-22.04-amd64@sha256:7ba3a3bd055c507c2a42ce71448c3ff71889a3b58a7656900baf23e1dac0ced6
image: ghcr.io/azure/azure-osconfig/ubuntu-22.04-amd64@sha256:04d0c74948ff005746df559bad00e257ddcdf309082807da04e150ab5cd5a736

steps:
- uses: actions/checkout@v4
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/universalnrp-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,14 @@ jobs:
${{
(github.ref == 'refs/heads/main' && secrets.ONEDS_TENANT_PROD) ||
(github.ref == 'refs/heads/dev' && secrets.ONEDS_TENANT_NONPROD) ||
(github.ref == 'refs/heads/ahbenmes/telemetry_staging' && secrets.ONEDS_TENANT_NONPROD) ||
''
}}
with:
target: ubuntu-14.04
arch: amd64
artifact: nrp-test
package-type: DEB
container-tag: "@sha256:d6f9c8072541d23779b0fbd4ff53d7b55dbdcf5d8998aa44a790546d9ec1e747"
container-tag: "@sha256:1420b5ddf538bd058c77ef94ea65f6d8178ed18df613f39c6aba5f77067500ed"
test: true
machine-config: true
release: ${{ github.event_name == 'pull_request' && false || true }}
Expand Down
68 changes: 65 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,73 @@ OSConfig's C/C++ code currently targets compliance with C11.

### Prerequisites

Make sure all dependencies are installed. For example, on Ubuntu:
Build environments have many dependencies required, the easiest way to get started is to use our pre-defined container environments in [devops/docker](devops/docker/).

Make sure all dependencies are installed for your distribution. All of our supported distributions are documented in the Dockerfiles under [devops/docker](devops/docker/) (additional packages may be present for CI which are not necessary for building). The following packages are typically required however the package names may vary across distributions. There might also be packages that are out-of-date so they are built installed from source.

**Common dependencies across distributions:**
- git
- cmake (>= 3.16.0)
- build-essential (gcc >= 4.4.7, g++, make)
- curl
- autoconf
- perl (perl-core, perl-IPC-Cmd)
- tar
- unzip
- zip
- python3
- gtest/gmock

Refer to the specific Dockerfile for your distribution under [devops/docker/](devops/docker/) for the complete and up-to-date list of dependencies. See the following example.

#### Example prerequisite install on Ubuntu 24.04
Using the pre-defined [devops/docker/ubuntu-24.04-amd64/Dockerfile](devops/docker/ubuntu-24.04-amd64/Dockerfile) we can simply use the `RUN` commands to install all needed pre-requisites. We also need to run `sudo -i` since many commands require `root`.

```bash
sudo apt-get update
sudo apt-get install -y git cmake build-essential curl libcurl4-openssl-dev libssl-dev uuid-dev libgtest-dev libgmock-dev rapidjson-dev
# login as `root` so we don't have to `sudo` all the time
sudo -i

apt -y update && apt-get -y install software-properties-common
apt -y update && apt-get -y install \
apt-transport-https \
bc \
build-essential \
clang \
clang-tools \
cmake \
curl \
file \
gcovr\
git \
jq \
libasan8 \
libcurl4-openssl-dev \
libgmock-dev \
libgtest-dev \
libssl-dev \
libubsan1 \
ninja-build \
pkg-config \
python3-jsonschema \
rapidjson-dev \
tar \
unzip \
uuid-dev \
wget \
zip

mkdir -p ~/git && cd ~/git

# Clone/Build/Install CMake 3.21.7
git clone https://github.com/Kitware/CMake --recursive -b v3.21.7
cd CMake && ./bootstrap && make -j$(nproc) && make install && hash -r && rm -rf ~/git/CMake

# Clone/Build/Install GTest 1.12.0
git clone https://github.com/google/googletest --recursive -b release-1.12.0
cd googletest && cmake . && cmake --build . --parallel --target install && rm -rf ~/git/googletest

# logout of `root`
exit
```

Verify that CMake is at least version 3.16.0 and gcc is at least version 4.4.7.
Expand Down
Loading
Loading