Skip to content

Commit f239fd8

Browse files
committed
Use PCRE2 library in CI
Make use of the PCRE2 library (in Fedora CI + PackIt and Ubuntu IC).
1 parent f653e07 commit f239fd8

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ jobs:
3434
- name: Install Deps
3535
run: |
3636
sudo apt-get update
37-
sudo apt-get -y install lcov swig xsltproc rpm-common lua5.3 libyaml-dev libapt-pkg-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
37+
sudo apt-get -y install lcov swig xsltproc rpm-common lua5.3 libpcre2-dev libyaml-dev libapt-pkg-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
3838
sudo apt-get -y remove rpm
3939
4040
# Runs a set of commands using the runners shell
4141
- name: Build
4242
working-directory: ./build
4343
run: |
44-
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ../
44+
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_PCRE2=True ../
4545
make all
4646
4747
- name: Test
@@ -57,15 +57,15 @@ jobs:
5757
image: fedora:latest
5858
steps:
5959
- 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 pcre-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 apt-devel
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 apt-devel
6161
- name: Checkout
6262
uses: actions/checkout@v3
6363
with:
6464
submodules: recursive
6565
- name: Build
6666
working-directory: ./build
6767
run: |
68-
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ../
68+
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_PCRE2=True ../
6969
make all
7070
- name: Test
7171
working-directory: ./build
@@ -97,13 +97,13 @@ jobs:
9797
brew install swig
9898
brew install libxmlsec1
9999
brew install openssl
100-
brew install pcre
100+
brew install pcre2
101101
102102
# Runs a set of commands using the runners shell
103103
- name: Build
104104
run: |
105105
cd $GITHUB_WORKSPACE/build
106-
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_PROBES=false ../
106+
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_PCRE2=True -DENABLE_PROBES=False ../
107107
make all
108108
109109
- name: Test

openscap.spec

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ BuildRequires: apt-devel
1818
%endif
1919
BuildRequires: rpm-devel
2020
BuildRequires: libgcrypt-devel
21+
%if 0%{?fedora}
22+
BuildRequires: pcre2-devel
23+
%else
2124
BuildRequires: pcre-devel
25+
%endif
2226
BuildRequires: libacl-devel
2327
BuildRequires: libselinux-devel
2428
BuildRequires: libcap-devel
@@ -136,6 +140,9 @@ Tool for scanning Atomic containers.
136140
# gconf is a legacy system not used any more, and it blocks testing of oscap-anaconda-addon
137141
# as gconf is no longer part of the installation medium
138142
%cmake \
143+
%if 0%{?fedora}
144+
-DWITH_PCRE2=ON \
145+
%endif
139146
-DENABLE_PERL=OFF \
140147
-DENABLE_DOCS=ON \
141148
-DOPENSCAP_PROBE_UNIX_GCONF=OFF \

0 commit comments

Comments
 (0)