1
0
mirror of https://github.com/facebook/proxygen.git synced 2025-08-05 19:55:47 +03:00

fbcode_builder: getdeps: fboss: add iproute2 fetcher

Summary:
This is towards getting open source FBOSS to build using fbcode_builder.
iproute2 is one of the dependencies for FBOSS. This patch adds a manifest file
to build the specific version of iproute2 needed for FBOSS.

Additionally, the default git clone depth of 100 is insufficient for the
version of iproute2 FBOSS depends on. Thus, this patch extends the git SCHEMA
to add optional argument depth. The default remains 100.

The usual /configure --prefix does not work for iproute2. Thus, we need to add
a custom builder that:
  - copies sources to build directory, builds, and
  - installs to installed directory using DEST_DIR.
  - it must also explicitly copy include from build dir to install dir

Reviewed By: wez

Differential Revision: D15588809

fbshipit-source-id: ac5eab24134e078d88b85b4be433c78b05ef8ce5
This commit is contained in:
Shrikrishna Khare
2019-06-05 15:15:45 -07:00
committed by Facebook Github Bot
parent 5ec5fbb285
commit 199e1eb3a0
4 changed files with 69 additions and 4 deletions

View File

@@ -131,7 +131,9 @@ class Fetcher(object):
class GitFetcher(Fetcher):
def __init__(self, build_options, manifest, repo_url, rev):
DEFAULT_DEPTH = 100
def __init__(self, build_options, manifest, repo_url, rev, depth):
# Extract the host/path portions of the URL and generate a flattened
# directory name. eg:
# github.com/facebook/folly.git -> github.com-facebook-folly.git
@@ -163,6 +165,7 @@ class GitFetcher(Fetcher):
self.rev = rev or "master"
self.origin_repo = repo_url
self.manifest = manifest
self.depth = depth if depth else GitFetcher.DEFAULT_DEPTH
def _update(self):
current_hash = (
@@ -209,7 +212,7 @@ class GitFetcher(Fetcher):
[
"git",
"clone",
"--depth=100",
"--depth=" + str(self.depth),
"--",
self.origin_repo,
os.path.basename(self.repo_dir),