Skip to content

Commit 3abb1e6

Browse files
committed
Merge branch 'maint-1.3' after 1.3.10 release
2 parents 5a09d76 + 6d00861 commit 3abb1e6

File tree

783 files changed

+26105
-102505
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

783 files changed

+26105
-102505
lines changed

.fmf/version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1

.github/workflows/build.yml

Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: Gating
4+
5+
# Controls when the action will run. Triggers the workflow on push or pull request
6+
# events but only for the main branch
7+
on:
8+
push:
9+
branches: [ '*' ]
10+
pull_request:
11+
branches: [ main, maint-1.3 ]
12+
13+
14+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
15+
jobs:
16+
# This workflow contains a single job called "build"
17+
build-ubuntu:
18+
# The type of runner that the job will run on
19+
name: Build, Test on Ubuntus
20+
runs-on: ${{ matrix.os }}
21+
22+
strategy:
23+
matrix:
24+
os: [ubuntu-20.04, ubuntu-latest]
25+
26+
# Steps represent a sequence of tasks that will be executed as part of the job
27+
steps:
28+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
29+
- uses: actions/checkout@v3
30+
with:
31+
submodules: recursive
32+
33+
# Runs a single command using the runners shell
34+
- name: Install Deps
35+
run: |
36+
sudo apt-get update
37+
sudo apt-get -y install lcov swig xsltproc rpm-common lua5.3 libpcre2-dev libyaml-dev libdbus-1-dev libdbus-glib-1-dev libcurl4-openssl-dev libgcrypt-dev libselinux1-dev libgconf2-dev libacl1-dev libblkid-dev libcap-dev libxml2-dev libxslt1-dev libxml-parser-perl libxml-xpath-perl libperl-dev librpm-dev librtmp-dev libxmlsec1-dev libxmlsec1-openssl python3-dbusmock python3-pytest
38+
sudo apt-get -y remove rpm
39+
40+
# Runs a set of commands using the runners shell
41+
- name: Build
42+
working-directory: ./build
43+
run: |
44+
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_PCRE2=True ../
45+
make all
46+
47+
- name: Test
48+
working-directory: ./build
49+
run: |
50+
export $(dbus-launch)
51+
ctest --output-on-failure
52+
53+
build-fedora:
54+
name: Build, Test on Fedora Latest (Container)
55+
runs-on: ubuntu-latest
56+
container:
57+
image: fedora:latest
58+
steps:
59+
- name: Install Deps
60+
run: dnf install -y cmake git dbus-devel GConf2-devel libacl-devel libblkid-devel libcap-devel libcurl-devel libgcrypt-devel libselinux-devel libxml2-devel libxslt-devel libattr-devel make openldap-devel pcre2-devel perl-XML-Parser perl-XML-XPath perl-devel python3-devel python3-dbusmock rpm-devel swig bzip2-devel gcc-c++ libyaml-devel xmlsec1-devel xmlsec1-openssl-devel hostname bzip2 lua rpm-build which strace python3-pytest
61+
- name: Checkout
62+
uses: actions/checkout@v3
63+
with:
64+
submodules: recursive
65+
- name: Build
66+
working-directory: ./build
67+
run: |
68+
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_PCRE2=True ../
69+
make all
70+
- name: Test
71+
working-directory: ./build
72+
run: |
73+
export $(dbus-launch)
74+
ctest --output-on-failure
75+
76+
build-fedora-nss:
77+
name: Build with NSS, Test on Fedora Latest (Container)
78+
runs-on: ubuntu-latest
79+
container:
80+
image: fedora:latest
81+
steps:
82+
- name: Install Deps
83+
run: dnf install -y cmake git dbus-devel GConf2-devel libacl-devel libblkid-devel libcap-devel libcurl-devel nss-devel libselinux-devel libxml2-devel libxslt-devel libattr-devel make openldap-devel pcre2-devel perl-XML-Parser perl-XML-XPath perl-devel python3-devel python3-dbusmock rpm-devel swig bzip2-devel gcc-c++ libyaml-devel xmlsec1-devel xmlsec1-openssl-devel hostname bzip2 lua rpm-build which strace python3-pytest
84+
- name: Checkout
85+
uses: actions/checkout@v3
86+
with:
87+
submodules: recursive
88+
- name: Build
89+
working-directory: ./build
90+
run: |
91+
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_PCRE2=True -DWITH_CRYPTO=nss ../
92+
make all
93+
- name: Test
94+
working-directory: ./build
95+
run: |
96+
export $(dbus-launch)
97+
ctest --output-on-failure
98+
99+
build-macos:
100+
# The type of runner that the job will run on
101+
name: Build, Test on macOS Latest
102+
runs-on: macos-latest
103+
104+
# Steps represent a sequence of tasks that will be executed as part of the job
105+
steps:
106+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
107+
- uses: actions/checkout@v3
108+
109+
# Runs a single command using the runners shell
110+
- name: Install Deps
111+
run: |
112+
# Unlink and re-link to prevent errors when GitHub Mac runner images
113+
# install Python outside of Brew:
114+
brew list -1 | grep python | while read formula; do brew unlink $formula; brew link --overwrite $formula; done
115+
brew update
116+
brew install doxygen
117+
brew install opendbx
118+
brew install pkg-config
119+
brew install popt
120+
brew install swig
121+
brew install libxmlsec1
122+
brew install openssl
123+
brew install pcre2
124+
125+
# Runs a set of commands using the runners shell
126+
- name: Build
127+
run: |
128+
cd $GITHUB_WORKSPACE/build
129+
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_PCRE2=True -DENABLE_PROBES=False ../
130+
make all
131+
132+
- name: Test
133+
run: |
134+
cd $GITHUB_WORKSPACE/build
135+
echo "Tests are so broken for macOS :("
136+
build-windows:
137+
name: Build on Windows
138+
runs-on: windows-latest
139+
env:
140+
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
141+
steps:
142+
- name: Checkout
143+
uses: actions/checkout@v3
144+
145+
- name: Checkout vcpkg
146+
uses: actions/checkout@v3
147+
with:
148+
path: ${{ github.workspace }}/vcpkg
149+
repository: microsoft/vcpkg
150+
fetch-depth: 1
151+
152+
- name: Bootstrap vcpkg
153+
shell: pwsh
154+
run: "${{ github.workspace }}\\vcpkg\\scripts\\bootstrap.ps1 -disableMetrics"
155+
156+
- name: Export GitHub Actions cache environment variables
157+
uses: actions/github-script@v7
158+
with:
159+
script: |
160+
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
161+
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
162+
163+
- name: Install Deps
164+
run: "${{ github.workspace }}\\vcpkg\\vcpkg.exe install curl libxml2 libxslt bzip2 pcre pthreads zlib getopt-win32 xmlsec --triplet x64-windows"
165+
166+
- name: Configure
167+
working-directory: ./build
168+
run: cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_PYTHON3=FALSE -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake ..
169+
170+
- name: Build
171+
run: cmake --build . --config Release
172+
working-directory: ./build
173+
174+
- name: Package
175+
run: cpack
176+
working-directory: build
177+
178+
- name: Upload Artifacts
179+
uses: actions/upload-artifact@v4
180+
with:
181+
name: openscap-win64
182+
path: |-
183+
build\OpenSCAP*.msi
184+
build\OpenSCAP*.msi.sha512

