forked from rpminspect/rpminspect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rpminspect.spec.in
194 lines (159 loc) · 5.71 KB
/
rpminspect.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
Name: rpminspect
Version: %%VERSION%%
Release: 1%{?dist}
Summary: Build deviation analysis and compliance tool
Group: Development/Tools
# librpminspect is licensed under the LGPL-3.0-or-later, and:
# * 5 source files in the library are from an Apache-2.0 licensed
# project
# * Some code in inspect_unicode.c was taken from a blog post about
# using icu4c and Unicode, it is under the MIT license.
#
# The rpminspect(1) command line tool is licensed under the
# GPL-3.0-or-later.
#
# The rpminspect-data-generic package is licensed under the
# CC-BY-4.0 license.
#
# Not packaged, but in the source:
# * include/uthash.h is BSD-1-Clause
# * include/compat/queue.h is BSD-3-Clause
# * libxdiff/ is LGPL-2.1-or-later
License: GPL-3.0-or-later AND LGPL-3.0-or-later AND LGPL-2.1-or-later AND Apache-2.0 AND MIT AND AND BSD-1-Clause AND BSD-2-Clause AND BSD-3-Clause AND CC-BY-4.0
URL: https://github.com/rpminspect/rpminspect
Source0: https://github.com/rpminspect/rpminspect/releases/download/v%{version}/%{name}-%{version}.tar.xz
Source1: https://github.com/rpminspect/rpminspect/releases/download/v%{version}/%{name}-%{version}.tar.xz.asc
Source2: %%GPGKEYRING%%
Requires: librpminspect%{?_isa} = %{version}-%{release}
BuildRequires: meson
BuildRequires: ninja-build
BuildRequires: gcc
BuildRequires: glibc-devel
BuildRequires: json-c-devel
BuildRequires: xmlrpc-c-devel >= 1.32.5
BuildRequires: libxml2-devel
BuildRequires: rpm-devel
BuildRequires: libarchive-devel
BuildRequires: elfutils-devel
BuildRequires: kmod-devel
BuildRequires: libcurl-devel
BuildRequires: zlib-devel
BuildRequires: libyaml-devel
BuildRequires: file-devel
BuildRequires: openssl-devel
BuildRequires: libcap-devel
BuildRequires: gettext-devel
BuildRequires: clamav-devel
BuildRequires: libmandoc-devel >= 1.14.5
BuildRequires: gnupg2
BuildRequires: libicu-devel
BuildRequires: libcdson-devel
%description
Build deviation and compliance tool. This program runs a number of tests
against one or two builds of source RPM files. The built artifacts are
inspected and compared to report changes and validate policy compliance
against the defined parameters.
%package -n librpminspect
Summary: Library providing RPM test API and functionality
Group: Development/Tools
Requires: desktop-file-utils
Requires: gettext
%if 0%{?rhel} >= 8 || 0%{?epel} >= 8 || 0%{?fedora}
Recommends: /usr/bin/annocheck
%else
Requires: /usr/bin/annocheck
%endif
# The clamav data is required for the virus inspection. Either
# install the clamav-data or download the data files directly.
%if 0%{?rhel} >= 8 || 0%{?epel} >= 8 || 0%{?fedora}
Recommends: clamav-data
%else
Requires: clamav-data
%endif
# If these are present, the xml inspection can try DTD validation.
%if 0%{?rhel} >= 8 || 0%{?fedora}
Recommends: xhtml1-dtds
Recommends: html401-dtds
%endif
# Required to support things like %%autorelease in spec files
%if 0%{?fedora} >= 33
Recommends: rpm_macro(autorelease)
%endif
# These programs are only required for the 'shellsyntax' functionality.
# You can use rpminspect without these installed, just disable the
# shellsyntax inspection.
%if 0%{?rhel} >= 8 || 0%{?epel} >= 8 || 0%{?fedora}
Recommends: dash
Recommends: ksh
Recommends: zsh
Recommends: tcsh
Recommends: rc
Recommends: bash
%else
Requires: dash
Requires: ksh
Requires: zsh
Requires: tcsh
Requires: rc
Requires: bash
%endif
# The abidiff and kmidiff inspections require a external executable by
# the same name, as provided by libabigail. If it is not present on
# the system, you can disable the relevant inspections.
%if 0%{?rhel} >= 8 || 0%{?epel} >= 8 || 0%{?fedora}
Recommends: libabigail >= 2.3
%else
Requires: libabigail >= 2.3
%endif
# The udevrules inspection requires an external executable (udevadm verify)
# provided by systemd-udev. If the installed udevadm executable does not
# provide 'verify' command, the udevrules inspection is skipped.
%if 0%{?rhel} >= 8 || 0%{?epel} >= 8 || 0%{?fedora}
Recommends: systemd-udev
%else
Requires: systemd-udev
%endif
%description -n librpminspect
The library providing the backend test functionality and API for the
rpminspect frontend program. This library can also be used by other
programs wanting to incorporate RPM test functionality.
%package -n librpminspect-devel
Summary: Header files and development libraries for librpminspect
Group: Development/Tools
Requires: librpminspect%{?_isa} = %{version}-%{release}
%description -n librpminspect-devel
The header files and development library links required to build software
using librpminspect.
%package -n rpminspect-data-generic
Summary: Template data files used to drive rpminspect tests
Group: Development/Tools
%description -n rpminspect-data-generic
The rpminspect-data-generic package is meant as a template to build your
product's own data file. The files in it contain product-specific
information. The files in this package explain how to construct the
control files.
%prep
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
%autosetup
%build
%meson -Dtests=false
%meson_build
%install
%meson_install
%find_lang %{name}
%files -f %{name}.lang
%doc AUTHORS.md CHANGES.md README.md TODO
%license COPYING
%{_bindir}/rpminspect
%{_mandir}/man1/rpminspect.1*
%files -n librpminspect
%license COPYING.LIB LICENSE-2.0.txt MIT.txt
%{_libdir}/librpminspect.so.*
%files -n librpminspect-devel
%license COPYING.LIB
%{_includedir}/librpminspect
%{_libdir}/librpminspect.so
%files -n rpminspect-data-generic
%license CC-BY-4.0.txt
%{_datadir}/rpminspect
%changelog