Commit 003da387 authored by Wez Furlong's avatar Wez Furlong Committed by Facebook Github Bot

fbcode_builder: add manifest files for some dependencies

Summary:
These are ported over from the logic in the watchman and eden getdeps
scripts, with additions to help bootstrap a build environment.

These are sufficient to build watchman with thrift support on windows, mac and
linux, and eden on mac and linux when combined with the getdeps code that
follows in later diffs in this stack.

Reviewed By: simpkins

Differential Revision: D14691005

fbshipit-source-id: 7f8b02fedcdc020e2d0e758c466959d8161d4587
parent e139393e
...@@ -10,6 +10,8 @@ from __future__ import absolute_import, division, print_function, unicode_litera ...@@ -10,6 +10,8 @@ from __future__ import absolute_import, division, print_function, unicode_litera
import unittest import unittest
import pkg_resources
from ..manifest import ManifestParser from ..manifest import ManifestParser
...@@ -203,3 +205,13 @@ foo = bar ...@@ -203,3 +205,13 @@ foo = bar
{"foo": "bar"}, {"foo": "bar"},
msg="sections cascade in the order they appear in the manifest", msg="sections cascade in the order they appear in the manifest",
) )
def test_parse_common_manifests(self):
n = 0
for name in pkg_resources.resource_listdir(__name__, "manifests"):
contents = pkg_resources.resource_string(
__name__, "manifests/%s" % name
).decode("utf8")
ManifestParser(file_name=name, fp=contents)
n += 1
self.assertTrue(n > 0, msg="parsed some number of manifests")
[manifest]
name = autoconf
[download]
url = http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
sha256 = 954bd69b391edc12d6a4a51a2dd1476543da5c6bbf05a95b59dc0dd6fd4c2969
[build]
builder = autoconf
subdir = autoconf-2.69
[manifest]
name = automake
[download]
url = http://ftp.gnu.org/gnu/automake/automake-1.16.1.tar.gz
sha256 = 608a97523f97db32f1f5d5615c98ca69326ced2054c9f82e65bade7fc4c9dea8
[build]
builder = autoconf
subdir = automake-1.16.1
[dependencies]
autoconf
[manifest]
name = bison
[download.not(os=windows)]
url = https://mirrors.kernel.org/gnu/bison/bison-3.3.tar.gz
sha256 = fdeafb7fffade05604a61e66b8c040af4b2b5cbb1021dcfe498ed657ac970efd
[download.os=windows]
url = https://github.com/lexxmark/winflexbison/releases/download/v2.5.17/winflexbison-2.5.17.zip
sha256 = 3dc27a16c21b717bcc5de8590b564d4392a0b8577170c058729d067d95ded825
[build.not(os=windows)]
builder = autoconf
subdir = bison-3.3
[build.os=windows]
builder = nop
[install.files.os=windows]
data = bin/data
win_bison.exe = bin/bison.exe
win_flex.exe = bin/flex.exe
[manifest]
name = boost
[download.not(os=windows)]
url = https://dl.bintray.com/boostorg/release/1.69.0/source/boost_1_69_0.tar.bz2
sha256 = 8f32d4617390d1c2d16f26a27ab60d97807b35440d45891fa340fc2648b04406
[download.os=windows]
url = https://dl.bintray.com/boostorg/release/1.69.0/source/boost_1_69_0.zip
sha256 = d074bcbcc0501c4917b965fc890e303ee70d8b01ff5712bae4a6c54f2b6b4e52
[build]
builder = boost
[manifest]
name = cmake
[dependencies]
ninja
[download.os=windows]
url = https://github.com/Kitware/CMake/releases/download/v3.14.0/cmake-3.14.0-win64-x64.zip
sha256 = 40e8140d68120378262322bbc8c261db8d184d7838423b2e5bf688a6209d3807
[download.os=darwin]
url = https://github.com/Kitware/CMake/releases/download/v3.14.0/cmake-3.14.0-Darwin-x86_64.tar.gz
sha256 = a02ad0d5b955dfad54c095bd7e937eafbbbfe8a99860107025cc442290a3e903
[download.os=linux]
url = https://github.com/Kitware/CMake/releases/download/v3.14.0/cmake-3.14.0-Linux-x86_64.tar.gz
sha256 = 91dc9af7345e458eb10c853aa875e591efb7079a045641685ddec8d973c2b2bc
[build.os=windows]
builder = nop
subdir = cmake-3.14.0-win64-x64
[build.os=darwin]
builder = nop
subdir = cmake-3.14.0-Darwin-x86_64
[install.files.os=darwin]
CMake.app/Contents/bin = bin
CMake.app/Contents/share = share
[build.os=linux]
builder = nop
subdir = cmake-3.14.0-Linux-x86_64
[manifest]
name = cpptoml
[download]
url = https://github.com/skystrife/cpptoml/archive/v0.1.1.tar.gz
sha256 = 23af72468cfd4040984d46a0dd2a609538579c78ddc429d6b8fd7a10a6e24403
[build]
builder = cmake
subdir = cpptoml-0.1.1
[manifest]
name = double-conversion
[download]
url = https://github.com/google/double-conversion/archive/v3.1.4.tar.gz
sha256 = 95004b65e43fefc6100f337a25da27bb99b9ef8d4071a36a33b5e83eb1f82021
[build]
builder = cmake
subdir = double-conversion-3.1.4
[manifest]
name = eden
fbsource_path = fbcode/eden
shipit_project = eden
shipit_fbcode_builder = true
[git]
repo_url = https://github.com/facebookexperimental/eden.git
[build]
builder = cmake
[dependencies]
googletest
folly
fbthrift
cpptoml
rocksdb
libgit2
# macOS ships with sqlite3, and some of the core system
# frameworks require that that version be linked rather
# than the one we might build for ourselves here, so we
# skip building it on macos.
[dependencies.not(os=darwin)]
sqlite3
[dependencies.os=darwin]
osxfuse
[shipit.pathmap]
fbcode/eden/oss = .
fbcode/eden = eden
fbcode/fboss/common = common
[shipit.strip]
^fbcode/eden/fs/eden-config\.h$
^fbcode/eden/hg/.*$
[manifest]
name = fbthrift
fbsource_path = fbcode/thrift
shipit_project = fbthrift
shipit_fbcode_builder = true
[git]
repo_url = https://github.com/facebook/fbthrift.git
[build]
builder = cmake
[dependencies]
folly
wangle
rsocket-cpp
mstch
fizz
fmt
libsodium
googletest
zstd
[dependencies.any(os=windows, os=darwin)]
bison
[shipit.pathmap]
fbcode/thrift/public_tld = .
fbcode/thrift = thrift
[shipit.strip]
^fbcode/thrift/thrift-config\.h$
^fbcode/thrift/perf/canary.py$
^fbcode/thrift/perf/loadtest.py$
[manifest]
name = fizz
fbsource_path = fbcode/fizz
shipit_project = fizz
[git]
repo_url = https://github.com/facebookincubator/fizz.git
[build]
builder = cmake
subdir = fizz
[cmake.defines]
BUILD_EXAMPLES = OFF
BUILD_TESTS = OFF
[dependencies]
folly
libsodium
[shipit.pathmap]
fbcode/fizz/public_tld = .
fbcode/fizz = fizz
[manifest]
name = fmt
[download]
url = https://github.com/fmtlib/fmt/archive/5.3.0.tar.gz
sha256 = defa24a9af4c622a7134076602070b45721a43c51598c8456ec6f2c4dbb51c89
[build]
builder = cmake
subdir = fmt-5.3.0
[cmake.defines]
FMT_TEST = OFF
FMT_DOC = OFF
[manifest]
name = folly
fbsource_path = fbcode/folly
shipit_project = folly
shipit_fbcode_builder = true
[git]
repo_url = https://github.com/facebook/folly.git
[build]
builder = cmake
[dependencies]
gflags
glog
googletest
boost
libevent
double-conversion
fmt
snappy
zstd
# no openssl or zlib in the linux case, why?
# these are usually installed on the system
# and are the easiest system deps to pull in.
# In the future we want to be able to express
# that a system dep is sufficient in the manifest
# for eg: openssl and zlib, but for now we don't
# have it.
# macOS doesn't expose the openssl api so we need
# to build our own.
[dependencies.os=darwin]
openssl
# Windows has neither openssl nor zlib, so we get
# to provide both
[dependencies.os=windows]
openssl
zlib
[shipit.pathmap]
fbcode/folly/public_tld = .
fbcode/folly = folly
[shipit.strip]
^fbcode/folly/folly-config\.h$
^fbcode/folly/public_tld/build/facebook_.*
[cmake.defines]
BUILD_SHARED_LIBS=OFF
[manifest]
name = gflags
[download]
url = https://github.com/gflags/gflags/archive/v2.2.2.tar.gz
sha256 = 34af2f15cf7367513b352bdcd2493ab14ce43692d2dcd9dfc499492966c64dcf
[build]
builder = cmake
subdir = gflags-2.2.2
[cmake.defines]
BUILD_SHARED_LIBS = ON
BUILD_STATIC_LIBS = ON
#BUILD_gflags_nothreads_LIB = OFF
BUILD_gflags_LIB = ON
[manifest]
name = glog
[download]
url = https://github.com/google/glog/archive/v0.4.0.tar.gz
sha256 = f28359aeba12f30d73d9e4711ef356dc842886968112162bc73002645139c39c
[build]
builder = cmake
subdir = glog-0.4.0
[dependencies]
gflags
[cmake.defines]
BUILD_SHARED_LIBS=ON
[manifest]
name = googletest
[download]
url = https://github.com/google/googletest/archive/release-1.8.1.tar.gz
sha256 = 9bf1fe5182a604b4135edc1a425ae356c9ad15e9b23f9f12a02e80184c3a249c
[build]
builder = cmake
subdir = googletest-release-1.8.1
[cmake.defines]
# Everything else defaults to the shared runtime, so tell gtest that
# it should not use its choice of the static runtime
gtest_force_shared_crt=ON
[cmake.defines.os=windows]
BUILD_SHARED_LIBS=ON
[manifest]
name = libevent
# Note that the CMakeLists.txt file is present only in
# git repo and not in the release tarball, so take care
# to use the github generated source tarball rather than
# the explicitly uploaded source tarball
[download]
url = https://github.com/libevent/libevent/archive/release-2.1.8-stable.tar.gz
sha256 = 316ddb401745ac5d222d7c529ef1eada12f58f6376a66c1118eee803cb70f83d
[build]
builder = cmake
subdir = libevent-release-2.1.8-stable
[cmake.defines]
EVENT__DISABLE_TESTS = ON
EVENT__DISABLE_BENCHMARK = ON
EVENT__DISABLE_SAMPLES = ON
EVENT__DISABLE_REGRESS = ON
[dependencies.os=windows]
openssl
[manifest]
name = libgit2
[download]
url = https://github.com/libgit2/libgit2/archive/v0.28.1.tar.gz
sha256 = 0ca11048795b0d6338f2e57717370208c2c97ad66c6d5eac0c97a8827d13936b
[build]
builder = cmake
subdir = libgit2-0.28.1
[cmake.defines]
# Could turn this on if we also wanted to add a manifest for libssh2
USE_SSH = OFF
BUILD_CLAR = OFF
# Have to build shared to work around annoying problems with cmake
# mis-parsing the frameworks required to link this on macos :-/
BUILD_SHARED_LIBS = ON
[manifest]
name = libsodium
[download.not(os=windows)]
url = https://github.com/jedisct1/libsodium/releases/download/1.0.17/libsodium-1.0.17.tar.gz
sha256 = 0cc3dae33e642cc187b5ceb467e0ad0e1b51dcba577de1190e9ffa17766ac2b1
[build.not(os=windows)]
builder = autoconf
subdir = libsodium-1.0.17
[download.os=windows]
url = https://download.libsodium.org/libsodium/releases/libsodium-1.0.17-msvc.zip
sha256 = f0f32ad8ebd76eee99bb039f843f583f2babca5288a8c26a7261db9694c11467
[build.os=windows]
builder = nop
[install.files.os=windows]
x64/Release/v141/dynamic/libsodium.dll = bin/libsodium.dll
x64/Release/v141/dynamic/libsodium.lib = lib/libsodium.lib
x64/Release/v141/dynamic/libsodium.exp = lib/libsodium.exp
x64/Release/v141/dynamic/libsodium.pdb = lib/libsodium.pdb
include = include
[autoconf.args]
[manifest]
name = libtool
[download]
url = http://ftp.gnu.org/gnu/libtool/libtool-2.4.6.tar.gz
sha256 = e3bd4d5d3d025a36c21dd6af7ea818a2afcd4dfc1ea5a17b39d7854bcd0c06e3
[build]
builder = autoconf
subdir = libtool-2.4.6
[dependencies]
automake
[autoconf.args]
--enable-ltdl-install
[manifest]
name = mstch
[download]
url = https://github.com/no1msd/mstch/archive/1.0.2.tar.gz
sha256 = 811ed61400d4e9d4f9ae0f7679a2ffd590f0b3c06b16f2798e1f89ab917cba6c
[build]
builder = cmake
subdir = mstch-1.0.2
[dependencies]
boost
[manifest]
name = ninja
[download.os=windows]
url = https://github.com/ninja-build/ninja/releases/download/v1.9.0/ninja-win.zip
sha256 = 2d70010633ddaacc3af4ffbd21e22fae90d158674a09e132e06424ba3ab036e9
[build.not(os=linux)]
builder = nop
[install.files.os=windows]
ninja.exe = bin/ninja.exe
[download.os=darwin]
url = https://github.com/ninja-build/ninja/releases/download/v1.9.0/ninja-mac.zip
sha256 = 26d32a79f786cca1004750f59e545199bf110e21e300d3c2424c1fddd78f28ab
[download.os=linux]
url = https://github.com/ninja-build/ninja/archive/v1.9.0.tar.gz
sha256 = 5d7ec75828f8d3fd1a0c2f31b5b0cea780cdfe1031359228c428c1a48bfcd5b9
[install.files.os=darwin]
ninja = bin/ninja
[build.os=linux]
builder = ninja_bootstrap
subdir = ninja-1.9.0
[manifest]
name = openssl
[download]
url = https://www.openssl.org/source/openssl-1.1.1b.tar.gz
sha256 = 5c557b023230413dfb0756f3137a13e6d726838ccd1430888ad15bfb2b43ea4b
[build]
builder = openssl
subdir = openssl-1.1.1b
[dependencies.os=windows]
perl
[manifest]
name = osxfuse
[download]
url = https://github.com/osxfuse/osxfuse/archive/osxfuse-3.8.3.tar.gz
sha256 = 93bab6731bdfe8dc1ef069483437270ce7fe5a370f933d40d8d0ef09ba846c0c
[build]
builder = nop
[install.files]
osxfuse-osxfuse-3.8.3/common = include
[manifest]
name = pcre
[download]
url = https://ftp.pcre.org/pub/pcre/pcre-8.43.tar.gz
sha256 = 0b8e7465dc5e98c757cc3650a20a7843ee4c3edf50aaf60bb33fd879690d2c73
[build]
builder = cmake
subdir = pcre-8.43
[manifest]
name = perl
[download.os=windows]
url = http://strawberryperl.com/download/5.28.1.1/strawberry-perl-5.28.1.1-64bit-portable.zip
sha256 = 935c95ba096fa11c4e1b5188732e3832d330a2a79e9882ab7ba8460ddbca810d
[build.os=windows]
builder = nop
subdir = perl
[manifest]
name = rocksdb
[download]
url = https://github.com/facebook/rocksdb/archive/v5.18.3.tar.gz
sha256 = 7fb6738263d3f2b360d7468cf2ebe333f3109f3ba1ff80115abd145d75287254
[dependencies]
snappy
[build]
builder = cmake
subdir = rocksdb-5.18.3
[cmake.defines]
WITH_SNAPPY=ON
WITH_TESTS=OFF
# We get relocation errors with the static gflags lib,
# and there's no clear way to make it pick the shared gflags
# so just turn it off.
WITH_GFLAGS=OFF
# mac pro machines don't have some of the newer features that
# rocksdb enables by default; ask it to disable their use even
# when building on new hardware
PORTABLE = ON
[cmake.defines.os=windows]
ROCKSDB_INSTALL_ON_WINDOWS=ON
# RocksDB hard codes the paths to the snappy libs to something
# that doesn't exist; ignoring the usual cmake rules. As a result,
# we can't build it with snappy without either patching rocksdb or
# without introducing more complex logic to the build system to
# connect the snappy build outputs to rocksdb's custom logic here.
# Let's just turn it off on windows.
WITH_SNAPPY=OFF
[manifest]
name = rsocket-cpp
fbsource_path = fbcode/rsocket
shipit_project = rsocket-cpp
shipit_fbcode_builder = true
[git]
repo_url = https://github.com/rsocket/rsocket-cpp.git
[build]
builder = cmake
[cmake.defines]
BUILD_EXAMPLES = OFF
BUILD_BENCHMARKS = OFF
BUILD_TESTS = OFF
[dependencies]
googletest
folly
[shipit.pathmap]
fbcode/rsocket/public_tld = .
fbcode/rsocket = rsocket
fbcode/yarpl = yarpl
[manifest]
name = snappy
[download]
url = https://github.com/google/snappy/archive/1.1.7.tar.gz
sha256 = 3dfa02e873ff51a11ee02b9ca391807f0c8ea0529a4924afa645fbf97163f9d4
[build]
builder = cmake
subdir = snappy-1.1.7
[cmake.defines]
SNAPPY_BUILD_TESTS = OFF
# Avoid problems like `relocation R_X86_64_PC32 against symbol` on ELF systems
# when linking rocksdb, which builds PIC even when building a static lib
[cmake.defines.os=linux]
BUILD_SHARED_LIBS = ON
[manifest]
name = sqlite3
[download]
url = https://sqlite.org/2019/sqlite-autoconf-3270200.tar.gz
sha256 = 50c39e85ea28b5ecfdb3f9e860afe9ba606381e21836b2849efca6a0bfe6ef6e
[build]
builder = autoconf
subdir = sqlite-autoconf-3270200
[manifest]
name = wangle
fbsource_path = fbcode/wangle
shipit_project = wangle
shipit_fbcode_builder = true
[git]
repo_url = https://github.com/facebook/wangle.git
[build]
builder = cmake
subdir = wangle
[cmake.defines]
BUILD_TESTS = OFF
[dependencies]
folly
googletest
fizz
[shipit.pathmap]
fbcode/wangle/public_tld = .
fbcode/wangle = wangle
[manifest]
name = watchman
fbsource_path = fbcode/watchman
shipit_project = watchman
shipit_fbcode_builder = true
[git]
repo_url = https://github.com/facebook/watchman.git
[build]
builder = cmake
[dependencies]
boost
folly
fbthrift
pcre
[shipit.pathmap]
fbcode/watchman = .
fbcode/fboss/common = common
fbcode/eden/fs/service = eden/fs/service
[shipit.strip]
^fbcode/eden/fs/service/(?!.*\.thrift|shipit_test_file\.txt)
[manifest]
name = zlib
[download]
url = http://www.zlib.net/zlib-1.2.11.tar.gz
sha256 = c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1
[build.os=windows]
builder = cmake
subdir = zlib-1.2.11
[manifest]
name = zstd
[git]
repo_url = https://github.com/facebook/zstd.git
rev = v1.3.8
[build]
builder = cmake
subdir = build/cmake
# The zstd cmake build explicitly sets the install name
# for the shared library in such a way that cmake discards
# the path to the library from the install_name, rendering
# the library non-resolvable during the build. The short
# term solution for this is just to link static on macos.
[cmake.defines.os=darwin]
ZSTD_BUILD_SHARED = OFF
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment