1
0
mirror of https://github.com/facebook/proxygen.git synced 2025-08-04 08:42:06 +03:00

29 Commits

Author SHA1 Message Date
e58ab4f337 upgrade pyre version in fbcode/opensource - batch 1 (#1024)
Summary: Pull Request resolved: https://github.com/facebookincubator/zstrong/pull/1024

Differential Revision: D64977670

fbshipit-source-id: 505d9709aa088f7811e0f4d6d7ba26b07ffdbc94
2024-10-25 21:48:37 -07:00
da8d696080 Support of Arch Linux in getdeps.py
Summary:
X-link: https://github.com/facebookincubator/zstrong/pull/907

I don't sure that I make all in accordance with the your contribution pipeline, so please correct me If there is needed.
So, I've made some changes to support the `pacman` package manager in your `getdeps.py` script. In `manifests` I'm also duplicated some packages from `debs` and `rpms` sections and create a new `pps` sections with according packages for  `pacman`.

Issue:  https://github.com/facebook/folly/issues/1701

X-link: https://github.com/facebook/folly/pull/1702

Reviewed By: yfeldblum

Differential Revision: D33514769

Pulled By: Orvid

fbshipit-source-id: a081c3a5bcb7f7cdde3a4a91c0d15517c0a171b3
2024-07-15 13:50:07 -07:00
8307ef7cd7 Add Linux Mint to getdeps Debian package manager options
Summary:
X-link: https://github.com/facebookincubator/zstrong/pull/909

Linux Mint is based on Ubuntu and installs correctly with the same options. This adds it to the supported versions so that running `sudo ./install-system-packages.sh` succeeds.

X-link: https://github.com/facebook/watchman/pull/1234

Reviewed By: chadaustin

Differential Revision: D59666084

Pulled By: genevievehelsel

fbshipit-source-id: cfdee239be6358d4c8e2f1154391159a40ef91f4
2024-07-13 13:50:32 -07:00
0b332c467e add "rocky" as a known distro using rpm
Summary:
X-link: https://github.com/facebookincubator/zstrong/pull/746

this allows us to use the preinstalled package on a "rocky" box
as the build dependencies.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>

X-link: https://github.com/facebook/folly/pull/1741

Reviewed By: dmm-fb

Differential Revision: D35348932

Pulled By: yfeldblum

fbshipit-source-id: 956cd6a7a8ddeffb090ef0c141feb5b946368e0d
2024-04-12 17:31:35 -07:00
cf2e8bc5d4 Pyre Configurationless migration for] [batch:88/244] (#723)
Summary: Pull Request resolved: https://github.com/facebookincubator/zstrong/pull/723

Reviewed By: grievejia

Differential Revision: D54471437

fbshipit-source-id: bc644553e31464ceb632034e4ce3f05ba30fbbcd
2024-03-04 18:15:44 -08:00
jbs
b0cc72d0c2 pop!_os synonym for ubuntu. Use deb package manager.
Summary:
Use Deb package manager on Pop! OS.

X-link: https://github.com/facebook/folly/pull/2135

Reviewed By: Gownta

Differential Revision: D53441949

Pulled By: Orvid

fbshipit-source-id: a88f01aa5d251a57005a050c0fd7068f187a15a8
2024-02-12 13:42:08 -08:00
9bcc1277d4 Pyvelox sphinx documentation (#3363)
Summary:
This is the initial PR to integrate PyVelox documentation.

X-link: https://github.com/facebookincubator/velox/pull/3363

Reviewed By: Yuhta

Differential Revision: D43483032

Pulled By: kgpai

fbshipit-source-id: f632974161b0c71c461415d239b1fa3726bb8299
2023-02-22 14:40:00 -08:00
b3cab4081c properly distringuish arm and intel macs
Summary:
M1 macbooks appear to have a default system Python3 version of 3.8.x, with a "universal" executable that incorrectly reports the platform (`platform.machine()`) as `x86_64`. This causes Watchman's `./autogen.sh` which uses `getdeps.py build` to try to build for `x86_64`, which eventually causes linker errors with pre-installed dependencies eg `building for macOS-x86_64 but attempting to link with file built for macOS-arm64`. See also https://github.com/pyinstaller/pyinstaller/issues/5315

PR: https://github.com/facebook/watchman/pull/1081 attempted to resolve by noting a higher python version where platform.machine() does the right thing.

We can work around this though by using `os.uname()` which correctly
distinguishes intel and M1.

```
> python3
>>> platform.machine()
'x86_64'
>>> os.uname().version
'Darwin Kernel Version 21.6.0: Thu Sep 29 20:13:56 PDT 2022; root:xnu-8020.240.7~1/RELEASE_ARM64_T6000'
```

Reviewed By: mshroyer

Differential Revision: D42182936

fbshipit-source-id: 0d0484a86600da102450e9035c621c01d250cbf7
2023-01-03 13:32:41 -08:00
82d1cc37e0 don't fail the build if /proc/meminfo is missing or unexpected
Summary:
Occasionally we see reports [1] that /proc/meminfo is missing or has
unexpected values on Linux. Instead of failing the build, guess a
reasonable value, at the risk that this will unnecessarily limit the
build's concurrency.

[1] https://github.com/facebook/watchman/issues/1040

Reviewed By: genevievehelsel

Differential Revision: D38126612

fbshipit-source-id: 9d9d9f6003703acf6dffcdd5b2022f0f7b3aa691
2022-07-25 16:02:01 -07:00
7a2fe16c14 Fix return type in get_linux_type() (#1025)
Summary:
This function is expected to return a tuple of 3 elements. This doesn't happen when it fails opening the `/etc/os-release` file.

X-link: https://github.com/facebook/watchman/pull/1025

Reviewed By: fanzeyi

Differential Revision: D36736667

Pulled By: chadaustin

fbshipit-source-id: a6839235d6c5ebb50267cd78f1c9590b2fb180d7
2022-05-30 11:38:45 -07:00
e77a9fe43a Add annotations to opensource/fbcode_builder
Reviewed By: shannonzhu

Differential Revision: D34224272

fbshipit-source-id: 52e19886ab3d4fb015a557244660dd4357a35c17
2022-02-14 16:22:09 -08:00
5cd35796ba add freebsd support
Summary: Add some basic support for FreeBSD to getdeps.

Reviewed By: ahornby

Differential Revision: D33989129

fbshipit-source-id: 42ff5f160b7e19c12196bb2e52a726f7815487bd
2022-02-08 18:08:18 -08:00
a75c04f38c getdeps: Add support for brew packages and define package dependencies
Summary:
In order to speed up build times on a mac, add homebrew support to
getdeps.

Homebrew packages can be declared in a manifest using the `homebrew` header.

Futher, ahornby has added manifest entries for homebrew packages which are
included in this diff and also included a change to use the correct version of
openssl. Without this openssl change, homebrew cmake configure finds an old
openssl 1.0.2 install.

This diff provides a 2x speed up for building folly:

Timings for clean getdeps folly build on mid-2018 2.9Ghz i9 6 core intel macbook pro with 32GB RAM:

With new homebrew system deps:
```
rm -rf /Users/ahornby/.scratch/UsersZahornbyZfbsource/fbcode_builder_getdeps/
time ./opensource/fbcode_builder/getdeps.py build --allow-system-packages folly
real	17m39.329s
user	76m10.317s
sys	5m50.163s
```

Without:
```
rm -rf /Users/ahornby/.scratch/UsersZahornbyZfbsource/fbcode_builder_getdeps/
time ./opensource/fbcode_builder/getdeps.py build folly
real	32m10.344s
user	105m53.448s
sys	15m57.858s
```

Reviewed By: ahornby

Differential Revision: D33842632

fbshipit-source-id: ac785d4a8dcfa31b77292bddd9e747022ac36e3b
2022-02-04 04:28:37 -08:00
a89428646a limit parallelism based on available RAM
Summary:
A long time ago, getdeps scheduled each build up to the number of hardware threads. For some builds, that was too heavy, so it got throttled back to only ever use half the hardware threads. This left parallelism on the table for CPU-bound projects that don't use much RAM per compilation.

This commit makes better use of the hardware with finer-grained logic that allows each manifest to specify a `job_weight_mib` estimate in MiB, and limit concurrency to `available_ram / job_weight`.

Reviewed By: ahornby

Differential Revision: D33754018

fbshipit-source-id: 785bed6c6cfe3c473244e0806a77cec1fc119e1f
2022-02-01 17:12:47 -08:00
4fb4756ec9 remove legacy __future__ imports
Summary: The future is now.

Reviewed By: xavierd

Differential Revision: D33714537

fbshipit-source-id: 8d282bbe7391c4b72b70dab54a5c252060fba457
2022-01-24 20:23:34 -08:00
b5f1afe216 Update copyright headers from Facebook to Meta
Reviewed By: bhamodi

Differential Revision: D33330724

fbshipit-source-id: 8a798435742dedc96e2b6912179736b6a1c72491
2021-12-27 14:41:24 -08:00
aca0bd742b fix distro name
Summary: Missed this when switching from spaces to underscores in distro names

Reviewed By: krallin

Differential Revision: D32693527

fbshipit-source-id: 658504d76c96defd3f1a217ada8b05f99c841ede
2021-11-30 01:51:09 -08:00
e354f82442 replace space with underscore in getdeps triple
Summary: I don't think the spaces were breaking anything, but many years on unix means they set my spidey sense tingling when looking at the build logs.

Reviewed By: StanislavGlebik

Differential Revision: D32619583

fbshipit-source-id: 8d5bc35f085faced20457645f1c1430371a3c578
2021-11-24 01:25:12 -08:00
a8960cfe5f add centos stream support
Summary:
Distro name wasn't matching and thus no rpms being installed or used

Also improved the error message for unknown systems

Reviewed By: farnz

Differential Revision: D32139850

fbshipit-source-id: 438278094159f732f6b1de506490b89d2c9cd3f7
2021-11-04 02:03:47 -07:00
36f2a4f2b7 Changes for building in Debian (#943)
Summary:
Some changes that had to be done in Debian for the build to work:

* Installation of system deps failed as it was not detecting the OS correctly
* Updated the CMake manifest to uncomment the deb dependency as the CMake versions are newer
* fb303 was not getting cloned as it was looking for a non-existent master branch

Pull Request resolved: https://github.com/facebook/watchman/pull/943

Differential Revision: D30700180

Pulled By: fanzeyi

fbshipit-source-id: 62eb9f8ba57510eb98d6bd56e40384bf38a74d8c
2021-09-02 10:35:19 -07:00
cbe7c9dd5b feat: add support for compiling open/r on 64-bit arm linux (#95)
Summary:
Description:

Prior to this patch it was not possible to run open/r on linux running on ARM due to cmake and openssl being harded to download/compile for the x86_64 arch.

In order to prevent such problem this patch actively compiles cmake instead of using pre-compiled binaries and also allows the OpenSSLBuilder to provide the correct build args to openssl, thus not trying to compile or run x86_64 software.

Pull Request resolved: https://github.com/facebook/openr/pull/95

Test Plan: * built the project by using ./build/build_openr.sh

Reviewed By: wez

Differential Revision: D28224684

Pulled By: cooperlees

fbshipit-source-id: 9de61dc6d7dcf7116ec5c67f3f165cd4a4bb5e5c
2021-06-01 11:43:02 -07:00
b0335039ca apply black 20.8b1 formatting update
Summary:
allow-large-files

black_any_style

Reviewed By: zertosh

Differential Revision: D24325133

fbshipit-source-id: b4afe80d1e8b2bc993f4b8e3822c02964df47462
2020-10-14 20:21:40 -07:00
5f2a16b70b 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:18:43 -07:00
150a1dc560 VERSION_ID in /etc/os-release is not mandatory
Summary:
e.g. debian doesn't seem to have it
```
$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux bullseye/sid"
NAME="Debian GNU/Linux"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
```

Reviewed By: mjoras

Differential Revision: D20483097

fbshipit-source-id: 722397ff994336884ed2e5bbf8fe517d4dcf4e6c
2020-03-17 11:42:52 -07:00
18fe084a4e Relicense getdeps from BSD to MIT
Summary: See https://fb.workplace.com/groups/osssupport/permalink/2846876118694318/

Reviewed By: wez

Differential Revision: D17750243

fbshipit-source-id: 9e149df1f8e09203820f50d0fcac4a5cecf52e33
2019-10-10 13:23:48 -07:00
f1ed28a52c add a ManifestContext and ContextGenerator class
Summary:
Add a ContextGenerator class so that we actually use the correct per-project
context when loading projects and computing dependencies.

Previously commands like `build` and `test` would change the contexts for each
project as they iterated through and performed the build.  However, they did
not do this when first loading the projects.  This could cause them to use
different context values when loading dependencies than when performing the
build.  For instance, this could cause issues if a project depends on
`googletest` only when testing is enabled, as the code previously did not set
the "test" parameter when evaluating dependencies.

Reviewed By: pkaush

Differential Revision: D16477396

fbshipit-source-id: c1e055f07de1cb960861d19594e3bda20a2ccd87
2019-07-31 20:58:51 -07:00
89bc1d6b04 watchman: fixup FB internal mac packaging
Summary:
with the reshuffling around getdeps.py, and changes in folly/thrift/wangle,
our internal package stopped building.  This diff brings it back to life.  It is
a little bit interwined:

* Introduce a `--facebook-internal` switch to getdeps that causes `fb` in the
  build context to be set to `on` rather than `off`.  This allows specifying
  options in the manifest that are FB specific.
* Introduce cmake options to control the WATCHMAN_STATE_DIR and whether cmake
  should attempt to create WATCHMAN_STATE_DIR when it is installed.
* For FB specific builds on macOS, set the state dir to match our existing location
  and disable creation of WATCHMAN_STATE_DIR because that will ultimately be
  handling during package installation and we don't have privs for that on
  the machine generating the package.
* Adjust Facebook CI scripts to use getdeps for building and testing watchman

Reviewed By: simpkins

Differential Revision: D15337970

fbshipit-source-id: 8ab3c1f810decf5f0b16337dc1cbe6dc73d26426
2019-05-20 19:32:08 -07:00
d0c4fccca9 fbcode_builder: getdeps: add list-deps subcommand
Summary:
While the command isn't necessarily super useful
on its own, it does show that the plumbing for walking the
deps is functioning, and that is important when it comes
to building.

The output lists the projects in the order that they
would be built.

The `fetch` command has been augmented to add a `--recursive`
flag that uses the same mechanism to recursively fetch
the dependencies.

Reviewed By: simpkins

Differential Revision: D14691004

fbshipit-source-id: b00bf6ad4742f8bb0a70698f71a5fe03d6a1f453
2019-05-03 16:00:40 -07:00
bd620998c4 fbcode_builder: getdeps: add platform type tuple helper
Summary:
This will feed into the manifest context for system
dependent manifest sections.  This is essentially the same
code borrowed from the watchman and eden getdeps.py.

Reviewed By: simpkins

Differential Revision: D14690997

fbshipit-source-id: 3d3ae146237a2cd49609aaa2bd0e785ebe21f02c
2019-05-03 16:00:38 -07:00