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

DRAFT: Always enable Protobuf in packages and add Protobuf files to distro #18308

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

mwinter-osr
Copy link
Member

Opening this as a s draft to get some comments. Personally, I'm not convinced that this is the right way to do it, but can't get an idea for some better solution. Comments are appreciated.
Main feedback initially would be appreciated on what I did (so we can agree there) and I can work on potentially cleaning up the work after we agreed there

The main motivation which started this was to get Topotests working for the protobuf tests with package builds.

Changes done:

  • Changed Makefiles to install the *.proto files (into generic bindir, ie /usr/lib/frr by default)
  • Always enabling protobuf in the package build. Initially, I wanted to make protobuf into a additional sub-package, but the base binaries (ie zebra) are different built with and without protobuf. As we require now protobuf for mgmtd, I opted to always build with protobuf
  • Wasn't sure where to install the *.proto files - I've now decided to install them into the main frr binary directory (default the /usr/lib/frr). This was after some discussion with Equi on where proto files should go and we couldn't find a good location
  • Added a grpc sub-package to RedHat distros. We have a similar package in Debian for some time. Wanted to keep it consistent
  • Added test-tools sub-package to RedHat distros. We have a similar package in Debian for some time. Wanted to keep it consistent
  • Added mgmtd_testc to test-tools subpackages
  • Finally changed the topotest fe_client.py test lib for the protobuf tests to add an additional search path to look at the /usr/lib/frr location for the proto files

Signed-off-by: Martin Winter mwinter@opensourcerouting.org

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Protobuf is now required for Mgmtd anyway, so we can just build with
 protobuf support at all times. There is no additional dependency

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Install mgmtd_testc and fpm_listener with the test tools

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Protobuf is now required for Mgmtd anyway, so we can just build with
 protobuf support at all times. There is no additional dependency

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Make/Make Install needs to install the proto files. We install them
 into the main /usr/lib/frr directory (or similar as configured).

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Adding an additional search path for the topotests to look for proto files.
 This allows topotest to run protobuf tests with an installed package.

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
--disable-zeromq \
--enable-ospfapi \
--enable-bgp-vnc \
--enable-multipath=256 \
--enable-pcre2posix \
\
--enable-mgmtd-test-be-client \
--enable-fpm-listener \
Copy link
Member

Choose a reason for hiding this comment

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

fpm-listener probably should be it's own commit or spelled out the reason for the inclusion here. Since it is not related to protobuf changes at all.

@@ -96,6 +97,12 @@ override_dh_auto_install:
cp -r tools/etc/* debian/tmp/etc/
-rm debian/tmp/etc/frr/daemons.conf

# install proto files to /usr/lib/frr
#ifneq ($(filter pkg.frr.grpc,$(DEB_BUILD_PROFILES)),)
# cp usr/lib/x86_64-linux-gnu/frr/frr/mgmt.proto debian/tmp/usr/lib/frr/
Copy link
Member

Choose a reason for hiding this comment

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

How would this handle arm?

@@ -835,9 +841,19 @@ sed -i 's/ -M rpki//' %{_sysconfdir}/frr/daemons
%endif


%files test-tools
%{_sbindir}/mgmtd_testc
%{_sbindir}/fpm_listener
Copy link
Member

Choose a reason for hiding this comment

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

fpm_listener change should be separate or called out in the commit message

@donaldsharp
Copy link
Member

Modulus the couple of comments/nits I have this seems pretty reasonable.

Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

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.

2 participants