summaryrefslogtreecommitdiff
path: root/libyang.spec
blob: b6e10348954563d364c3e5d4b059fdbc22123954 (plain)
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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
%global run_valgrind_tests ON
# valgrind finds invalid writes in libcmocka on arm and power
# see bug #1699304 for more information
%ifarch %{arm} ppc64le
%global run_valgrind_tests OFF
%endif
# Turn off valgrind unilaterally on all arches which don't have
# valgrind at all, like riscv64.
%ifnarch %{valgrind_arches}
%global run_valgrind_tests OFF
%endif

Name: libyang
Version: 2.1.148
Release: 1%{?dist}
Summary: YANG data modeling language library
Url: https://github.com/CESNET/libyang
Source: %{url}/archive/v%{version}.tar.gz
License: BSD-3-Clause

# disable tests failing on s390x
Patch1: disable-test_structure.patch

BuildRequires:  cmake
BuildRequires:  doxygen
BuildRequires:  gcc
BuildRequires:  cmake(cmocka) >= 1.0.0
BuildRequires:  make
BuildRequires:  pkgconfig(libpcre2-8) >= 10.21
%ifarch %{valgrind_arches}
BuildRequires:  valgrind
%endif

Conflicts:      %{name} < 1.0.225-3

%package devel
Summary:    Development files for libyang
Requires:   %{name}%{?_isa} = %{version}-%{release}
Requires:   pcre2-devel

%package devel-doc
Summary:    Documentation of libyang API
Requires:   %{name}%{?_isa} = %{version}-%{release}

%package tools
Summary:        YANG validator tools
Requires:       %{name}%{?_isa} = %{version}-%{release}
# This was not properly split out before
Conflicts:      %{name} < 1.0.225-3 

%description devel
Headers of libyang library.

%description devel-doc
Documentation of libyang API.

%description tools
YANG validator tools.

%description
Libyang is YANG data modeling language parser and toolkit
written (and providing API) in C.

%prep
%autosetup -p1

%build
mkdir build && cd build
%cmake \
   -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
   -DCMAKE_BUILD_TYPE=RELWITHDEBINFO \
   -DENABLE_LYD_PRIV=ON \
   -DENABLE_VALGRIND_TESTS=%{run_valgrind_tests} ..
%make_build
%make_build doc

%check
ctest --output-on-failure -V %{?_smp_mflags}

%install
cd build
%make_install
cd ..

mkdir -m0755 -p %{buildroot}/%{_docdir}/libyang
cp -a doc/html %{buildroot}/%{_docdir}/libyang/html

%files
%license LICENSE
%{_libdir}/libyang.so.2
%{_libdir}/libyang.so.2.*
%{_datadir}/yang/modules/libyang/*.yang
%dir %{_datadir}/yang/
%dir %{_datadir}/yang/modules/
%dir %{_datadir}/yang/modules/libyang/

%files tools
%{_bindir}/yanglint
%{_bindir}/yangre
%{_datadir}/man/man1/yanglint.1.gz
%{_datadir}/man/man1/yangre.1.gz

%files devel
%{_libdir}/libyang.so
%{_libdir}/pkgconfig/libyang.pc
%{_includedir}/libyang/*.h
%dir %{_includedir}/libyang/

%files devel-doc
%{_docdir}/libyang

%changelog
* Wed Apr 03 2024 Tomas Korbar <tkorbar@redhat.com> - 2.1.148-1
- Rebase to version 2.1.148
- Resolves: rhbz#2232832

* Sat Mar 02 2024 David Abdurachmanov <davidlt@rivosinc.com> - 2.1.80-5
- Properly check valgrind arches

* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.80-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.80-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.80-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

* Tue May 23 2023 Tomas Korbar <tkorbar@redhat.com> - 2.1.80-1
- Rebase to version 2.1.80
- Resolves: rhbz#2209212

* Sun Mar 19 2023 Tomas Korbar <tkorbar@redhat.com> - 2.1.55-1
- Rebase to version 2.1.55
- Resolves: rhbz#2179481

* Fri Mar 10 2023 Tomas Korbar <tkorbar@redhat.com> - 2.1.30-2
- Change the License tag to the SPDX format

* Thu Jan 19 2023 Tomas Korbar <tkorbar@redhat.com> - 2.1.30-1
- Rebase to version 2.1.30
- Resolves: rhbz#2162362

* Wed Nov 09 2022 Jakub Ružička <jakub.ruzicka@nic.cz> - 2.1.4-1
- Rebase to version 2.1.4 (Resolves: rhbz#2141228)
- Add patch to disable tests failing on s390x

* Mon Aug 01 2022 Tomas Korbar <tkorbar@redhat.com> - 2.0.231-2
- Clean specfile and remove obsolete tag that is not relevant

* Wed Jul 27 2022 Jakub Ružička <jakub.ruzicka@nic.cz> - 2.0.231-1
- Rebase to version 2.0.231 (Resolves: rhbz#2111304)
- Own yang modules (Resolves: rhbz#2094371)
- Use proper CMAKE_BUILD_TYPE

* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.194-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

* Mon May 09 2022 Tomas Korbar <tkorbar@redhat.com> - 2.0.194-1
- Rebase to version 2.0.194
- Resolves: rhbz#2082735

* Tue Mar 15 2022 Jakub Ružička <jakub.ruzicka@nic.cz> - 2.0.164-1
- Rebase to version 2.0.164

* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.112-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

* Wed Jan 19 2022 Tomas Korbar <tkorbar@redhat.com> - 2.0.112-2
- Fix building of libyang 2 on fedora 34

* Tue Nov 30 2021 Tomas Korbar <tkorbar@redhat.com> - 2.0.112-1
- Rebase to version 2.0.112
- Resolves: rhbz#2022586

* Mon Oct 11 2021 Tomas Korbar <tkorbar@redhat.com> - 2.0.97-1
- Rebase to version 2.0.97
- Resolves: rhbz#2012348

* Thu Sep 30 2021 Tomas Korbar <tkorbar@redhat.com> - 2.0.88-1
- Rebase to version 2.0.88
- Resolves: rhbz#2007673

* Fri Aug 06 2021 Tomas Korbar <tkorbar@redhat.com> - 2.0.7-1
- Rebase to version 2.0.7
- Resolves: rhbz#1959645

* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.225-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

* Sat Jul 10 2021 Neal Gompa <ngompa@datto.com> - 1.0.225-3
- Clean up the spec file for legibility and modern spec standards
- Split out tools into their own subpackage
- Remove archfulness from the build path to fix documentation build

* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1.0.225-2
- Rebuilt for Python 3.10

* Tue Mar 09 2021 Tomas Korbar <tkorbar@redhat.com> - 1.0.225-1
- Rebase to version 1.0.225
- Resolves: rhbz#1936718

* Wed Feb 03 2021 Tomas Korbar <tkorbar@redhat.com> - 1.0.215-1
- Rebase to version 1.0.215
- Resolves: rhbz#1921779

* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.184-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

* Wed Sep 02 2020 Merlin Mathesius <mmathesi@redhat.com> - 1.0.184-3
- Fix FTBFS by disabling valgrind on power since it finds bogus invalid
  writes in libcmocka

* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.184-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

* Wed Jul 22 2020 Tomas Korbar <tkorbar@redhat.com> - 1.0.184-1
- Update to 1.0.184
- Fix build

* Fri Jun 19 2020 Tomas Korbar <tkorbar@redhat.com> - 1.0.176-1
- Update to 1.0.176

* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.0.167-2
- Rebuilt for Python 3.9

* Mon May 18 2020 Tomas Korbar <tkorbar@redhat.com> - 1.0.167-1
- Update to 1.0.167

* Fri Feb 07 2020 Tomas Korbar <tkorbar@redhat.com> - 1.0.130-1
- Rebase to version 1.0.130 (#1797495)

* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.101-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

* Mon Dec 09 2019 Tomas Korbar <tkorbar@redhat.com> - 1.0.101-1
- Rebase to version 1.0.101
- Fix CVE-2019-19333 (#1780495)
- Fix CVE-2019-19334 (#1780494)

* Fri Oct 25 2019 Tomas Korbar <tkorbar@redhat.com> - 1.0.73-1
- Rebase to version 1.0.73 (#1758512)

* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.16.105-4
- Rebuilt for Python 3.8.0rc1 (#1748018)

* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.16.105-3
- Rebuilt for Python 3.8

* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.16.105-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

* Tue May 07 2019 Tomas Korbar <tkorbar@redhat.com> - 0.16.105-1
- Initial import (#1699846).

* Fri Apr 26 2019 Tomas Korbar <tkorbar@redhat.com> - 0.16.105-1
- Change specfile accordingly to mosvald's review
- Remove obsolete ldconfig scriptlets
- libyang-devel-doc changed to noarch package
- Add python_provide macro to python3-libyang subpackage
- Remove obsolete Requires from libyang-cpp-devel
- Start using cmake with smp_mflags macro

* Wed Apr 03 2019 Tomas Korbar <tkorbar@redhat.com> - 0.16.105-1
- Initial commit of package after editation of specfile