.github/workflows/codeql.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [ 'maint-1.3', 'maint-1.2', 'master' ]
6+
pull_request:
7+
# The branches below must be a subset of the branches above
8+
branches: [ 'maint-1.3' ]
9+
schedule:
10+
- cron: '32 17 * * 0'
11+
12+
jobs:
13+
analyze:
14+
name: Analyze
15+
runs-on: ubuntu-latest
16+
permissions:
17+
actions: read
18+
contents: read
19+
security-events: write
20+
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
language: [ 'cpp', 'python' ]
25+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
26+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
27+
28+
steps:
29+
- name: Checkout repository
30+
uses: actions/checkout@v3
31+
32+
- name: Install Deps
33+
run: |
34+
sudo apt-get update
35+
sudo apt-get -y install lcov swig xsltproc rpm-common lua5.3 libyaml-dev libdbus-1-dev libdbus-glib-1-dev libcurl4-openssl-dev libgcrypt-dev libselinux1-dev libgconf2-dev libacl1-dev libblkid-dev libcap-dev libxml2-dev libxslt1-dev libxml-parser-perl libxml-xpath-perl libperl-dev librpm-dev librtmp-dev libxmlsec1-dev libxmlsec1-openssl python3-dbusmock
36+
sudo apt-get -y remove rpm
37+
38+
# Initializes the CodeQL tools for scanning.
39+
- name: Initialize CodeQL
40+
uses: github/codeql-action/init@v2
41+
with:
42+
languages: ${{ matrix.language }}
43+
# If you wish to specify custom queries, you can do so here or in a config file.
44+
# By default, queries listed here will override any specified in a config file.
45+
# Prefix the list here with "+" to use these queries and those in the config file.
46+
47+
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
48+
queries: +security-and-quality
49+
50+
- name: Build
51+
working-directory: ./build
52+
run: |
53+
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ../
54+
make all
55+
56+
- name: Perform CodeQL Analysis
57+
uses: github/codeql-action/analyze@v2
58+
with:
59+
category: "/language:${{matrix.language}}"

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ build/
1717
*.a
1818
*.la
1919
.cproject
20+
.idea
2021
.project
2122
.settings/language.settings.xml
2223

@@ -29,3 +30,4 @@ build/
2930
/swig/python3/openscap.py
3031
/swig/python3/openscap_py_wrap.c
3132
/swig/python3/openscap_api.pyc
33+
.vscode/

.packit.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
downstream_package_name: openscap
2+
upstream_package_name: openscap
3+
specfile_path: openscap.spec
4+
5+
actions:
6+
get-current-version:
7+
- bash -c "source release_tools/versions.sh && echo ${version}"
8+
9+
srpm_build_deps:
10+
- bash
11+
12+
jobs:
13+
- job: copr_build
14+
trigger: pull_request
15+
metadata:
16+
targets:
17+
- fedora-all-x86_64
18+
- centos-stream-8-x86_64
19+
- centos-stream-9-x86_64
20+
21+
- job: tests
22+
trigger: pull_request
23+
metadata:
24+
targets:
25+
- fedora-all-x86_64
26+
- centos-stream-8-x86_64
27+
- centos-stream-9-x86_64

.travis.yml

Lines changed: 46 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,56 @@
11
language: c
22

3-
matrix:
4-
include:
5-
- os: linux
6-
dist: bionic
7-
addons:
8-
apt:
9-
packages:
10-
- lcov
11-
- libdbus-1-dev
12-
- libdbus-glib-1-dev
13-
- libcurl4-openssl-dev
14-
- libgcrypt-dev
15-
- libselinux1-dev
16-
- libgconf2-dev
17-
- libacl1-dev
18-
- libblkid-dev
19-
- libcap-dev
20-
- libxml2-dev
21-
- swig
22-
- libxml-parser-perl
23-
- libxml-xpath-perl
24-
- libperl-dev
25-
- librpm-dev
26-
- swig
27-
- librtmp-dev
28-
- xsltproc
29-
- rpm-common
30-
- lua50
31-
before_script:
32-
- cd build
33-
script:
34-
- cmake -DCMAKE_BUILD_TYPE=Debug ../
35-
- build-wrapper-linux-x86-64 --out-dir bw-output make all || make all # build-wrapper won't work on forked repositories.
36-
- ctest --output-on-failure
37-
- (cd .. && sonar-scanner) || true # Will always fail builds on forked repositories.
38-
after_success:
39-
- curl -s https://codecov.io/bash > cov.sh && bash cov.sh -x "$GCOV"
40-
- os: osx
41-
before_install:
42-
- brew update
43-
- brew install doxygen
44-
- brew install opendbx
45-
- brew install popt
46-
- brew install swig
47-
before_script:
48-
- cd build
49-
script:
50-
- cmake -DENABLE_PROBES=false ../
51-
- make -j 4
3+
os: linux
4+
dist: bionic
5+
arch:
6+
- arm64
7+
- ppc64le
8+
- amd64
529

5310
addons:
5411
sonarcloud:
5512
organization: "openscap"
13+
apt:
14+
packages:
15+
- lcov
16+
- libdbus-1-dev
17+
- libdbus-glib-1-dev
18+
- libcurl4-openssl-dev
19+
- libgcrypt-dev
20+
- libselinux1-dev
21+
- libgconf2-dev
22+
- libacl1-dev
23+
- libblkid-dev
24+
- libcap-dev
25+
- libxml2-dev
26+
- swig
27+
- libxml-parser-perl
28+
- libxml-xpath-perl
29+
- libperl-dev
30+
- librpm-dev
31+
- swig
32+
- librtmp-dev
33+
- xsltproc
34+
- rpm-common
35+
- lua50
36+
- libxmlsec1-dev
37+
- libxmlsec1-openssl
5638

5739
cache:
5840
directories:
5941
- '$HOME/.sonar/cache'
42+
43+
before_script:
44+
- cd build
45+
46+
script:
47+
- cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ../
48+
# The build-wrapper tool won't work on forked repositories.
49+
- case ${TRAVIS_CPU_ARCH} in
50+
amd64) build-wrapper-linux-x86-64 --out-dir bw-output make all || make all ;;
51+
arm64) build-wrapper-linux-aarch64 --out-dir bw-output make all || make all ;;
52+
*) make all ;;
53+
esac
54+
- ctest --output-on-failure
55+
# Will always fail builds on forked repositories.
56+
- (cd .. && sonar-scanner) || true

0 commit comments

Comments
 (0)