Commit Graph

43 Commits

Author SHA1 Message Date
Adam Simpkins
2799e45345 fix the dependencies for the Rust vendored crates
Summary:
The Rust vendored crates script also depends on another script and the
lfs-pointers file which specifies the ID to use for the download.
Update the RustStaticLibrary.cmake file to make sure that the vendored crates
are re-downloaded if either of these files change.

Reviewed By: wez

Differential Revision: D18846757

fbshipit-source-id: dd67d8d954a048501f0bdaddbd78147d39a1da5f
2019-12-06 11:59:47 -08:00
Adam Simpkins
2442b46ee8 cmake: always build support for the EdenSCM backing store
Summary:
Now that the fb-mercurial sources are available in the Eden repository, update
our CMake build files to always build them.  This moves the build logic from
the centralized `FBMercurialFeatures.cmake` file into `CMakeLists.txt` files
in the appropriate subdirectories.

Reviewed By: chadaustin

Differential Revision: D18588011

fbshipit-source-id: ded9decde5c2ec766aae0bb0f4f5b021d1044a98
2019-11-22 13:00:07 -08:00
Adam Simpkins
f71bfaacad getdeps: remove the fb-mercurial-rust target
Summary:
Remove the standalone fb-mercurial-rust target that was an internal-only
dependency for the Eden build.  This build step is now done entirely in the
Eden build.

Reviewed By: fanzeyi

Differential Revision: D18623943

fbshipit-source-id: c62a1155ddd1c0a6b2270c472176ba25194c6145
2019-11-22 13:00:06 -08:00
Adam Simpkins
aef2dbce95 cmake: unconditionally build the Rust datapack library code
Summary:
Update the CMake build to always build the Rust datapack libraries, even on
Windows.  This allows us to completely eliminate the `EDEN_HAVE_RUST_DATAPACK`
checks.

Note that I did leave the `EDEN_HAVE_RUST_DATAPACK` macro in place, as we
still do not build the Rust datapack code on Mac when building with Buck.

Reviewed By: fanzeyi

Differential Revision: D18588008

fbshipit-source-id: 1a4c9ceec5372d0e6a7313d2eb87edabd1e60a96
2019-11-22 13:00:06 -08:00
Adam Simpkins
cd9a1e0e88 cmake: directly build the rust datapack libraries
Summary:
Update Eden's top-level CMakeLists.txt file to build the Rust datapack
libraries.  Previously these were built by invoking CMake separately inside th
`eden/scm` subdirectory.  Now that the code has been combined into a single
location we can use a single CMake invocation to drive the build of both these
components.

The old code did not build the Rust datapack code on Windows, and this diff
does not change that behavior.  I'm not aware of any reason to skip building
this on Windows, so I plan to enable building this code on Windows in a
subsequent diff.

Reviewed By: pkaush

Differential Revision: D18588006

fbshipit-source-id: 20f4f0ea9fef8595a9dd35a21115952b2808c824
2019-11-22 13:00:06 -08:00
Zeyi (Rice) Fan
70b00d43aa eden: make eden build with Rust datapack
Reviewed By: wez

Differential Revision: D17494253

fbshipit-source-id: 45bab057e5cefd8f2808be96ba31814c5196051b
2019-10-09 13:03:07 -07:00
Adam Simpkins
7ee2610c78 make support for Eden SCM optional
Summary:
Add a CMake option to control whether or not we should build support for
fb-mercurial (aka Eden SCM).  If this is disabled we avoid building anything
under eden/fs/store/hg and drop support for the "hg" backing store.

Reviewed By: wez

Differential Revision: D15980320

fbshipit-source-id: 23a49d3e5cf89199666ff4a0bf46626502c12171
2019-09-26 20:26:43 -07:00
Adam Simpkins
69e28322d3 make support for Git optional
Summary:
Add a CMake option to control whether or not we should build support for
Git.  If this is disabled we avoid building anything under eden/fs/store/git
and drop support for the "git" backing store.

Reviewed By: wez

Differential Revision: D15980321

fbshipit-source-id: 434364d81b44935ce86fdf4d66697ee21ff2992f
2019-09-20 18:22:04 -07:00
Adam Simpkins
5c1cfe1897 search for the cpp2 and py fbthrift components
Summary:
D17401218 updated the fbthrift CMake files to define components for the cpp2
and py generators.  Eden requires both of these, so explicitly request them
when finding fbthrift.

