Skip to content

Commit b050075

Browse files
idryzhovmichalvasko
authored andcommitted
distro UPDATE separate package for YANG modules
Currently, YANG modules are installed as part of the main libyang deb/rpm package. This makes it impossible to install both libyang2 and libyang3 at the same time, because package managers don't allow to simultaneously install packages that provide the same files. As the YANG modules are already embedded into libyang binaries and not needed for libyang operation, we can move them to a separate libyang-modules optional package. It allows to install both libyang2 and libyang3 at the same time. Signed-off-by: Igor Ryzhov <[email protected]>
1 parent 1a35d70 commit b050075

File tree

4 files changed

+17
-1
lines changed

4 files changed

+17
-1
lines changed

distro/pkg/deb/control

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,11 @@ Description: parser toolkit for IETF YANG data modeling - executable tools
6363
during the creation of IETF YANG schemas. The tools are not generally
6464
useful for normal operation where libyang primarily processes configuration
6565
data, not schemas.
66+
67+
Package: libyang-modules
68+
Section: devel
69+
Architecture: all
70+
Description: parser toolkit for IETF YANG data modeling - YANG modules
71+
This package provides the IETF YANG modules used by libyang. These modules
72+
are embedded into libyang so this package is not necessary for libyang
73+
operation.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
usr/share/yang/modules/libyang

distro/pkg/deb/libyang3.install

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
usr/lib/*/*.so.*
2-
usr/share/yang/modules/libyang

distro/pkg/rpm/libyang.spec

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ BuildRequires: cmake(cmocka) >= 1.0.1
1717
BuildRequires: make
1818
BuildRequires: pkgconfig(libpcre2-8) >= 10.21
1919

20+
%package modules
21+
Summary: YANG modules for libyang
22+
2023
%package devel
2124
Summary: Development files for libyang
2225
Requires: %{name}%{?_isa} = %{version}-%{release}
@@ -32,6 +35,9 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
3235
# This was not properly split out before
3336
Conflicts: %{name} < 1.0.225-3
3437

38+
%description modules
39+
YANG modules for libyang.
40+
3541
%description devel
3642
Headers of libyang library.
3743

@@ -92,6 +98,8 @@ mkdir -m0755 -p %{buildroot}/%{_docdir}/libyang
9298
%license LICENSE
9399
%{_libdir}/libyang.so.3
94100
%{_libdir}/libyang.so.3.*
101+
102+
%files modules
95103
%{_datadir}/yang/modules/libyang/*.yang
96104
%dir %{_datadir}/yang/
97105
%dir %{_datadir}/yang/modules/

0 commit comments

Comments
 (0)