Commit Graph

13 Commits

Author SHA1 Message Date
Ravindra Sunkad
c585f1f321 Have OSS getdeps.py pull code from 'main' (instead of 'master') until all repos are migrated
Summary: getdeps.py pulls repos from master branch by default. For FBOSS force it to pull from 'main'

Reviewed By: shri-khare

Differential Revision: D30857755

fbshipit-source-id: 9891f1ddc08c8f13bdcb00385e1ad4516a84776c
2021-09-09 21:34:05 -07:00
Peyman Gardideh
8319b0fec2 switch to tp2 CLI11
Summary: migrating to tp2 version of CLI11. Will delete our local copy in next diff to keep this smaller

Reviewed By: shri-khare

Differential Revision: D29808579

fbshipit-source-id: c7b4cf40a64c9e8804f0eb6c749f36fabdbc79e1
2021-08-03 11:46:02 -07:00
Shrikrishna (Shri) Khare
ff17d93271 Build FBOSS with new OpenNSA 6.5.22
Summary: As titled

Reviewed By: rsunkad

Differential Revision: D28774938

fbshipit-source-id: 123fd2b170eec941533f7a7d3bdd40dd9c4e967f
2021-05-30 12:51:30 -07:00
Rajan Kumar
3378ebc55d Adding yaml-cpp fboss code for oss
Summary: Added yaml-cpp library to the fboss OSS build

Reviewed By: shri-khare

Differential Revision: D25126509

fbshipit-source-id: 1e88150dbf8c96a5ac696e003265dc1f14bec105
2020-11-20 14:04:20 -08:00
Jon Maltiel Swenson
7d47c4b523 Remove rsocket-cpp dependency from OSS projects depending on fbthrift
Summary: fbthrift no longer depends on rsocket-cpp

Reviewed By: simpkins

Differential Revision: D22275231

fbshipit-source-id: c1f217f1ce97591b8ebca002bf8ae3af701be641
2020-07-01 11:24:22 -07:00
Wez Furlong
bd2688aae5 getdeps: allow satisfying deps from system packages
Summary:
From the outset, we wanted to be sure that getdeps was able
to source and build the dependencies so that we knew that we'd have
a repeatable build.  This came at the cost of build times: having
to build boost on each CI run is a bit of a chore.

This commit adds three new elements to the manifest files:

* `rpms` - a list of RPM names that are all required to be present
  in order to consider the dependency satisfied
* `debs` - like `rpms` above, but scoped to debian package names
* `preinstalled.env` - a list of environment variables that if they
  are all set and non-empty will satisfy the dependency.

A new `--allow-system-packages` option to getdeps enables the new
logic that looks for system packages; it is off by default, but
enabled in the generated GitHub Actions workflows.

A new `install-system-deps` subcommand is provided that will attempt
to install the system packages needed to satisfy the build.  This
typically needs to be run via sudo and is thus broken out separately
from the main getdeps build flow.

I made a pass over the manifest files and added package names that
satisfy the build on ubuntu-18 and fedora-31.

shri-khare: I renamed the `Python3.7.6` manifest to just `python` as
part of this change; the version of python that it pulls in through
the normal build is the same and I believe that an equal or newer
version of python3 is available in the GH actions builder.

The `preinstalled.env` is used only by the boost manifest: it references
the name of an environment variable that is set by the github
windows hosts and that points to a pre-built and pre-installed
copy of boost.  Since there is no package manager that we can
easily query for this sort of thing, probing from the environment
seems like a reasonable and fast way to check for this.  We
may need to evolve this over time to become more feature rich,
but this seems like a good starting point.

This commit has the potential to save 20 minutes of build time
from each public CI build just due to the boost dependency alone!

Refs: https://github.com/facebook/watchman/pull/797

Reviewed By: yfeldblum

Differential Revision: D20740410

fbshipit-source-id: 6c38019449c54465127656c3d18a6ff1f30adaea
2020-04-29 11:17:51 -07:00
Shrikrishna Khare
91abb7b7c7 SAI diag shell in OSS: python dep for FBOSS
Summary:
The SAI diag shell implementation requires Python3.7.6.
Previous diff in the stack added Python3.7.6 manifest.
Make use of it to build diag shell and link with Python lib.

Differential Revision: D20064315

fbshipit-source-id: c855f8a9f554066e8150ce1d867828a84161961b
2020-02-24 09:22:03 -08:00
Joseph Wu
c787742e29 Fix missing re2 dep in opensource
Summary: platform_mapping library needs RE2 lib.

Reviewed By: shri-khare

Differential Revision: D19838529