Reviewed By: wez

Differential Revision: D17493950

fbshipit-source-id: 49410c08d847de404cc24c67fd1a25f75aad2518
2019-09-20 11:36:14 -07:00
Adam Simpkins
40ab42dc42 the edenfsctl program depends on python-toml
Summary:
Update the getdeps manifest and Eden's CMake files to indicate that the
edenfsctl program depends on python-toml.

Reviewed By: chadaustin

Differential Revision: D17401215

fbshipit-source-id: f512678d8bca9c7b2b4d25bf9c3ecd7eed825de9
2019-09-20 11:36:13 -07:00
Adam Simpkins
6b3bafe54f clean up duplicate find_package(cpptoml)
Summary:
The code in `EdenConfigChecks.cmake` had two separate `find_package(cpptoml)`
calls, one using its installed CMake config file, and one using a custom
`Findcpptoml.cmake` module.

This removes the custom `Findcpptoml.cmake` code, and updates everything to
only used cpptoml's installed CMake configuration.

Reviewed By: chadaustin

Differential Revision: D17401220

fbshipit-source-id: 3789703cdfc029049db3b1bd9f5751fa2a60a8d4
2019-09-20 11:36:13 -07:00
Wez Furlong
56a0b18a2d eden: adjust projectedfs SDK dep search procedure
Summary:
This diff revises our cmake logic to search for the projectedfs
SDK in an additional location.

Reviewed By: strager

Differential Revision: D16907859

fbshipit-source-id: 0df26a675f09a327c01cb0bd1219e479ccd1dfe6
2019-08-28 06:49:30 -07:00
Chad Austin
95fdcd29d5 flip EDEN_WIN_NOMONONOKE to EDEN_HAVE_MONONOKE
Summary: Using a positive meaning rather than a double negative makes the build a tad simpler.

Reviewed By: wez

Differential Revision: D17000782

fbshipit-source-id: ef6c7b64708aa9b1f50c7ad4086c492a90c944f4
2019-08-27 17:04:19 -07:00
Chad Austin
fcb10e77de flip EDEN_WIN_NO_RUST_DATAPACK to EDEN_HAVE_RUST_DATAPACK
Summary: Using a positive meaning rather than a double negative makes the build a tad simpler.

Reviewed By: strager

Differential Revision: D17000620

fbshipit-source-id: ff27eb8098786b8ed6ed1ba81166b51e29e62d47
2019-08-27 17:04:19 -07:00
Chad Austin
fe64ec3874 use fb303 repo in open source build
Summary: Add a dependency from the eden open source build to the fb303 open source build and switch EdenServiceHandler to BaseService.

Reviewed By: simpkins

Differential Revision: D15528156

fbshipit-source-id: 2ca5c31dd9fcc9bac43fd399b27f33b6f2c5ebfc
2019-07-24 21:07:04 -07:00
Adam Simpkins
ab9a840d9e minor cleanup to FindLZ4.cmake
Summary:
Don't print a status message about finding LZ4 twice: one is already printed
by `find_package_handle_standard_args()`.

Also change a few function calls to lower-case to be more consistent with the
rest of our CMake files.

Reviewed By: chadaustin

Differential Revision: D16435455

fbshipit-source-id: bc2c66399823162f93e62d1d0dbdba422fe63b24
2019-07-23 18:38:29 -07:00
Puneet Kaushik
452fbb6f58 Add --edenDir and other command line arguments support to Edenfs on Windows
Summary: We need --edenDir support to run muliple instance of Edenfs, which is required to run the integration tests.

Reviewed By: simpkins

Differential Revision: D15951483

fbshipit-source-id: a516159cdeb5f046f795fc28399a2af5fe8a9f95
2019-06-25 14:16:11 -07:00
Adam Simpkins
c15294c117 update license header in remaining files
Summary: Update the license headers in the remaining Eden files.

Reviewed By: wez

Differential Revision: D15487083

fbshipit-source-id: cea9cc133907eadf5afc069f5d420f686b4c1886
2019-06-19 17:02:46 -07:00
Adam Simpkins
4bc8682391 update license headers in CMake files
Summary:
Update the copyright & license headers in CMake files to reflect the
relicensing to GPLv2

