Skip to content

frr: add libcrypt-compat dependency for glibc builds - #30650

Open
micpf wants to merge 3 commits into
openwrt:masterfrom
micpf:frr-libcrypt-compat-glibc
Open

micpf wants to merge 3 commits into
openwrt:masterfrom
micpf:frr-libcrypt-compat-glibc

Conversation

@micpf

@micpf micpf commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Maintainer notice

Maintainer: @openwrt frr maintainers

Description

frr links against libcrypt (crypt(3)). On musl this symbol lives in libc itself, but glibc ships it in a separate libcrypt.so.1, so the package fails the library dependency check on glibc targets:

Package frr is missing dependencies for the following libraries:
libcrypt.so.1

This adds the conditional +USE_GLIBC:libcrypt-compat dependency, matching the convention already used by other packages that call crypt(3) (perl, python3, stress-ng, screen, dante, ...). It is a no-op on musl builds.

PKG_RELEASE is bumped accordingly.

Testing

Built frr on a glibc target (powerpc64/e5500) — the missing-dependency error is gone and the package installs libcrypt-compat as a runtime dependency. No change on musl builds.

frr links against libcrypt (crypt(3)). On musl this symbol lives in
libc itself, but glibc ships it in a separate libcrypt.so.1, so the
package fails the library dependency check on glibc targets:

    Package frr is missing dependencies for the following libraries:
    libcrypt.so.1

Add the conditional +USE_GLIBC:libcrypt-compat dependency, matching
the convention already used by other packages that call crypt(3)
(perl, python3, stress-ng, screen, dante, ...). This is a no-op on
musl builds.

Signed-off-by: Michael Pfeifroth <micpf@westermo.com>
@BKPepe

BKPepe commented Sep 29, 2026

Copy link
Copy Markdown
Member
frr-zebra: [fail] Library /usr/lib/libmlag_pb.so has SONAME 'libmlag_pb.so.0' but no corresponding symlink was found in /usr/lib
frr-zebra: [pass] Binary /usr/lib/libmlag_pb.so.0 does not contain any hardcoded build paths
frr-zebra: [pass] Binary /usr/lib/libmlag_pb.so.0 is stripped
frr-zebra: [pass] All linked libraries for /usr/lib/libmlag_pb.so.0 are present
frr-zebra: [warn] Library /usr/lib/libmlag_pb.so.0 has the same name as its SONAME 'libmlag_pb.so.0'. The library file should have a more specific version.
frr-zebra: [pass] SONAME link for /usr/lib/libmlag_pb.so.0 is correct
frr-zebra: [pass] Binary /usr/lib/libmlag_pb.so.0.0.0 does not contain any hardcoded build paths
frr-zebra: [pass] Binary /usr/lib/libmlag_pb.so.0.0.0 is stripped
frr-zebra: [pass] All linked libraries for /usr/lib/libmlag_pb.so.0.0.0 are present
frr-zebra: [pass] Library /usr/lib/libmlag_pb.so.0.0.0 has SONAME 'libmlag_pb.so.0'
frr-zebra: [fail] Library /usr/lib/libmlag_pb.so.0.0.0 has SONAME 'libmlag_pb.so.0' but no corresponding symlink was found in /usr/lib

This does not look good.

@micpf

micpf commented Sep 30, 2026

Copy link
Copy Markdown
Contributor Author

Good catch, thanks. That failure is a pre-existing frr-zebra packaging bug, independent of the libcrypt change: libmlag_pb.so* is installed with INSTALL_BIN, which dereferences the symlinks and copies libmlag_pb.so.0 as a regular file, so the SONAME symlink is lost.

I've pushed a second commit switching that install line to $(CP) (preserving the symlinks), matching how libfrr.so*/libmgmt_be_nb.so* are already installed in the base package. Verified locally on a glibc build — libmlag_pb.so.0 -> libmlag_pb.so.0.0.0 is now a proper symlink and the check passes.

Happy to split this into its own PR if you'd prefer to keep the two fixes separate.

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed 2 new commits; no blocking issues found.


Generated by Claude Code

Comment thread net/frr/Makefile Outdated
PKG_NAME:=frr
PKG_VERSION:=10.6.1
PKG_RELEASE:=1
PKG_RELEASE:=3

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit (optional, not blocking): both commits bump PKG_RELEASE, so release 2 is never published on master. One bump per PR is enough; you could drop the second bump and keep PKG_RELEASE:=2.


Generated by Claude Code

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

fixed, thanks


Generated by Claude Code

frr-zebra installs libmlag_pb.so* with INSTALL_BIN, which dereferences
symlinks and copies each match as a regular file. The versioned SONAME
link libmlag_pb.so.0 -> libmlag_pb.so.0.0.0 is therefore lost, and the
package check fails:

    frr-zebra: [fail] Library /usr/lib/libmlag_pb.so.0.0.0 has SONAME
    'libmlag_pb.so.0' but no corresponding symlink was found in /usr/lib

Install the library with $(CP) instead, which preserves the symlinks,
matching how libfrr.so*/libmgmt_be_nb.so* are already installed in the
base frr package.

Signed-off-by: Michael Pfeifroth <micpf@westermo.com>
@micpf
micpf force-pushed the frr-libcrypt-compat-glibc branch from 40620ca to 05421cd Compare September 30, 2026 07:42
@micpf

micpf commented Sep 30, 2026

Copy link
Copy Markdown
Contributor Author

Good point — collapsed to a single PKG_RELEASE bump. The libcrypt commit keeps PKG_RELEASE:=2 and the libmlag/SONAME commit no longer touches it, so the net effect on master is one bump (1 -> 2) with no phantom release 3. Force-pushed.

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed 2 new commits; no new issues found.


Generated by Claude Code

@BKPepe

BKPepe commented Oct 4, 2026

Copy link
Copy Markdown
Member
frr-pythontools: Use generic tests
WARNING: opening /ci/packages.adb: UNTRUSTED signature
frr-pythontools: [pass] File /usr/sbin/frr-reload is executable
frr-pythontools: [warn] Version check (/usr/sbin/frr-reload)
frr-pythontools: First 10 lines of the last output:
  Exiting: failed to connect to any daemons.
  Traceback (most recent call last):
    File "/usr/lib/frr/frr-reload.py", line 2343, in <module>
      if not vtysh.is_config_available() or not reload_ok:
             ~~~~~~~~~~~~~~~~~~~~~~~~~^^
    File "/usr/lib/frr/frr-reload.py", line 96, in is_config_available
      output = self("configure")
    File "/usr/lib/frr/frr-reload.py", line 84, in __call__
      raise VtyshException(
          'vtysh returned status %d for command "%s"' % (proc.returncode, command)
frr-pythontools: [skip] Version check override
frr-pythontools: No executables in the package provided version 10.6.1
frr-pythontools: Generic tests failed

frr-pythontools has no executable that reports the package version:
/usr/sbin/frr-reload just runs 'frr-reload.py --reload', which needs
running daemons, so the generic CI version check fails with "No
executables in the package provided version".

Add a version test override. Since it replaces the generic version
probe for every frr subpackage, keep checking --version for vtysh,
mgmtd, watchfrr, zebra and all daemons, and skip frr-pythontools,
which provides no version information.

Signed-off-by: Michael Pfeifroth <micpf@westermo.com>
@micpf
micpf force-pushed the frr-libcrypt-compat-glibc branch from 6642e1f to 765bd7f Compare October 5, 2026 08:06
@micpf

micpf commented Oct 5, 2026

Copy link
Copy Markdown
Contributor Author

Thanks! This failure isn't caused by this PR. frr-pythontools doesn't ship an executable that reports the version: /usr/sbin/frr-reload always runs frr-reload.py --reload, whatever arguments it gets, and that needs running daemons, which causes the traceback. frr hasn't changed since the generic version check became fatal, so this PR is the first time it shows up. The 10.6.1 update (#29345) failed on the same targets.

I added net/frr/test-version.sh. It keeps the --version check for vtysh, mgmtd, watchfrr, zebra and all daemons, and skips frr-pythontools because it has no version information to check.

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed 1 new commits; no new issues found.


Generated by Claude Code

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