Skip to content

Commit

Permalink
Support of Arch Linux in getdeps.py
Browse files Browse the repository at this point in the history
Summary:
X-link: facebookincubator/zstrong#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:  facebook/folly#1701

X-link: facebook/folly#1702

Reviewed By: yfeldblum

Differential Revision: D33514769

Pulled By: Orvid

fbshipit-source-id: a081c3a5bcb7f7cdde3a4a91c0d15517c0a171b3
  • Loading branch information
beryll1um authored and facebook-github-bot committed Jul 15, 2024
1 parent 71a4b29 commit 6efab05
Show file tree
Hide file tree
Showing 29 changed files with 88 additions and 2 deletions.
7 changes: 5 additions & 2 deletions build/fbcode_builder/getdeps.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ def setup_project_cmd_parser(self, parser):
parser.add_argument(
"--os-type",
help="Filter to just this OS type to run",
choices=["linux", "darwin", "windows"],
choices=["linux", "darwin", "windows", "pacman-package"],
action="store",
dest="ostype",
default=None,
Expand Down Expand Up @@ -440,7 +440,10 @@ def run_project_cmd(self, args, loader, manifest):
packages = sorted(set(all_packages["homebrew"]))
if packages:
cmd_args = ["brew", "install"] + packages

elif manager == "pacman-package":
packages = sorted(list(set(all_packages["pacman-package"])))
if packages:
cmd_args = ["pacman", "-S"] + packages
else:
host_tuple = loader.build_opts.host_type.as_tuple_string()
print(
Expand Down
3 changes: 3 additions & 0 deletions build/fbcode_builder/getdeps/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
"rpms": {"optional_section": True},
"debs": {"optional_section": True},
"homebrew": {"optional_section": True},
"pps": {"optional_section": True},
"preinstalled.env": {"optional_section": True},
"bootstrap.args": {"optional_section": True},
"b2.args": {"optional_section": True},
Expand Down Expand Up @@ -132,6 +133,7 @@
"shipit.strip",
"homebrew",
"github.actions",
"pps",
]


Expand Down Expand Up @@ -379,6 +381,7 @@ def get_required_system_packages(self, ctx):
"rpm": self.get_section_as_args("rpms", ctx),
"deb": self.get_section_as_args("debs", ctx),
"homebrew": self.get_section_as_args("homebrew", ctx),
"pacman-package": self.get_section_as_args("pps", ctx),
}

def _is_satisfied_by_preinstalled_environment(self, ctx):
Expand Down
2 changes: 2 additions & 0 deletions build/fbcode_builder/getdeps/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,8 @@ def get_package_manager(self):
return "rpm"
if self.distro.startswith(("debian", "ubuntu", "pop!_os", "mint")):
return "deb"
if self.distro == "arch":
return "pacman-package"
return None

@staticmethod
Expand Down
3 changes: 3 additions & 0 deletions build/fbcode_builder/manifests/autoconf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ autoconf
[rpms]
autoconf

[pps]
autoconf

[download]
url = http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
sha256 = 954bd69b391edc12d6a4a51a2dd1476543da5c6bbf05a95b59dc0dd6fd4c2969
Expand Down
3 changes: 3 additions & 0 deletions build/fbcode_builder/manifests/automake
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ automake
[rpms]
automake

[pps]
automake

[download]
url = http://ftp.gnu.org/gnu/automake/automake-1.16.1.tar.gz
sha256 = 608a97523f97db32f1f5d5615c98ca69326ced2054c9f82e65bade7fc4c9dea8
Expand Down
3 changes: 3 additions & 0 deletions build/fbcode_builder/manifests/boost
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ boost
# Boost cmake detection on homebrew adds this as requirement: https://github.com/Homebrew/homebrew-core/issues/67427#issuecomment-754187345
icu4c

[pps]
boost

[rpms.all(distro=centos_stream,distro_vers=8)]
boost169
boost169-math
Expand Down
3 changes: 3 additions & 0 deletions build/fbcode_builder/manifests/cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ cmake
[rpms]
cmake

[pps]
cmake

[dependencies]
ninja

Expand Down
3 changes: 3 additions & 0 deletions build/fbcode_builder/manifests/double-conversion
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ libdouble-conversion-dev
double-conversion
double-conversion-devel

[pps]
double-conversion

[build]
builder = cmake
subdir = double-conversion-3.1.4
3 changes: 3 additions & 0 deletions build/fbcode_builder/manifests/libcurl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ libcurl
[debs]
libcurl4-openssl-dev

[pps]
libcurl-gnutls

[download]
url = https://curl.haxx.se/download/curl-7.65.1.tar.gz
sha256 = 821aeb78421375f70e55381c9ad2474bf279fc454b791b7e95fc83562951c690
Expand Down
3 changes: 3 additions & 0 deletions build/fbcode_builder/manifests/libelf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ elfutils-libelf-devel-static
[debs]
libelf-dev

[pps]
libelf

[download]
url = https://ftp.osuosl.org/pub/blfs/conglomeration/libelf/libelf-0.8.13.tar.gz
sha256 = 591a9b4ec81c1f2042a97aa60564e0cb79d041c52faa7416acb38bc95bd2c76d
Expand Down
3 changes: 3 additions & 0 deletions build/fbcode_builder/manifests/libevent
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ libevent
[rpms]
libevent-devel

[pps]
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
Expand Down
3 changes: 3 additions & 0 deletions build/fbcode_builder/manifests/libffi
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ libffi
libffi-devel
libffi

[pps]
libffi

[download]
url = https://github.com/libffi/libffi/releases/download/v3.4.2/libffi-3.4.2.tar.gz
sha256 = 540fb721619a6aba3bdeef7d940d8e9e0e6d2c193595bc243241b77ff9e93620
Expand Down
3 changes: 3 additions & 0 deletions build/fbcode_builder/manifests/libgit2
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ libgit2
[rpms]
libgit2-devel

[pps]
libgit2

# Ubuntu 18.04 libgit2 has clash with libcurl4-openssl-dev as it depends on
# libcurl4-gnutls-dev. Should be ok from 20.04 again
# There is a description at https://github.com/r-hub/sysreqsdb/issues/77
Expand Down
3 changes: 3 additions & 0 deletions build/fbcode_builder/manifests/libmnl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ libmnl-static
[debs]
libmnl-dev

[pps]
libmnl

[download]
url = http://www.netfilter.org/pub/libmnl/libmnl-1.0.4.tar.bz2
sha256 = 171f89699f286a5854b72b91d06e8f8e3683064c5901fb09d954a9ab6f551f81
Expand Down
3 changes: 3 additions & 0 deletions build/fbcode_builder/manifests/libnl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ libnl3
libnl-3-dev
libnl-route-3-dev

[pps]
libnl

[download]
url = https://www.infradead.org/~tgr/libnl/files/libnl-3.2.25.tar.gz
sha256 = 8beb7590674957b931de6b7f81c530b85dc7c1ad8fbda015398bc1e8d1ce8ec5
Expand Down
3 changes: 3 additions & 0 deletions build/fbcode_builder/manifests/libsodium
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ libsodium
libsodium-devel
libsodium-static

[pps]
libsodium

[download.not(os=windows)]
url = https://github.com/jedisct1/libsodium/releases/download/1.0.20-RELEASE/libsodium-1.0.20.tar.gz
sha256 = ebb65ef6ca439333c2bb41a0c1990587288da07f6c7fd07cb3a18cc18d30ce19
Expand Down
3 changes: 3 additions & 0 deletions build/fbcode_builder/manifests/libtool
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ libtool
[debs]
libtool

[pps]
libtool

[download]
url = http://ftp.gnu.org/gnu/libtool/libtool-2.4.6.tar.gz
sha256 = e3bd4d5d3d025a36c21dd6af7ea818a2afcd4dfc1ea5a17b39d7854bcd0c06e3
Expand Down
3 changes: 3 additions & 0 deletions build/fbcode_builder/manifests/libusb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ libusb
libusb-devel
libusb

[pps]
libusb

[download]
url = https://github.com/libusb/libusb/releases/download/v1.0.22/libusb-1.0.22.tar.bz2
sha256 = 75aeb9d59a4fdb800d329a545c2e6799f732362193b465ea198f2aa275518157
Expand Down
3 changes: 3 additions & 0 deletions build/fbcode_builder/manifests/lz4
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ lz4-static
[debs]
liblz4-dev

