prysm-pulse/beacon-chain/package/BUILD.bazel
aliask eb1d122aec
Feature/debian packages (#8872)
* Basic build targets for debian packages

* Add comments to config files

* Harden beacon-chain systemd service

* Add install scripts to set users and folders up

* Rename bazel target, fix service files

* Extra service hardening, cleanup install scripts

* Fix linting issues

* //shared:version_file run local only

* gazelle

Co-authored-by: Nishant Das <nishdas93@gmail.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
2021-06-01 15:44:24 +00:00

52 lines
1.2 KiB
Python

load("@rules_pkg//:pkg.bzl", "pkg_deb", "pkg_tar")
pkg_tar(
name = "beacon-chain-bin",
srcs = [
"//cmd/beacon-chain",
],
mode = "0755",
package_dir = "/usr/bin",
)
pkg_tar(
name = "beacon-chain-config",
srcs = glob(["beacon-chain.yaml"]),
mode = "0640",
package_dir = "/etc/prysm",
)
pkg_tar(
name = "beacon-chain-service",
srcs = glob(["prysm-beacon-chain.service"]),
mode = "0640",
package_dir = "/usr/lib/systemd/system",
)
pkg_tar(
name = "debian-data",
extension = "tar.gz",
deps = [
":beacon-chain-bin",
":beacon-chain-config",
":beacon-chain-service",
],
)
pkg_deb(
name = "deb",
architecture = "amd64",
conffiles = [
"etc/prysm/beacon-chain.yaml",
],
data = ":debian-data",
description = "Prysm Beacon Chain - Ethereum 2.0 network communications",
homepage = "https://prysmaticlabs.com/",
maintainer = "Prysmatic Labs <contact@prysmaticlabs.com>",
package = "prysm-beacon-chain",
postinst = "postinst.sh",
preinst = "preinst.sh",
version_file = "//shared:version_file",
visibility = ["//beacon-chain:__pkg__"],
)