Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

distro UPDATE separate package for YANG modules #2209

Merged
merged 1 commit into from
Apr 3, 2024

Conversation

idryzhov
Copy link
Contributor

@idryzhov idryzhov commented Mar 27, 2024

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-data optional package. It allows to install both libyang2 and libyang3 at the same time.

P.S. Another option is to install YANG modules as part of libyang-dev package. Please, let me know if you think it's a better option and I'll update my PR accordingly.

@michalvasko
Copy link
Member

I do not like the idea of another separate package much. Moving it to the libyang-dev package is one option, acceptable for me. Another solution would be to rename the YANG module directory simply to libyang3. What do you think about that? I do not have a strong preference for this compared to your suggestion.

@idryzhov
Copy link
Contributor Author

idryzhov commented Mar 28, 2024

Actually I realized that putting the models into the dev package will not work. It will conflict with libyang2, as libyang2 already provides the models and we can't change that retroactively. And we need to be able to install libyang2 + libyang3 + libyang-dev at the same time.

Your idea of putting them into another directory for libyang3 should work. But the reason I decided to use separate packages is because the models are not really required for libyang operation. I'm not even sure why does libyang install the models at all, maybe you can clarify that?

@idryzhov
Copy link
Contributor Author

idryzhov commented Apr 1, 2024

Hi @michalvasko, do you have any comment? We need to sort this out before the first release of libyang3, otherwise we'll have huge problems. Basically, we won't be able to install it on any system that already has a package that requires libyang2.

@jktjkt
Copy link
Contributor

jktjkt commented Apr 1, 2024

While I recognize that some people are using libyang without sysrepo, I think that in the majority of deployments it will be libyang+sysrepo+netopeer2. Unless I'm mistaken, it is not possible to mix two different sysrpeo versions, so the odds of someone having libyang v2 and v3 at the same time and their systems still working are rather slim. Perhaps a simple package-level blocker might be enough?

@idryzhov
Copy link
Contributor Author

idryzhov commented Apr 2, 2024

https://github.com/FRRouting/frr is using libyang and it's a pretty popular package. People may be using older versions of FRR which uses libyang2 on the same system with newer sysrepo which uses libyang3. It will work properly as libyang2/3 have different major SO versions. I don't see any reason to prohibit that.

If you're ok with accepting the solution of putting the model files into a different directory then I'll update my PR. Removing this conflict between the packages is more important for me than having the models in a separate package. I just thought that a separate package is a more clear solution.

distro/pkg/deb/control Outdated Show resolved Hide resolved
@michalvasko
Copy link
Member

Okay, after some consideration I am fine with having a separate package. You are right that they are not needed for libyang, they are being installed mostly to follow all the other projects that install their YANG modules and can be useful for other applications based on YANG.

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 <iryzhov@nfware.com>
@idryzhov
Copy link
Contributor Author

idryzhov commented Apr 2, 2024

Updated the package name to libyang-modules.

@michalvasko
Copy link
Member

Alright, merging.

@michalvasko michalvasko merged commit b050075 into CESNET:devel Apr 3, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants