FRRouting / frr

The FRRouting Protocol Suite
https://frrouting.org/
Other
3.33k stars 1.25k forks source link

FRR Package misses libyang2 version requirement #15372

Open mwinter-osr opened 8 months ago

mwinter-osr commented 8 months ago

Found in FRR Master @d5bec7b (Feb 13, 2024)

While upgrading FRR from 8.5.4 with standard Debian Libyang2 2.1.30 the upgrade worked, but trying to go into vtysh gives the following error:

# vtysh
vtysh: symbol lookup error: /usr/lib/x86_64-linux-gnu/frr/libfrr.so.0: undefined symbol: ly_strvecode

The issue is that during the upgrade the libyang2 wasn't forced to be upgraded and 2.1.30 is too low for the current FRR.

Not sure yet, why this happens as the debian/control file requires 2.1.80 (It lists in build-depends libyang2 >= 2.1.80), but the resulting package doesn't have the version requirement as seen with a dpkg -I (see depends section):

# dpkg -I frr_10.1-dev-master-gd5bec7b-20240213.191845-1~deb12u1_amd64.deb 
 new Debian package, version 2.0.
 size 4442088 bytes: control archive=6920 bytes.
     207 bytes,     9 lines      conffiles            
    1511 bytes,    28 lines      control              
    7292 bytes,   111 lines      md5sums              
    4159 bytes,   130 lines   *  postinst             #!/bin/sh
     777 bytes,    29 lines   *  postrm               #!/bin/sh
    3228 bytes,    99 lines   *  preinst              #!/bin/bash
     217 bytes,     7 lines   *  prerm                #!/bin/sh
      77 bytes,     4 lines      shlibs               
 Package: frr
 Version: 10.1-dev-master-gd5bec7b-20240213.191845-1~deb12u1
 Architecture: amd64
 Maintainer: David Lamparter <equinox-debian@diac24.net>
 Installed-Size: 23515
 Pre-Depends: adduser
 Depends: iproute2, logrotate (>= 3.2-11), lsof, libc-ares2 (>= 1.7.0), libc6 (>= 2.34), libcap2 (>= 1:2.10), libcrypt1 (>= 1:4.1.0), libjson-c5 (>= 0.15), liblua5.3-0, libpam0g (>= 0.99.7.1), libprotobuf-c1 (>= 1.0.1), libreadline8 (>= 7.0~rc1), libyang2
 Recommends: frr-pythontools
 Suggests: frr-doc
 Conflicts: pimd, quagga, quagga-bgpd, quagga-core, quagga-isisd, quagga-ospf6d, quagga-ospfd, quagga-pimd, quagga-ripd, quagga-ripngd, zebra, zebra-pj
 Replaces: zebra, zebra-pj
 Section: net
 Priority: optional
 Homepage: https://www.frrouting.org/
 Description: FRRouting suite of internet protocols (BGP, OSPF, IS-IS, ...)
  FRRouting implements the routing protocols commonly used in the
  internet and private networks to exchange information between routers.
  Both IP and IPv6 are supported, as are BGP, OSPFv2, OSPFv3, IS-IS, BABEL,
  EIGRP, RIP, RIPng, LDP, BFD, PIM, VRRP, PBR, and NHRP.
  .
  These protocols are used to turn your system into a dynamic router,
  exchanging information about available connections with other routers
  in a standards-compliant way.  The actual packet forwarding
  functionality is provided by the OS kernel.
  .
  FRRouting is a fork of Quagga with an open community model. The main
  git lives on https://github.com/frrouting/frr.git and the project name
  is commonly abbreviated as "FRR."
idryzhov commented 8 months ago

I checked on my system and it works fine, the version is restricted for libyang2.

 Depends: iproute2, logrotate (>= 3.2-11), lsof, libc-ares2 (>= 1.7.0), libc6 (>= 2.29), libcap2 (>= 1:2.10), libcrypt1 (>= 1:4.1.0), libjson-c4 (>= 0.13.1), libpam0g (>= 0.99.7.1), libprotobuf-c1 (>= 1.0.1), libreadline8 (>= 7.0~rc1), libunwind8, libyang2 (>= 2.1.128-1)

I suppose it's something with the system where the package is being built.

donaldsharp commented 8 months ago

On mine when I built the packaging, without my change it would just specify that it needed libyang2. With my change it now requires 2.1.128 at a minimum

idryzhov commented 8 months ago

Do you use libyang packages provided from FRR deb repo? There's apparently some problem with these packages, probably with the way they are built. I just checked, and when I am using these packages, I have the same problem with missing version restriction. If I build libyang packages myself, using apkg build -i, and then build FRR - version restriction is there.

idryzhov commented 8 months ago

@ton31337 why did you close this as completed? There's an actual problem with libyang packages provided in FRR deb repo, which prevents ${shlibs:Depends} from working properly. Was it solved?

mwinter-osr commented 6 months ago

Issue found. This is an error in the libyang packages built by the CI which dropped the symbols.

D13410N3 commented 3 months ago

@mwinter-osr Hello, is there any information about fix? 8.5.5-0~deb11u1 is affected

mwinter-osr commented 3 months ago

This should have been fixed. I'll investigate.

mwinter-osr commented 3 months ago

This looks fixed to me. See below

Note the libyang2 (>= 2.1.128-2~deb11u1) in the Depends - it shows a min version.

Can you verify if your package has the same version requirement with dpkg -I ? If it shows this, then please explain what symptom you see, as this looks correct to me.

$ dpkg -I frr_8.5.5-0~deb11u1_amd64.deb 
 new Debian package, version 2.0.
 size 4059652 bytes: control archive=6668 bytes.
     207 bytes,     9 lines      conffiles            
    1459 bytes,    28 lines      control              
    6761 bytes,   103 lines      md5sums              
    4165 bytes,   130 lines   *  postinst             #!/bin/sh
     844 bytes,    33 lines   *  postrm               #!/bin/sh
    3022 bytes,    94 lines   *  preinst              #!/bin/bash
     188 bytes,     7 lines   *  prerm                #!/bin/sh
      57 bytes,     3 lines      shlibs               
 Package: frr
 Version: 8.5.5-0~deb11u1
 Architecture: amd64
 Maintainer: David Lamparter <equinox-debian@diac24.net>
 Installed-Size: 21488
 Pre-Depends: adduser
 Depends: iproute2, logrotate (>= 3.2-11), lsof, libc-ares2 (>= 1.7.0), libc6 (>= 2.29), libcap2 (>= 1:2.10), libcrypt1 (>= 1:4.1.0), libjson-c5 (>= 0.15), libpam0g (>= 0.99.7.1), libreadline8 (>= 7.0~rc1), libyang2 (>= 2.1.128-2~deb11u1)
 Recommends: frr-pythontools
 Suggests: frr-doc
 Conflicts: pimd, quagga, quagga-bgpd, quagga-core, quagga-isisd, quagga-ospf6d, quagga-ospfd, quagga-pimd, quagga-ripd, quagga-ripngd, zebra, zebra-pj
 Replaces: zebra, zebra-pj
 Section: net
 Priority: optional
 Homepage: https://www.frrouting.org/
 Description: FRRouting suite of internet protocols (BGP, OSPF, IS-IS, ...)
  FRRouting implements the routing protocols commonly used in the
  internet and private networks to exchange information between routers.
  Both IP and IPv6 are supported, as are BGP, OSPFv2, OSPFv3, IS-IS, BABEL,
  EIGRP, RIP, RIPng, LDP, BFD, PIM, VRRP, PBR, and NHRP.
  .
  These protocols are used to turn your system into a dynamic router,
  exchanging information about available connections with other routers
  in a standards-compliant way.  The actual packet forwarding
  functionality is provided by the OS kernel.
  .
  FRRouting is a fork of Quagga with an open community model. The main
  git lives on https://github.com/frrouting/frr.git and the project name
  is commonly abbreviated as "FRR."
D13410N3 commented 3 months ago

@mwinter-osr sorry for bothering you, my bad. In my case all frr dependencies are correct, but there is no libyang2 (>= 2.1.128-2~deb11u1) in common repos. Thank you for your response

mwinter-osr commented 3 months ago

We found the issue. The FRR-8 repo doesn't contain the 2.1.128 libyang. Give us 1..2 days to fix this. We either need to rebuild FRR 8.4.5 and FRR 8.5.5 against libyang 2.1.80 or add libyang 2.1.128 to the repo for FRR 8.x

tobias-urdin commented 3 months ago

Any update on fixing the FRR-8 repo?