diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0f9abed --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/v2.0.7.tar.gz diff --git a/.libyang.metadata b/.libyang.metadata new file mode 100644 index 0000000..512cf04 --- /dev/null +++ b/.libyang.metadata @@ -0,0 +1 @@ +3882fb9a6e40f1a6bdfbce21546ff8aec3f6144c SOURCES/v2.0.7.tar.gz diff --git a/SPECS/libyang.spec b/SPECS/libyang.spec new file mode 100644 index 0000000..9eb2bbd --- /dev/null +++ b/SPECS/libyang.spec @@ -0,0 +1,178 @@ +# valgrind finds invalid writes in libcmocka on arm and power +# see bug #1699304 for more information +%ifarch %arm ppc64le +%global run_valgrind_tests OFF +%else +%global run_valgrind_tests ON +%endif + +Name: libyang +Version: 2.0.7 +Release: 1%{?dist} +Summary: YANG data modeling language library +Url: https://github.com/CESNET/libyang +Source: %{url}/archive/v%{version}.tar.gz +License: BSD + +BuildRequires: cmake +BuildRequires: doxygen +BuildRequires: pcre2-devel +BuildRequires: gcc +BuildRequires: valgrind +BuildRequires: gcc-c++ +BuildRequires: swig >= 3.0.12 +BuildRequires: libcmocka-devel +BuildRequires: python3-devel +BuildRequires: flex +BuildRequires: bison +BuildRequires: graphviz +BuildRequires: make +BuildRequires: git-core + +%package devel +Summary: Development files for libyang +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: pcre-devel + +%package devel-doc +Summary: Documentation of libyang API +Requires: %{name} = %{version}-%{release} + +%description devel +Headers of libyang library. + +%description devel-doc +Documentation of libyang API. + +%description +Libyang is YANG data modeling language parser and toolkit +written (and providing API) in C. + +%prep +%autosetup -S git + +%build +%cmake \ + -DCMAKE_INSTALL_PREFIX:PATH=/usr \ + -DCMAKE_BUILD_TYPE:String="Package" \ + -DENABLE_LYD_PRIV=ON \ + -DGEN_JAVA_BINDINGS=OFF \ + -DGEN_JAVASCRIPT_BINDINGS=OFF \ + -DGEN_LANGUAGE_BINDINGS=ON \ + -DENABLE_VALGRIND_TESTS=%{run_valgrind_tests} .. +%cmake_build +mkdir build +cp ./src/libyang.h ./build/libyang.h +pushd %_target_platform +make doc +popd + +%check +pushd %_target_platform +ctest --output-on-failure -V %{?_smp_mflags} +popd + +%install +%cmake_install +mkdir -m0755 -p %{buildroot}/%{_docdir}/libyang +cp -r doc/html %{buildroot}/%{_docdir}/libyang/html + +%files +%license LICENSE +%{_bindir}/yanglint +%{_bindir}/yangre +%{_datadir}/man/man1/yanglint.1.gz +%{_libdir}/libyang.so.2 +%{_libdir}/libyang.so.2.* + +%files devel +%{_libdir}/libyang.so +%{_libdir}/pkgconfig/libyang.pc +%{_includedir}/libyang/*.h +%dir %{_includedir}/libyang/ + +%files devel-doc +%{_docdir}/libyang + +%changelog +* Tue Aug 10 2021 Michal Ruprich - 2.0.7-1 +- Resolves: #1991915 - Rebase libyang to new version + +* Mon Aug 09 2021 Mohan Boddu - 1.0.225-4 +- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags + Related: rhbz#1991688 + +* Wed Jun 30 2021 Michal Ruprich - 1.0.225-3 +- Resolves: #1965253 - CVE-2021-28902 libyang: NULL pointer dereference in read_yin_container() +- Resolves: #1965255 - CVE-2021-28903 libyang: recursive call to lyxml_parse_mem() lead to crash + +* Fri Apr 16 2021 Mohan Boddu - 1.0.225-2 +- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 + +* Tue Mar 09 2021 Tomas Korbar - 1.0.225-1 +- Rebase to version 1.0.225 +- Resolves: rhbz#1936718 + +* Wed Feb 03 2021 Tomas Korbar - 1.0.215-1 +- Rebase to version 1.0.215 +- Resolves: rhbz#1921779 + +* Tue Jan 26 2021 Fedora Release Engineering - 1.0.184-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Sep 02 2020 Merlin Mathesius - 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 - 1.0.184-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Wed Jul 22 2020 Tomas Korbar - 1.0.184-1 +- Update to 1.0.184 +- Fix build + +* Fri Jun 19 2020 Tomas Korbar - 1.0.176-1 +- Update to 1.0.176 + +* Tue May 26 2020 Miro Hrončok - 1.0.167-2 +- Rebuilt for Python 3.9 + +* Mon May 18 2020 Tomas Korbar - 1.0.167-1 +- Update to 1.0.167 + +* Fri Feb 07 2020 Tomas Korbar - 1.0.130-1 +- Rebase to version 1.0.130 (#1797495) + +* Wed Jan 29 2020 Fedora Release Engineering - 1.0.101-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Mon Dec 09 2019 Tomas Korbar - 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 - 1.0.73-1 +- Rebase to version 1.0.73 (#1758512) + +* Thu Oct 03 2019 Miro Hrončok - 0.16.105-4 +- Rebuilt for Python 3.8.0rc1 (#1748018) + +* Mon Aug 19 2019 Miro Hrončok - 0.16.105-3 +- Rebuilt for Python 3.8 + +* Thu Jul 25 2019 Fedora Release Engineering - 0.16.105-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Tue May 07 2019 Tomas Korbar - 0.16.105-1 +- Initial import (#1699846). + +* Fri Apr 26 2019 Tomas Korbar - 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 - 0.16.105-1 +- Initial commit of package after editation of specfile