[pps]
lz4

[download]
url = https://github.com/lz4/lz4/archive/v1.8.3.tar.gz
sha256 = 33af5936ac06536805f9745e0b6d61da606a1f8b4cc5c04dd3cbaca3b9b4fc43
Expand Down
3 changes: 3 additions & 0 deletions build/fbcode_builder/manifests/nghttp2
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ libnghttp2
[debs]
libnghttp2-dev

[pps]
libnghttp2

[download]
url = https://github.com/nghttp2/nghttp2/releases/download/v1.47.0/nghttp2-1.47.0.tar.gz
sha256 = 62f50f0e9fc479e48b34e1526df8dd2e94136de4c426b7680048181606832b7c
Expand Down
3 changes: 3 additions & 0 deletions build/fbcode_builder/manifests/ninja
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ ninja
[rpms]
ninja-build

[pps]
ninja

[download.os=windows]
url = https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-win.zip
sha256 = bbde850d247d2737c5764c927d1071cbb1f1957dcabda4a130fa8547c12c695f
Expand Down
3 changes: 3 additions & 0 deletions build/fbcode_builder/manifests/openssl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ openssl
openssl-devel
openssl-libs

[pps]
openssl

[download]
url = https://www.openssl.org/source/openssl-1.1.1l.tar.gz
sha256 = 0b7a3e5e59c34827fe0c3a74b7ec8baef302b98fa80088d7f9153aa16fa76bd1
Expand Down
3 changes: 3 additions & 0 deletions build/fbcode_builder/manifests/patchelf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ patchelf
[debs]
patchelf

[pps]
patchelf

[download]
url = https://github.com/NixOS/patchelf/archive/0.10.tar.gz
sha256 = b3cb6bdedcef5607ce34a350cf0b182eb979f8f7bc31eae55a93a70a3f020d13
Expand Down
3 changes: 3 additions & 0 deletions build/fbcode_builder/manifests/python
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ python3.8-dev
[debs.not(all(distro=ubuntu,distro_vers="18.04"))]
python3-all-dev

[pps]
python3

[download]
url = https://www.python.org/ftp/python/3.8.13/Python-3.8.13.tgz
sha256 = 903b92d76354366b1d9c4434d0c81643345cef87c1600adfa36095d7b00eede4
Expand Down
3 changes: 3 additions & 0 deletions build/fbcode_builder/manifests/re2
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ libre2-dev
re2
re2-devel

[pps]
re2

[download]
url = https://github.com/google/re2/archive/2020-11-01.tar.gz
sha256 = 8903cc66c9d34c72e2bc91722288ebc7e3ec37787ecfef44d204b2d6281954d7
Expand Down
3 changes: 3 additions & 0 deletions build/fbcode_builder/manifests/snappy
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ libsnappy-dev
[rpms]
snappy-devel

[pps]
snappy

[download]
url = https://github.com/google/snappy/archive/1.1.7.tar.gz
sha256 = 3dfa02e873ff51a11ee02b9ca391807f0c8ea0529a4924afa645fbf97163f9d4
Expand Down
3 changes: 3 additions & 0 deletions build/fbcode_builder/manifests/sqlite3
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ sqlite
sqlite-devel
sqlite-libs

[pps]
sqlite3

[download]
url = https://sqlite.org/2019/sqlite-amalgamation-3280000.zip
sha256 = d02fc4e95cfef672b45052e221617a050b7f2e20103661cda88387349a9b1327
Expand Down
3 changes: 3 additions & 0 deletions build/fbcode_builder/manifests/zlib
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ zlib-static
zlib-ng-compat-devel
zlib-ng-compat-static

[pps]
zlib

[download]
url = https://zlib.net/zlib-1.3.1.tar.gz
sha256 = 9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23
Expand Down
3 changes: 3 additions & 0 deletions build/fbcode_builder/manifests/zstd
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ libzstd-dev
libzstd-devel
libzstd

[pps]
zstd

[download]
url = https://github.com/facebook/zstd/releases/download/v1.5.5/zstd-1.5.5.tar.gz
sha256 = 9c4396cc829cfae319a6e2615202e82aad41372073482fce286fac78646d3ee4
Expand Down

0 comments on commit 6efab05

Please sign in to comment.