fbshipit-source-id: 71a2c06437ce05a42396a2867ddadb029e36926e
2020-02-11 23:31:45 -08:00
Shrikrishna Khare
cbe74a776b OpenNSA: Don't use opennsl, switch to bcm-only API
Summary:
With the release of OpenNSA (https://github.com/Broadcom-Network-Switching-Software/OpenNSA), we can stop using opennsal altogether!

This diff was created using following steps:

cd fboss/agent
find . ! -path "*\/oss*" -type f \( ! -iname "*TARGETS*" \) -exec sed -i -e 's/opennsl_spl_//g' {} \;
find . ! -path "*\/oss*" -type f \( ! -iname "*TARGETS*" \) -exec sed -i -e 's/opennsl/bcm/g' {} \;
find . ! -path "*\/oss*" -type f \( ! -iname "*TARGETS*" \) -exec sed -i -e 's/OPENNSL/BCM/g' {} \;
find . ! -path "*\/oss*" -type f \( ! -iname "*TARGETS*" \) -exec sed -i -e 's/OpenNSL/Bcm/g' {} \; # for symbols like snmpBcmTransmittedPkts2048to4095Octets

Furthermore:

- In all TARGETS under fboss/agent replace wrapped_opennsl_symbols with wrapped_bcm_symbols.
- hg mv agent/facebook/test/OpenNSLInterface.h agent/facebook/test/BcmInterface.h
- BcmEgress.cpp remove operator== overload for opennsl API altogether, and remove operator== BCM API version from inside unnamed namespace, and put it in fboss namespace.
- BcmCinter.h and BcmCinter.cpp now have some duplicate definitions as opennsl_ got renamed to bcm_. Delete one of the definitions "as appropriate".
- Similarly, remove duplicate definitions in FakeSdk.h and FakeSdk.cpp
- Similarly, remove duplicate definitions in SdkTracer.cpp (remove definitions calling CALL_WRAPPERS_RV_NO_CINTER). And lastly, remove CALL_WRAPPERS_RV_NO_CINTER itself.
- arc lint
- Remove OpennslCompatTests.cpp
- Fix ./agent/hw/bcm/tests/facebook/BcmEgressTest.cpp to have #include
  "fboss/agent/facebook/test/MockOpenNSL.h" instead of MockBcm.h

TODO:
- This patch retains the directory structure (facebook/ subdirectory), which will be fixed in subsequent patches.
- Remove opennsl references from TARGETS file, additional cleanup etc.
- Remove all oss directories...

Differential Revision: D16401189

fbshipit-source-id: 607b6c0f97ffcacf3707f6b7a4c9454cc0b24476
2020-01-14 22:11:49 -08:00
Koray Polat
ddba97ec96 Add SAI-1.4.0 to opensource build
Summary:
- Added sai to getdeps
- added SAI to FBOSS as a dependency
- Included path of SAI headers to FBOSS's cmake file.

Reviewed By: shri-khare

Differential Revision: D18629127

fbshipit-source-id: 119a6b7f2b64bd84414d9e16a903bc8df48a35e7
2019-11-21 22:52:08 -08:00
Yedidya Feldblum
d87295fc9d Cut mstch manifest
Summary: [OpenSource] Cut `mstch` manifest, which was but is no longer used by `fbthrift`.

Reviewed By: avalonalex, davidtgoldblatt

Differential Revision: D17160816

fbshipit-source-id: 3b96142455d6990870e8ed3e5ce330d339d5a657
2019-09-03 21:39:29 -07:00
Alex Eckert
850ab27d4d use facebook::fb303 instead of common::stats where possible
Summary:
Most stat code in fbcode was moved in to open source under
fbcode/fb303. The only exception that we use internally is the
MonotonicCounter class. This diff moves all of our stats code to use
the open source headers and updates cmake files to pull in the open
source fb303.

Reviewed By: chadaustin, shri-khare

Differential Revision: D16969960

fbshipit-source-id: 12b7abb54c956c242c8e27eb69fd96925c7e61f7
2019-08-27 17:15:54 -07:00
Shrikrishna Khare
8515d68784 fbcode_builder: getdeps: fboss: add FBOSS fetcher
Summary:
The previous diffs in the stack add fbcode_builder manifests for FBOSS
dependencies iproute2 and OpenNSL. The other FBOSS dependencies already have
fbcode_builder support. Thus, add FBOSS manifest.

Additionally, this patch also modifies fboss CMakeLists.txt to get FBOSS to
build using fbcode_builder.

Reviewed By: wez

Differential Revision: D15626298

fbshipit-source-id: 31802ef695ae69b08f526bbeb299c59f3b9d44be
2019-06-10 18:21:54 -07:00