Summary:
Replaces the `FOR_EACH_RANGE` loop in `RendezvousHashTest.cpp` with a plain `for` loop. The loop var is spelled `std::size_t`, the type the macro's ternary deduced. Drops the now-unused `folly/container/Foreach.h` include and the `//folly/container:foreach` dep.
___
landed-with-radar-review
Differential Revision: D126407577
fbshipit-source-id: f094f6fc49a320e3ecbb60f06db1aca4012599c7
Summary:
# Context
Fife authorizes connections for vDPUs, and callers punt the opening TCP SYN with `authorize` so Fife can forward it (D125621587). We need a simple client to inject that traffic by hand, and the vDPU-side client has to be open source, so this tool is too.
# Product decisions
1. `askBarney --fife_ip X --fife_port Y --cert_path C [--key_path K] --ca_path A <host> <port>` works like netcat over TCP, except it first punts the connection's SYN to Fife.
2. The punt is `authorize(local_ip, dst_ip, syn)` over mTLS. askBarney prints Fife's `decision` and `forward` to stderr. Anything other than `ALLOWED` exits 1. If allowed, it relays stdin and stdout over the connection until the server closes it.
# Code decisions
- **The kernel owns the connection.** If askBarney made up its own SYN and only Fife sent it, the server's SYN-ACK would reach a kernel with no matching socket and be reset. So askBarney starts a normal non-blocking `connect()`, captures the SYN the kernel sends with an `AF_PACKET` socket, and punts those exact bytes. Because the punted SYN has the kernel's ports and sequence number, the server's SYN-ACK completes the kernel's connection whichever copy of the SYN reached the server. The kernel's own SYN also goes out directly.
- Capturing needs `CAP_NET_RAW`, so run it as root.
- **Open source only.** It uses folly, fbthrift, fmt, gflags and `folly::Init`, has Apache-2.0 headers, and doesn't depend on Fife's internal server code. That's why the SYN matcher (`TcpSyn`) is its own small parser rather than reusing `fife/server/IpPacket`. There are no Meta-specific default paths; the certificate, key and CA are required flags. Its only internal dependency is the generated client for `fife/if/fife.thrift`, which has to be published alongside it before it can ship.
# Test listener
`fife/askbarney/listen.py` (also `buck2 run fbcode//fife/askbarney:listen`) is a standard-library-only destination for askBarney tests. It listens on `--port` (default 17172, IPv6 and IPv4), replies to each connection with `--reply`, prints everything the peer sends, and keeps serving until Ctrl-C, or one connection with `--once`. It ships with askBarney in the open-source repo.
# Open-source build
- BUCK stays for the fbcode build. The open-source build is CMake plus getdeps, the standard pattern for Meta's open-source C++. All the dependencies (folly, fbthrift, fizz, wangle, fb303) are built and consumed that way, and a Makefile would mean hand-maintaining their include and link flags plus a Thrift code-generation rule.
- `fife/askbarney/public_tld/CMakeLists.txt` becomes the open-source repo's top level. It finds the dependencies and generates the `Fife` client from `fife/if/fife.thrift` with `add_fbthrift_cpp_library`, depending on `fb303::fb303_thrift_cpp` for the `fb303_core.thrift` include. `fife/askbarney/CMakeLists.txt` builds `askBarney`, `askbarney_tcp_syn` and the test.
- `opensource/fbcode_builder/manifests/askbarney` is the getdeps manifest. It maps `public_tld` to the repo root, ships `fife/askbarney/` and only `fife.thrift` from `fife/if`, and strips BUCK files. The open-source repo mirrors the fbcode layout so generated `#include` paths (`fife/if/gen-cpp2/...`) are the same in both builds.
- Before publishing: there's no GitHub repo yet, so the manifest has no `[git]` section and only works inside fbsource. `fife.thrift` still has the internal "Confidential and proprietary" header and needs an open-source license header through the open-source review.
Reviewed By: IvanTopolcic
Differential Revision: D125707320
fbshipit-source-id: 74c83cf24f46c5b9028d662847f473afa2b3b053
Summary: Update the shared getdeps `libnl` source archive from 3.2.25 (July 16, 2014) to 3.11.0, including the verified SHA256 and extraction directory.
Reviewed By: gnikol
Differential Revision: D125878884
fbshipit-source-id: 765631166046d75c0f4552fe8b4b42e47c838da5
Summary:
`HQStreamCodec` does not recognize an Extended CONNECT with `:protocol=websocket` as a WebSocket upgrade, so revproxy rejects it with `400 connect_method_disabled`. Mark downstream WebSocket CONNECTs as upgrades, matching `HTTP2Codec`, without a codec-specific enable flag. Both `HQSession` and `HQMultiCodec` use this behavior; D125389660 handles revproxy's per-VIP acceptance policy and `SETTINGS_ENABLE_CONNECT_PROTOCOL` advertisement.
Skip unknown frames, including GREASE and padding, on ordinary and WebSocket CONNECT streams. RFC 9114 section 4.4 requires rejecting known non-DATA frames; sections 7.2.8 and 9 require ignoring GREASE and unknown frame types. Known non-DATA frames still fail with `H3_FRAME_UNEXPECTED`.
Tests also pin the existing `QPACKCodec` conversion of an upgrade response from 101 to HTTP/3 status 200. The changed `xplat/proxygen/lib` mirrors are byte-identical.
Reviewed By: hanidamlaj
Differential Revision: D125389659
fbshipit-source-id: 808a4cea2036e5f235f318086215e44cf041b481
Summary: removes `HQUpstreamSession::HQIngressPushStream`, `ingressPushStreams_`, and their dependent methods, continued efforts to remove all things http push related in proxygen/lib
Reviewed By: Carl-Elkhoury, jbeshay
Differential Revision: D124408744
fbshipit-source-id: 7ce23cf2c2879bb68553a78f41e8a7433b6d44be
Summary: removes `HQUpstreamSession::findIngressPushStream` and `findIngressPushStreamByPushId`, continued efforts to remove all things http push related in proxygen/lib
Reviewed By: Carl-Elkhoury, jbeshay
Differential Revision: D124407785
fbshipit-source-id: 31f78a971edb8784ff27f1e1bf738c900af33a30
Summary: removes HQDownstreamSession::HQEgressPushStream, continued efforts to remove all things http push related in proxygen/lib
Reviewed By: Carl-Elkhoury, jbeshay
Differential Revision: D124403386
fbshipit-source-id: e7f0a14d21df63022b1abe708c5c072f283851b9
Summary: removes `HQDownstreamSession::createEgressPushStream`, continued efforts to remove all things http push related in proxygen/lib
Reviewed By: jbeshay, Carl-Elkhoury
Differential Revision: D124399212
fbshipit-source-id: bf3b8d4efd3cd91b28328884e029f369086587cd
Summary: removes `HQDownstreamSession::findEgressPushStream`, continued efforts to remove all things http push related in proxygen/lib
Reviewed By: jbeshay, Carl-Elkhoury
Differential Revision: D124397335
fbshipit-source-id: e45fcaf2706b27e3bcd9cc52472d95054fb9346f
Summary: removes `HQSession::eraseUnboundStream`, its override, and its caller, continued efforts to remove all things http push related in proxygen/lib
Reviewed By: Carl-Elkhoury, jbeshay
Differential Revision: D124395680
fbshipit-source-id: 0a8646983fea2d853b8d4cf59578320d8fdbe116
Summary: removes `HQSession::cleanupUnboundPushStreams`, its override, and its caller, continued efforts to remove all things http push related in proxygen/lib
Reviewed By: Carl-Elkhoury, jbeshay
Differential Revision: D124393466
fbshipit-source-id: 48dad4045d102ff1ce7164e92845cab5d3c13bda
Summary: removes `HQSession::erasePushStream`, its overrides, and its caller, continued efforts to remove all things http push related in proxygen/lib
Reviewed By: Carl-Elkhoury, jbeshay
Differential Revision: D124391063
fbshipit-source-id: cbae5890658529765b8d87dd84555c26d82f2c18
Summary: removes `ingressPushId_`, its reads and writes, and the unused `onPushPromiseHeadersComplete` callback, continued efforts to remove all things http push related in proxygen/lib
Reviewed By: Carl-Elkhoury, jbeshay
Differential Revision: D124391059
fbshipit-source-id: 7c46f57264ee930f4ce6b9354930dc156ebae3e5
Summary: removes `ServerPushLifecycleCallback`, its mock, and `ServerPushLifecycle.h`, continued efforts to remove all things http push related in proxygen/lib
Reviewed By: jbeshay, Carl-Elkhoury
Differential Revision: D124385264
fbshipit-source-id: f529f4f8a5e16a8b2af6e0adf4725ff1008f4955
Summary: removes `HQUpstreamSession` logic to bind ingress push streams to transactions, continued efforts to remove all things http push related in proxygen/lib
Reviewed By: jbeshay, Carl-Elkhoury
Differential Revision: D124382298
fbshipit-source-id: f57b916ab691afc0bda49ebd1180bdcafed7ddd4
Summary: removes `HQSession` logic to create ingress push streams, continued efforts to remove all things http push related in proxygen/lib
Reviewed By: jbeshay, Carl-Elkhoury
Differential Revision: D124381941
fbshipit-source-id: c11643d0679470724f9e44a4d1a2694150a902d3
Summary: removes `HQSession` logic to find and enumerate push streams, continued efforts to remove all things http push related in proxygen/lib
Reviewed By: Carl-Elkhoury, jbeshay
Differential Revision: D124186601
fbshipit-source-id: ebd35ad654d2b29dd44870dbb37aac79d9bfed6b
Summary: removes `HQSession` logic to handle push priorities, continued efforts to remove all things http push related in proxygen/lib
Reviewed By: Carl-Elkhoury, jbeshay
Differential Revision: D124184174
fbshipit-source-id: 69b156dff3203d1190fcd9856fc6c53b9c3a7ac9
Summary: removes `HQSession` logic to send push priorities, continued efforts to remove all things http push related in proxygen/lib
Reviewed By: jbeshay, Carl-Elkhoury
Differential Revision: D124186600
fbshipit-source-id: fdeb6adf10332ea2ff408291d7c2e50b974e8ab3
Summary: removes HQSession's logic to send push promises, continued efforts to remove all things http push related in proxygen/lib
Reviewed By: jbeshay, Carl-Elkhoury
Differential Revision: D124180502
fbshipit-source-id: 01cb5ecb731a81cbdd27fb5ac9cec799241f7f27
Summary:
`TestShutdownWithIdleConns` flakes under TSAN: proxygend exits with status 66 after reporting a data race. All 36 of its failures in the last two weeks have the same report:
- Main thread: at the hard shutdown timeout, `Proxygen::forceStop()` calls `RequestWorkerThread::forceStop()`, which calls `EventBase::terminateLoopSoon()` on the worker's `EventBase`. That reads the plain `strictLoopThread_` field.
- Worker thread: observes `stop_`, exits its loop, and `IOThreadPoolExecutor::threadRun()` immediately destroys the `EventBase`. The first statement of `~EventBase()` writes `strictLoopThread_`.
`stop_` is a relaxed atomic, so nothing makes a cross-thread `terminateLoopSoon()` happen-before the destruction it triggers. It only shows up when the worker is busy and sees `stop_` before it consumes the wakeup message, hence the flakiness. `~EventBase()` requires every method call to happen before destruction starts, and `IOThreadPoolExecutor` serializes its own `terminateLoopSoon()` against destruction with `eventBaseShutdownMutex_`. `RequestWorkerThread::forceStop()` bypasses that.
Fix: post `terminateLoopSoon()` to the worker's own loop with `runInEventBaseThread()`. The loop thread then sets `stop_` itself, so the call is sequenced before the loop exit and the destructor on the same thread.
Why this is safe:
- The cross-thread part is now just `runInEventBaseThread()`: an atomic `loopTid_` load and a notification queue push (atomic CAS plus an eventfd write on fds set at construction). `~EventBase()` touches none of that state until all keepalives are released. `runImmediatelyOrRunInEventBaseThread()` would not work, since its `isInEventBaseThread()` check reads `strictLoopThread_`.
- The `EventBase` is alive while the message is posted. `Proxygen::forceStop()` holds `workersLock_`, and a worker only leaves `workers_` from its `VirtualEventBase` destruction callback, which runs inside `~EventBase()` before the `VirtualEventBase` releases its keepalive on the `EventBase`. `Proxygen` also holds `workerKeepAlives_` until after its main loop stops.
- The posted callback always runs. Normally it runs in the loop: proxygen's post-stop drain `loop()` is pinned by those keepalives and only exits through this stop. If the loop has already exited, `~EventBase()` runs it from its keepalive loop or `queue_->drain()`, which drains until empty, including messages enqueued while draining. `terminateLoopSoon()` is harmless there.
- The only behavior change is ordering: the stop now queues behind any work already posted to the worker, so that work runs in the loop instead of possibly being deferred to the destructor. The stop is delayed by at most a loop iteration.
The same race causes 9 of the 25 recent failures of `TestShutdownSendingrequestsDuringAfterShutdown`.
Differential Revision: D125544299
fbshipit-source-id: 1b2aae0a56c7b034dd7c1aa4bd51180a3430531d
Summary: if the application invokes ::setHandler(nullptr) return early after invoking ::closeSession rather than falling thru to next instruction
Reviewed By: Carl-Elkhoury, gaurav-karna
Differential Revision: D125035603
fbshipit-source-id: 058366ea3954c4d03cd1c665828257c64253aa54
Summary: Add getdeps CI for `metaroce`: a build manifest, a GitHub Actions workflow with sccache and a 180-minute timeout (cold builds take ~90 min), and a `BUILD_TESTS` CMake option for the leaf test suite. Folly, fmt, and glog are built shared for the preload interposer.
Reviewed By: bsorrells
Differential Revision: D125028728
fbshipit-source-id: 5d9416863c991727fd353e7cc272e0673ff86c01
Summary:
The fbthrift macOS GitHub workflow (`getdeps_mac.yml`) builds with Homebrew LLVM, now Clang 23.1.0, and has failed on every run since mid-September because Google Benchmark 1.8.0 doesn't compile with it:
```
benchmark.h:1408: error: '__COUNTER__' is a C2y extension [-Werror,-Wc2y-extensions]
```
Benchmark always builds itself with `-pedantic-errors`, so `BENCHMARK_ENABLE_WERROR=OFF` wouldn't help. Upstream fixed this in v1.9.5 (https://github.com/google/benchmark/pull/2108) by suppressing `-Wc2y-extensions` around the `__COUNTER__` check, so update the manifest to that release. The rest of the manifest is unchanged, and `.lfs-pointers` gains the entry for the new archive.
Fixing it here in `fbcode_builder` fixes every getdeps project, since `build/fbcode_builder` is synced from it. In fbthrift, benchmark is used only by `thrift/lib/cpp2/test/ProtocolBench.cpp`, which uses just the basic API.
Reviewed By: genevievehelsel
Differential Revision: D125518574
fbshipit-source-id: ca2d74ecf1902329db8e19ffabf223186e0a3acf
Summary: removes all derived classes of HTTPPushTransactionHandler, as http push is no longer enabled / support in proxygen/lib
Reviewed By: Carl-Elkhoury, SUJP123
Differential Revision: D124177933
fbshipit-source-id: 27b25418085d95c04283cf3a995ef0cbc928eb7a
Summary:
isPushed is always false now that we've removed push support in proxygen/lib
this simplifies all the gated conditions on isPushed
Reviewed By: jbeshay, Carl-Elkhoury
Differential Revision: D124175915
fbshipit-source-id: f8bb91d143da3051066e1c1bf585be0f8695471f
Summary:
Fixes the two getdeps regressions that break the BGP++ OSS builds (`fboss-oss-build-bgp`, `fboss-oss-build-bgp-bb`) and FBOSS OSS builds that build dependencies from HEAD. They ship together because either fix alone still leaves `fboss-oss-build-ondiff` red on the other.
libiberty: getdeps-built libiberty installs its headers but no `libiberty.a`, so `fbthrift-python` configure fails with `Could NOT find Libiberty (missing: LIBIBERTY_LIBRARY)`. `AutoconfBuilder` adds `--disable-shared` when a manifest passes neither shared flag, and libiberty's configure then empties `PICFLAG`, so `pic/libiberty.a` is never built and `libiberty_install_pic_lib.patch` copies nothing while the install still exits 0. The miss was silent until D125047475 renamed the package in `FindLibiberty.cmake` to `Libiberty`, which made `find_package(Libiberty REQUIRED)` in fbthrift enforce REQUIRED. Passing `--enable-shared` keeps `PICFLAG`; libiberty builds no shared library either way.
glog: since D124075105 made glog static by default, the `-python` shared libraries built on `folly-python` each embed a copy of glog, and every copy registers its flags with the one shared gflags, so test binaries abort with `linked both statically and dynamically`. glog's `[cmake.defines.feature_shared_libs=on]` could never turn on because glog declared no features. This declares `shared_libs` in glog and requests it from `folly-python`; getdeps unions features per project, so graphs that contain `folly-python` (`bgp`, `fboss`) get one shared glog, and graphs without it (`cachelib`, `mcrouter`, `folly`, `fbthrift`) keep static glog.
Reviewed By: yfeldblum, shitanshu-shah
Differential Revision: D125332467
fbshipit-source-id: 4ff0cb077de91afc86f79f09e1ab6b15fac2c7f0
Summary: As per the previous diff, no one invokes newPushedTransaction on the underlying transport (http/2 or http/3). This removes all derived implementations as we continue work to deprecate http PUSH in proxygen/lib
Reviewed By: rohilverma, Carl-Elkhoury
Differential Revision: D124150150
fbshipit-source-id: 16f1d167a1c287cbec95aa798a4c2ca829f69cb4
Summary:
* continued efforts to remove all things http push related from proxygen/lib
* this changeset removes the HttpTxn::newPushedTransaction & co
Reviewed By: Carl-Elkhoury
Differential Revision: D124150143
fbshipit-source-id: 23c017cc2f4c728fb3201a7903c3e68b156eab5f
Summary:
Follow-up to the `FindZstd.cmake` fix. CMake emits an author warning when the package name passed to `find_package_handle_standard_args()` does not exactly (case-sensitively) match the name used in `find_package()`. Fix the remaining modules:
- folly: `FindSnappy`, `FindLibDwarf`, `FindLibAIO`, `FindLibUring`, `FindLibsodium`, `FindLibiberty`, `FindFmt`
- fbcode_builder: `FindGflags`, `FindRe2`, `FindLibiberty`
`find_package_handle_standard_args` also sets the upper-case `<NAME>_FOUND`, so `SNAPPY_FOUND`, `LIBDWARF_FOUND`, `LIBAIO_FOUND`, etc. are unchanged. The exception is `FindFmt`, which used `LIBFMT_FOUND`; it now checks `FMT_FOUND` (`LIBFMT_FOUND` had no other users). In `FindGflags` all exported `_FOUND` variables are derived from `GFLAGS_FOUND`, which is still set.
Reviewed By: genevievehelsel
Differential Revision: D125047475
fbshipit-source-id: 38b4eff058091525e249fc3cf39331582d396ba0
Summary:
# Context
A joining FETCH can arrive while its SUBSCRIBE is still being established. With draft 18 request streams, it can also arrive before the SUBSCRIBE itself. Dispatching it immediately can lose the subscription's track and joining location.
# This Diff
Hold dependent FETCH requests until the subscription is established, fail them when it fails, and release them on cancellation. Bound the dependency queue and time out unseen draft 18 IDs; binding the SUBSCRIBE disarms that timeout. Enforce the older drafts' Largest Object subscription requirement. A FETCH held for a PUBLISH resumes only after the publisher's PUBLISH reply, so a relay has recorded the subscription before it is asked to serve the join.
Before the FETCH data stream exists, a write that cannot open the stream is accepted and reports BLOCKED, matching how MoQCache treats BLOCKED; master dropped that write. Readiness before the first write is immediate, and only held writes wait for credit, because proxygen's HTTP/3 WebTransport cannot wait for stream credit; a write held on that transport still needs it. The held data goes out once uni stream credit arrives, whether or not the producer waits for readiness again, and a FETCH that is cancelled or reset gives up its credit wait. `MoQConsumers.h` now states that BLOCKED means the call was accepted and that accepted data is delivered. Forwarding a FETCH between sessions still ends it when the downstream consumer reports BLOCKED, as on master. Every credit wait on the session, including a track publisher's, shares one transport waiter, because a raw QUIC transport accepts only one at a time.
Use master's request cancellation machinery and retain its OperationCancelled contract. Extend the fake transport to test reordered request streams and blocked readiness.
# This Stack
1. Forwarding range and subgroup lifetime fixes.
2. **Session joining dependencies and FETCH readiness.**
3. Bounded group cache and paced replay.
4. MoQProxy integration and end-to-end joining tests.
5. MoQProxy server and end-to-end conformance runs.
Reviewed By: sharmafb
Differential Revision: D123890447
fbshipit-source-id: 4a9f70c10b825e529fdf0a3372b08bbac9774aec
Summary:
Once libc++ stops restoring the C++20-removed `std::allocator` members
(the next diff), short `std::string` globals become constant-initializable.
Together with `-fc++-static-destructors=thread-local`, which every
Android build uses, these globals then need no dynamic initialization at
all. `[[clang::lazy_init]]` on them did nothing useful, and for `const`
ones it was the cause of the runtime crashes in T292366087: clang
emitted the object into `.rodata` while its `.lazyinit` function still
constructed into it. The previous diff makes the lazy_init attribute a
compile error in these cases, and this diff removes all problematic
annotations in preparation for relanding the libc++ change.
Note that a few of these (e.g. `BaseState::EMPTY`, a `const std::shared_ptr`
initialized to `nullptr`) are constant-initialized even without the
libc++ change, so they were already emitted read-only with a `.lazyinit`
that writes to them.
Reviewed By: thevinster
Differential Revision: D124853598
fbshipit-source-id: 3a68867481bb09002cc0d86e406ec013e7d42c1c
Summary:
Like `FindXxhash.cmake` in the parent diff, `thrift/cmake/FindZstd.cmake` duplicated `build/fbcode_builder/CMake/FindZstd.cmake` but defined a `zstd::zstd` imported target. Move the target into the fbcode_builder module and remove thrift's copy. fbthrift now installs the fbcode_builder module next to `FBThriftConfig.cmake`.
The target takes its locations from `ZSTD_LIBRARY_RELEASE` and `ZSTD_LIBRARY_DEBUG`, not `ZSTD_LIBRARY`, because when both are found `ZSTD_LIBRARY` is an `optimized;...;debug;...` list, which isn't a valid `IMPORTED_LOCATION`.
The fbcode_builder module sets `ZSTD_INCLUDE_DIR` rather than `ZSTD_INCLUDE_DIRS`, so `thrift/lib/python` now reads that. It also has no `ZSTD_ROOT` hints; CMake's `<PackageName>_ROOT` handling covers that use (`Zstd_ROOT`, and `ZSTD_ROOT` from CMake 3.27).
folly, fizz and cachelib, the other users of the module, use the `ZSTD_*` variables and don't define `zstd::zstd`, so the guarded target doesn't affect them.
Reviewed By: iahs
Differential Revision: D123973126
fbshipit-source-id: 4621c354feef03db1af707bd33eef056ac96a43d
Summary:
Order of arguments are unspecified and can be evaluated in any order. This fixes (and simplifies) ::makeHTTPRequestSource
reported by mavam on github in https://github.com/facebook/proxygen/issues/642
___
landed-with-radar-review
Differential Revision: D124836672
fbshipit-source-id: 1e92616c49480f3eecb15e746974cca616a4edda
Summary:
CentOS Stream 10 and EPEL 10 carry nearly everything `cachelib`
needs, but the manifests only map most of these libraries for
`distro=fedora`, so `getdeps` builds `fmt`, `gflags`, `googletest`,
`benchmark` and `Boost` from source there for no reason. Two mappings
are also wrong for EL 10 rather than merely missing: it ships
`zlib-ng` under the compat names like Fedora, not the plain
`zlib-devel`/`zlib-static` the "not fedora" section assumes, and it has
no `lz4-static` at all, which the selector only excluded for EL 8
and 9.
This diff selects on the `rhel` family rather than naming CentOS
Stream, spelling the mappings as "Fedora, or the `rhel` family other
than 8 and 9", so Alma, Rocky and RHEL itself get them and EL 11 needs
no further edit.
Two libraries stay unmapped outside Fedora because EPEL's versions are
too old for the revisions pinned here: `glog`, where EPEL 9 and 10 both
have 0.3.5 against a post-0.6.0 commit, and `fast_float`, where
EPEL 10's 6.1.6 lacks the `parse_options_t` constructor folly's
`Conv.cpp` uses (found by building:
https://koji.fedoraproject.org/koji/taskinfo?taskID=151005880).
`install-system-deps --dry-run --recursive cachelib` now asks for 35
packages on `centos_stream` 10, the Fedora list minus `glog-devel`,
`fast_float-devel` and `lz4-static`, and all of them exist in CentOS
Stream 10 or EPEL 10. The `centos_stream` 9 and 8 lists are unchanged:
9 still takes `zlib-devel` and `zlib-static` and builds the rest, 8
still takes the `boost169` compat packages.
The `glog` manifest also set `BUILD_SHARED_LIBS=ON` unconditionally,
while `folly` and `fbthrift` set it only under
`feature_shared_libs=on`. A static build therefore still linked a
shared `libglog`, and the manifest's own patchfile comment already
assumes the opposite ("default-visibility symbols in a static archive
are harmless for consumers that don't need the shared_libs feature").
It shows up downstream: the Fedora and EPEL packages of `cachelib` and
`mcrouter` ship executables with the whole stack linked statically and
no libraries at all, yet came out requiring `libglog.so.1`, which
nothing installs. On EPEL 10 that is not even satisfiable, since its
`glog` is 0.3.5 and provides `libglog.so.0`.
This diff moves the define under `feature_shared_libs=on`, as the
other two do, so `--shared-lib` still gets a shared `glog` and everyone
else gets a static one.
Origin: verified on fork branch `michel-slm/CacheLib`
`getdeps-el10-rpm-mappings`, commits `1aef1670` (EL 10 mappings) and
`6ad39916` (`glog` shared default); imported here for ShipIt export.
Reviewed By: yfeldblum
Differential Revision: D124075105
fbshipit-source-id: 4279b1bf9fe58165fcca44333ef3ac3250d16bcc
Summary:
# If this diff is causing a binary size regression, use D124217395 to exclude the additional dependency.
Previously,
- the `CertVerifyLogFn` was set through [ConnectionParams](https://www.internalfb.com/code/fbsource/[46fc8abb7ed7755e15fdfe51a4be37085bbde2ce]/fbcode/proxygen/lib/http/coro/client/HTTPCoroConnector.h?lines=181) exposed to the client. The top level API [HttpService.cpp](https://www.internalfb.com/code/fbsource/[bb37dfa277d43b4f3b5957f6f8d7e5bba8379b0b]/fbcode/proxygen/facebook/lib/http/client/HttpService.cpp?lines=354-355) sets this field, because that's where this library on all internal the facebook dependencies.
This diff
- Makes use of the `CertVerificationHooks`, which has different content for
- `coro/facebook/CertVerificationHooks.cpp` and
- `coro/client/CertVerificationHooks.cpp`
- so `HTTPCoroConnector.cpp` can directly use facebook scuba logger for fbcode builds. This way all fbcode builds of this library will have scuba logging, not just the clients directly using `HttpService.cpp`, to prevent things like S713385 from happening.
This diff might cause some clients to have increase binary size because off added binary dependency. D124217395 allows clients to opt out from this dependency.
- This change is necessary for us to have comprehensive logging coverage.
- The usual trick of "weak symbol that is set in //common/init or pulled in through configerator" _may_ miss some things.
Reviewed By: mingtaoy
Differential Revision: D123730004
fbshipit-source-id: dc71bc8001a4c4f2480b267efda6d0b94c5f8738