Reviewed By: wez

Differential Revision: D15487079

fbshipit-source-id: 715e559464c19a0070d6e55a095b3fc7d61ad2f8
2019-06-19 17:02:46 -07:00
Chad Austin
8925b1dcb8 remove ThriftCppLibrary.cmake as getdeps provides it
Summary: ThriftCppLibrary.cmake is a duplicate of the getdeps/opensource copy of the file. To avoid issues with keeping them in sync, remove Eden's.

Reviewed By: simpkins

Differential Revision: D15750453

fbshipit-source-id: 7f95d01c4ed6ce3af86f0215ef16b88dc2c61027
2019-06-17 11:10:33 -07:00
Puneet Kaushik
531154d281 Add FindPrjfs to locate Projected FS sdk.
Summary: This is a stop gap solution to get the Windows build working with the getdeps, until we fix the SDK.

Reviewed By: chadaustin

Differential Revision: D15536740

fbshipit-source-id: 77cc6ea80c304a6cfcd0180bb28f63ce4dac2988
2019-05-31 16:16:23 -07:00
Puneet Kaushik
33352a66fe Define EDEN_WIN for Mercurial cdatapack
Summary: scm/hg/lib/clib/portability/mman.h needs EDEN_WIN macro defined to include the correct definition for Eden Windows.

Reviewed By: wez

Differential Revision: D15251101

fbshipit-source-id: 9ecf55f03aac2618398ed4c962d2e210e488b724
2019-05-09 16:33:08 -07:00
Wez Furlong
d0c7e1ccb9 eden: cmake: initial support for running unit tests
Summary:
beholdunittests

This enables some plumbing for running some of the
tests using the gtest/gmock machinery in cmake.

Part of this diff is removing the FindGMock.cmake file from the
eden repo; we now pull this in from the shared cmake library
that is populated by shipit.

Reviewed By: simpkins

Differential Revision: D14993344

fbshipit-source-id: 51caf9518c7f3a083a3b90cda10324c3a8170359
2019-05-03 15:59:45 -07:00
Wez Furlong
12b0708dd8 eden: getdeps: add fb-mercurial dep to enable treemanifest
Summary:
In order to pull in the treemanifest and other libraries
from our mercurial repo, add a manifest file for it, and then
adjust the logic in our cmake module to look for it.

The fb-mercurial manifest just copies the source tree to the
installation dir.  In the future, we could teach it to invoke
the build for real.

Reviewed By: simpkins

Differential Revision: D14969806

fbshipit-source-id: cb270c5003a1c134eeea92c7481a84938f1c5957
2019-05-03 15:59:44 -07:00
Chad Austin
2267e75bda require treemanifest support
Summary: We intend to break support for flatmanifest hg, so require that treemanifest is available in the build.

Reviewed By: wez

Differential Revision: D15057150

fbshipit-source-id: 449399cfb9d018f3b722598091eead1bd5d7c77d
2019-05-02 12:35:21 -07:00
Wez Furlong
cccc64752c eden: add fmt to cmake deps
Summary:
Folly and thrift now require fmt, so we have to probe for it before
we probe for folly.

Reviewed By: chadaustin

Differential Revision: D15165394

fbshipit-source-id: 00d5f0cd5e9421ce0e3a4ea0de850deb4d4b5e3f
2019-05-01 16:10:23 -07:00
Joe Loser
14e791a7dc Don't clobber CXXFLAGS/CMAKE_CXX_FLAGS (#8)
Summary:
- CMake allows the user to add additional compilation options using
  `CXXFLAGS=<flags>` or `-DCMAKE_CXX_FLAGS=<flags>`.
- Eden clobbers these CMAKE_CXX_FLAGS for both debug and release modes
  which prevents the user from passing additional flags.
- Teach Eden to respect user-supplied compiler flags instead of simply
  overriding them.
Pull Request resolved: https://github.com/facebookexperimental/eden/pull/8

Reviewed By: simpkins

Differential Revision: D14481846

Pulled By: wez

fbshipit-source-id: 4d2034ddb4f9b781dde603a140c4d199eb0ad7d6
2019-05-01 10:15:09 -07:00
Wez Furlong
de7f624497 eden: cmake: fixup adding libgit2 options to target
Summary:
`target_link_libraries` only allows passing things that
are libraries and expressly forbids passing in `-framework Foo`,
which is the sort of thing we get back from pkg-config on macos.
The result of misusing this is that cmake would add `["-framework", "-lFoo"]`
to the argv for the linker, which is totally broken.

Instead, we should use `target_link_options`.

Unfortunately, cmake seems to fail to do the right thing with the
` -framework CoreFoundation -framework Security` flags returned
from libgit2 on my system even using `target_link_options`; it somehow
ends up with a bare `Security` and fails to link.  meh.

Reviewed By: strager

Differential Revision: D14680672

fbshipit-source-id: 62f65ddb4d07c8194cfc453cef1349b01be6c8b3
2019-03-29 15:02:04 -07:00
Wez Furlong
f8099e5129 eden: cmake fixup include directories and deps
Summary:
While testing out the new getdeps code I found that none
of the include directories from the probed libraries were being used.

The new getdeps installs each dep into its own prefix, whereas the
existing getdeps script installed them into the installation
prefix for eden itself.  That meant that they were being implicitly
found from a single include directory.

In addition to this, I encountered linker failures for the pretty
printers; the solution to those was to add appropriate deps for
the modules that depend upon the pretty printers.

Reviewed By: pkaush

Differential Revision: D14638758

fbshipit-source-id: a4c2b4c79603c268e1b1c707a05c3cb0e3f2757b
2019-03-28 20:57:17 -07:00
Zeyi Fan
21a6606e1f Add MononokeCurlBackingStore
Summary: This diff add a MononokeBackingStore implemented based on libcurl so we could add Mononoke support on macOS.

Reviewed By: chadaustin

Differential Revision: D14096313

fbshipit-source-id: 2bcb0c49002dcbb0a0190ba505a6e814e74db747
2019-03-11 14:34:08 -07:00
Matt Glazar
49f4c37b67 Add missing copyright notices
Summary: Internal Facebook infrastructure is nagging me about some files not having a Facebook copyright notice. Add a notice to these files to make the nagging stop.

Reviewed By: simpkins

Differential Revision: D14173944

fbshipit-source-id: 7234431224fcf4f86ea56ca2f9108f47ef959d87
2019-03-07 19:32:39 -08:00
Wez Furlong
63d868548f eden: reinstate treemanifest support on macos
Summary:
This got lost partly because the symlink/shipit bit
was a manual step when I did this first time around, and partly
because the mercurial code got refactored.

Restoring treemanifest restores `hg up` performance to saner
levels.

This is fairly straightforward, but now that we have !wez building this we've
found that my machine had lz4 installed in the default include path and that we
need to probe and find the correct one, so that is part of this diff also.

Reviewed By: simpkins

Differential Revision: D14078886

fbshipit-source-id: 971cd49757bbb7dcc484439e6d896698598a583b
2019-02-14 22:27:00 -08:00
Wez Furlong
1752348eef eden: wire up mac contbuild
Summary:
Make `build-oss.sh` actually run the cmake build.
At the moment this is only run from nbtd for mac platforms,
so that is all that I've tested with it.

This is similar to the the equivalent scripts for watchman.
In a later diff we can centralize and clean up the duplication.

Reviewed By: simpkins

Differential Revision: D13910031

fbshipit-source-id: 6a7250c22033e913d999cf928fed27dada0647ef
2019-02-05 21:52:30 -08:00
Wez Furlong
a545acbbd4 eden: add C datapack/treemanifest to cmake build
Summary:
This requires our mercurial repo to be available during
the build; I symlink it in alongside `common` in the `oss` dir,
and point it up to `scm/hg`.

This has partial support for mononoke too, but will need to add
logic to getdeps to pull down the proxygen repo and build that.

Reviewed By: simpkins

Differential Revision: D13480146

fbshipit-source-id: 54874245015af83a259f56944d2e5f87615baee7
2019-01-17 18:52:53 -08:00
Wez Furlong
d235a744ab eden: compiler settings tweaks for oss build
Summary:
There are some features of folly futures that are
currently being deprecated.  Until that codemod lands, deprecation
warnings have been disabled in the buck build.  To avoid
swamping the build output in the oss build, let's also turn
them off for cmake.

Reviewed By: strager

Differential Revision: D13686585

fbshipit-source-id: 14609a882bc78b7b31beb7ae02d762b9318e1312
2019-01-16 14:40:20 -08:00
Wez Furlong
98d551fe96 eden: pull in glog::glog in order to satisfy folly cmake deps
Summary:
This is necessary because the folly installed cmake config
advertises that it requires glog::glog but doesn't specify how to
find it.

See also D13482288

Reviewed By: simpkins

Differential Revision: D13486767

fbshipit-source-id: 0713ae70a1863fc23a5e86c21e8f72e3ba9e4ed2
2019-01-15 14:14:32 -08:00
Wez Furlong
1b5709f273 eden: fixup cmake defines for some optional features
Summary:
a couple of parts of the rust, datapack and mononoke code
didn't have appropriate definitions.

Allow `useDatapackGetBlob_` to be default initialized per its
definition in the header file rather than replicating the relatively
complex ifdef logic in the implementation.

Reviewed By: strager

Differential Revision: D13475710

fbshipit-source-id: d2955c9b22f1186f5897aa8bdbd9046b8f6b5f7a
2018-12-17 20:16:19 -08:00
Adam Simpkins
5d369296e8 cmake: compile with -std=gnu++1z
Summary:
Tell the compiler that we want to enable C++17 features.
This is required in order to use `std::is_default_constructible_v`, and it
prevents the compiler from warning about structured binding declarations.

Reviewed By: chadaustin, strager

Differential Revision: D10503904

fbshipit-source-id: 8fc521abdb261c787eabb3908bf7d4c2c8e46f2b
2018-10-23 13:42:12 -07:00
Adam Simpkins
1b4ecb3ed4 update the CMake based build with new dependencies
Summary:
Our CMake-based build had gotten somewhat out of date.  This fixes several
issues that were preventing it from building:
- wangle now depends on fizz, which in turn depends on libsodium
- fbthrift now depends on yarpl for the streaming functionality
- Eden now depends on libsqlite3
- The eden/fs/inode library now depends on eden/fs/config

Reviewed By: strager

Differential Revision: D10436531

fbshipit-source-id: f41065da2edb909e8eb94e03d0e62ae19ad3a84f
2018-10-23 13:42:12 -07:00
Matt Glazar
34eeb349ae Add opt-in for experimental systemd mode
Summary:
To ease the migration from the current custom daemon setup to a systemd-managed daemon, add a way to enable the to-be-implemented systemd behavior.

* To the edenfs daemon, support the --experimentalSystemd option.
* To the Eden CLI, support the EDEN_EXPERIMENTAL_SYSTEMD environment variable. When set, invoke the edenfs daemon with --experimentalSystemd.

Aside from adding a log message, this diff does not change any behavior. This diff just sets up scaffolding for future diffs.

Reviewed By: simpkins

Differential Revision: D10248055

fbshipit-source-id: 30ca5a4bfde00ff43fd6f2a5d0282ced4f177fed
2018-10-22 20:27:25 -07:00
Yedidya Feldblum
45b6f1e59f Rename generated client source file
Summary: [Thrift] Rename generated client source file for consistency with the recently-added header. The new generated client source file is `{Service}AsyncClient.cpp`.

Reviewed By: stevegury

Differential Revision: D9174822

fbshipit-source-id: 49a050a96d3f583fdb5ad56545ca4a16d31605d7
2018-08-07 17:22:13 -07:00
Jun Wu
fae2056037 do not require SELinux in GitHub build
Summary:
I tried to build eden using GitHub version and ran into SELinux issues.
This patch fixed related issues, namely:

- `set(X Y)` sets X to string literal Y. Change it to `set(X ${Y})`.
- `SELINUX_INCLUDE_DIR` could be undefined. Check before use it.
- `./eden/fs/eden-config.h` and `./build/eden/fs/eden-config.h` both exist and
  the former is used. Set include dirs so the latter gets used.

Reviewed By: bolinfest

Differential Revision: D9029272

fbshipit-source-id: 0c94bbe2f9e3fa90973802ddde16ad4d9ddfc0e8
2018-07-27 13:22:57 -07:00
Adam Simpkins
dea514bbef add CMake build files
Summary: Add CMakeFiles to build Eden.

Reviewed By: wez

Differential Revision: D7479587

fbshipit-source-id: 7e0b4a756005dadc3af5c13c36ce22d1dcc15071
2018-04-30 14:37:46 -07:00