1
+ # gconf is a legacy system not used any more, and it blocks testing of oscap-anaconda-addon
2
+ # as gconf is no longer part of the installation medium
3
+ %bcond_with gconf
4
+
5
+ # By default do not build perl swig bindings
6
+ %bcond_with perl
7
+
1
8
# This spec file is not synchronized to the Fedora downstream.
2
9
# It serves as Fedora CI configuration and as support for downstream updates.
3
10
Name: openscap
@@ -16,22 +23,46 @@ BuildRequires: pkg-config
16
23
BuildRequires: systemd-rpm-macros
17
24
BuildRequires: gcc
18
25
BuildRequires: gcc-c++
19
- BuildRequires: swig libxml2-devel libxslt-devel perl-generators perl-XML-Parser
20
- BuildRequires: rpm-devel
21
- BuildRequires: libgcrypt-devel
22
- BuildRequires: pcre-devel
23
- BuildRequires: libacl-devel
24
- BuildRequires: libselinux-devel
25
- BuildRequires: libcap-devel
26
- BuildRequires: libblkid-devel
27
- BuildRequires: bzip2-devel
26
+
27
+ # Try to follow CMakeLists.txt order
28
+ BuildRequires: pkgconfig(libacl)
29
+ BuildRequires: pkgconfig(blkid)
30
+ BuildRequires: pkgconfig(libcap)
31
+ BuildRequires: pkgconfig(libcurl)
32
+ BuildRequires: pkgconfig(dbus-1)
33
+ BuildRequires: doxygen
34
+ %if %{with gconf }
35
+ BuildRequires: pkgconfig(glib-2.0)
36
+ BuildRequires: pkgconfig(gobject-2.0)
37
+ BuildRequires: pkgconfig(gconf-2.0)
38
+ %endif
39
+ BuildRequires: pkgconfig(ldap)
40
+ BuildRequires: pkgconfig(opendbx)
41
+ BuildRequires: pkgconfig(libpcre)
42
+ %if %{with perl }
43
+ BuildRequires: perl-devel
44
+ # BuildRequires: perl-generators
45
+ %endif
46
+ BuildRequires: pkgconfig(popt)
47
+ BuildRequires: pkgconfig(libsystemd)
48
+ BuildRequires: pkgconfig(libprocps)
49
+ BuildRequires: pkgconfig(python3)
50
+ BuildRequires: pkgconfig(rpm)
51
+ BuildRequires: pkgconfig(libselinux)
52
+ BuildRequires: swig
53
+ BuildRequires: pkgconfig(libxml-2.0)
54
+ BuildRequires: pkgconfig(libxslt)
55
+ BuildRequires: pkgconfig(xmlsec1)
56
+ BuildRequires: pkgconfig(xmlsec1-openssl)
57
+ BuildRequires: pkgconfig(openssl)
58
+ BuildRequires: pkgconfig(bzip2)
59
+ BuildRequires: pkgconfig(libgcrypt)
60
+ BuildRequires: pkgconfig(yaml-0.1)
28
61
BuildRequires: asciidoc
29
- BuildRequires: openldap-devel
30
- BuildRequires: glib2-devel
31
- BuildRequires: dbus-devel
32
- BuildRequires: libyaml-devel
33
- BuildRequires: xmlsec1-devel xmlsec1-openssl-devel
62
+ BuildRequires: git
63
+ BuildRequires: sed
34
64
BuildRequires: systemd
65
+
35
66
%if %{with check }
36
67
BuildRequires: bzip2
37
68
BuildRequires: chkconfig
@@ -51,19 +82,6 @@ BuildRequires: rpm-build
51
82
BuildRequires: tar
52
83
BuildRequires: tcpdump
53
84
%endif
54
- Requires: bash
55
- Requires: bzip2-libs
56
- Requires: dbus
57
- Requires: glib2
58
- Requires: libacl
59
- Requires: libblkid
60
- Requires: libcap
61
- Requires: libselinux
62
- Requires: openldap
63
- Requires: popt
64
- # Fedora has procps-ng, which provides procps
65
- Requires: procps
66
- Requires: xmlsec1 xmlsec1-openssl
67
85
68
86
%description
69
87
OpenSCAP is a set of open source libraries providing an easier path
@@ -74,9 +92,6 @@ for the expression of Computer Network Defense related information.
74
92
%package devel
75
93
Summary: Development files for %{name }
76
94
Requires: %{name }%{?_isa } = %{epoch }:%{version }-%{release }
77
- Requires: libxml2-devel
78
- Requires: pkgconfig
79
- BuildRequires: doxygen
80
95
81
96
%description devel
82
97
The %{name }-devel package contains libraries and header files for
@@ -85,7 +100,6 @@ developing applications that use %{name}.
85
100
%package python3
86
101
Summary: Python 3 bindings for %{name }
87
102
Requires: %{name }%{?_isa } = %{epoch }:%{version }-%{release }
88
- BuildRequires: python3-devel
89
103
90
104
%description python3
91
105
The %{name }-python3 package contains the bindings so that %{name }
@@ -94,8 +108,6 @@ libraries can be used by python3.
94
108
%package scanner
95
109
Summary: OpenSCAP Scanner Tool (oscap)
96
110
Requires: %{name }%{?_isa } = %{epoch }:%{version }-%{release }
97
- Requires: libcurl >= 7.12.0
98
- BuildRequires: libcurl-devel >= 7.12.0
99
111
100
112
%description scanner
101
113
The %{name }-scanner package contains oscap command-line tool. The oscap
@@ -105,6 +117,7 @@ compliance checking using SCAP content.
105
117
%package utils
106
118
Summary: OpenSCAP Utilities
107
119
Requires: %{name }%{?_isa } = %{epoch }:%{version }-%{release }
120
+ # These not probed from: scap-as-rpm
108
121
Requires: rpmdevtools rpm-build
109
122
Requires: %{name }-scanner%{?_isa } = %{epoch }:%{version }-%{release }
110
123
@@ -126,7 +139,6 @@ commands using a scripting language (Bash, Perl, Python, Ruby, ...).
126
139
Summary: Development files for %{name }-engine-sce
127
140
Requires: %{name }-devel%{?_isa } = %{epoch }:%{version }-%{release }
128
141
Requires: %{name }-engine-sce%{?_isa } = %{epoch }:%{version }-%{release }
129
- Requires: pkgconfig
130
142
131
143
%description engine-sce-devel
132
144
The %{name }-engine-sce-devel package contains libraries and header files
@@ -147,13 +159,15 @@ tar xvzf %{SOURCE1} --directory=yaml-filter --strip-components=1
147
159
148
160
%build
149
161
%undefine __cmake_in_source_build
150
- # gconf is a legacy system not used any more, and it blocks testing of oscap-anaconda-addon
151
- # as gconf is no longer part of the installation medium
152
162
%cmake -G Ninja \
153
- -DENABLE_PERL=OFF \
154
163
-DENABLE_DOCS=ON \
164
+ %if ! %{with gconf }
155
165
-DOPENSCAP_PROBE_UNIX_GCONF=OFF \
156
- -DGCONF_LIBRARY=
166
+ -DGCONF_LIBRARY= \
167
+ %endif
168
+ %if ! %{with perl }
169
+ -DENABLE_PERL=OFF \
170
+ %endif
157
171
158
172
%cmake_build
159
173
make docs
0 commit comments