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

libyang3 - fondation step 1 #15608

Merged
merged 2 commits into from May 8, 2024
Merged

libyang3 - fondation step 1 #15608

merged 2 commits into from May 8, 2024

Conversation

vjardin
Copy link
Contributor

@vjardin vjardin commented Mar 23, 2024

Prepare the support for libyang3 ; do not merge it yet.

@vjardin vjardin marked this pull request as draft March 23, 2024 00:42
@vjardin vjardin force-pushed the libyang3 branch 4 times, most recently from 6db0ecb to c68a588 Compare March 23, 2024 08:21
@frrbot frrbot bot added the libfrr label Mar 23, 2024
@vjardin vjardin changed the title WIP - libyang3 libyang3 - fondation step 1 Mar 23, 2024
@vjardin vjardin marked this pull request as ready for review March 23, 2024 14:43
@vjardin
Copy link
Contributor Author

vjardin commented Mar 23, 2024

This pull request is a fondation in order to prepare the followings:

  • enable a libyang+FRR CI on each libyang pull request
  • start using libyang3 whenever possible in order to anticipate issues while libyang2 remains the main version to be used.

Copy link
Contributor

@idryzhov idryzhov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm all in for using libyang3, but I am against all this conditional compilation to support both versions. There's no problem with moving to libyang3 as long as we provide packages in our repositories, as we did when moving to libyang2.

@vjardin
Copy link
Contributor Author

vjardin commented Mar 24, 2024

So does it mean that we are ready to have a d-day that switches the libyang versions ? without any overlapping.

Frankly, I do agree that it would be simpler and it would enforce a quick alignment for the the CIs, distros, etc.

For the packaging of libyang2/3, would you have a good pointer I could start with ?

@idryzhov
Copy link
Contributor

idryzhov commented Mar 24, 2024

That's what we did with libyang2, so I don't think there's any problem with upgrading to libyang3 without keeping compatibility with older versions.

Regarding the packaging, I suppose we should just ask @mwinter-osr and @Jafaral to start packaging libyang3. But I don't see yet the official release of libyang3, so we should probably wait a bit until it's actually released.

@vjardin
Copy link
Contributor Author

vjardin commented Mar 24, 2024

For libyang3, there are some ABI changes, so it cannot be a smooth transition.

I would like to start before libyang3 will be officially released in order for FRR to set some alignments with libyang3.

@mjstapp
Copy link
Contributor

mjstapp commented Mar 25, 2024

Should we consider adding shims for these apis that may/will change in the future? I'd prefer shims to repeated conditional blocks.

For libyang3, there are some ABI changes, so it cannot be a smooth transition.

I would like to start before libyang3 will be officially released in order for FRR to set some alignments with libyang3.

@Jafaral
Copy link
Member

Jafaral commented Mar 26, 2024

This only affects FRR 10.1+, but if it backward compatible with with 10.0, then we can build packages libyang 3 packages and have that available in our package repos. It it doesn't work with 10.0, it is a bit tricky since our stable version is going to be 10.0 for a while, and we can't publish packages to stable if it breaks 10.0.

@idryzhov
Copy link
Contributor

We're already publishing both libyang and libyang2 packages at the same time. What's the difference here? It's new packages named libyang3, libyang3-dev, etc. There shouldn't be any conflicts with 10.0 as it depends on libyang2.

@vjardin
Copy link
Contributor Author

vjardin commented Apr 7, 2024

@idryzhov : enclosed a minimalist changeset based on our discussions and an update of the libyang's.headers.

@riw777 riw777 self-requested a review April 9, 2024 14:10
@vjardin vjardin requested a review from idryzhov April 11, 2024 10:27
@vjardin
Copy link
Contributor Author

vjardin commented Apr 13, 2024

the CI/topotests on master with libyang2.2.8/libyang.so.3 is successful on my local setup.
It means that this patch is OK with both libyang.so.2 and libyang.so.3 (assuming FRR is recompiled respectively).

@vjardin
Copy link
Contributor Author

vjardin commented Apr 14, 2024

notes:

@vjardin
Copy link
Contributor Author

vjardin commented Apr 16, 2024

using the following package, it should not overlap with libyang2, so both libyang3 and libyang2 can be installed:

$ dpkg -c libyang3_2.2.10-1_amd64.deb

drwxr-xr-x root/root         0 2021-05-04 22:20 ./
drwxr-xr-x root/root         0 2021-05-04 22:20 ./usr/
drwxr-xr-x root/root         0 2021-05-04 22:20 ./usr/lib/
drwxr-xr-x root/root         0 2021-05-04 22:20 ./usr/lib/x86_64-linux-gnu/
-rw-r--r-- root/root   1327064 2021-05-04 22:20 ./usr/lib/x86_64-linux-gnu/libyang.so.3.0.10
drwxr-xr-x root/root         0 2021-05-04 22:20 ./usr/share/
drwxr-xr-x root/root         0 2021-05-04 22:20 ./usr/share/doc/
drwxr-xr-x root/root         0 2021-05-04 22:20 ./usr/share/doc/libyang3/
-rw-r--r-- root/root       993 2021-05-04 22:20 ./usr/share/doc/libyang3/README.Debian
-rw-r--r-- root/root       150 2021-05-04 22:20 ./usr/share/doc/libyang3/changelog.Debian.gz
-rw-r--r-- root/root      3862 2021-05-04 22:20 ./usr/share/doc/libyang3/copyright
lrwxrwxrwx root/root         0 2021-05-04 22:20 ./usr/lib/x86_64-linux-gnu/libyang.so.3 -> libyang.so.3.0.10

Copy link
Member

@mwinter-osr mwinter-osr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a testplan for building on the CI:
https://ci1.netdef.org/browse/TESTING-FRRLY3VINCENT

One missing part is the build dependency in debian/control: It should allow libyang2-dev or libyang3-dev.
Current under `Build-Depends" it lists:

libyang2-dev (>= 2.1.80),

Correct should be:

libyang2-dev (>= 2.1.80) | libyang3-dev,

Please fix debian/control

@vjardin
Copy link
Contributor Author

vjardin commented May 3, 2024

Please fix debian/control

done @mwinter-osr

Copy link
Member

@riw777 riw777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@riw777
Copy link
Member

riw777 commented May 7, 2024

one or two line wrap lint suggestions we should probably pull in before merging ...

Let's support libyang 2.2.8 using libyang.so.3.0.8
It requires the commit ed277585ea from the libyang.

Signed-off-by: Vincent Jardin <vjardin@free.fr>
libyang3-dev is required.

TODO: add redhat, snapcraft

Suggested-by: Martin Winter <mwinter@opensourcerouting.org>
Signed-off-by: Vincent Jardin <vjardin@free.fr>
@vjardin
Copy link
Contributor Author

vjardin commented May 8, 2024

one or two line wrap lint suggestions we should probably pull in before merging ...

done @riw777

@mwinter-osr mwinter-osr merged commit 8e2b2ca into FRRouting:master May 8, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants