Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Add deb and RPM repository config and documentation #1676

Merged
merged 14 commits into from
Sep 10, 2020
Merged
22 changes: 22 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ path = "src/main.rs"

[package]
name = "polkadot"
description = "Implementation of a https://polkadot.network node in Rust based on the Substrate framework."
license = "GPL-3.0-only"
version = "0.8.23"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
Expand Down Expand Up @@ -77,3 +79,23 @@ runtime-benchmarks=["cli/runtime-benchmarks"]
service-rewr= [
"cli/service-rewr",
]

# Configuration for building a .deb package - for use with `cargo-deb`
[package.metadata.deb]
name = "polkadot"
extended-description = "Implementation of a https://polkadot.network node in Rust based on the Substrate framework."
maintainer = "martin@parity.io"
license-file = ["LICENSE", "0"]
assets = [
["target/release/polkadot", "usr/bin/", "755"]
]

# Configuration for building an .rpm package - for use with `cargo-rpm`
[package.metadata.rpm]
package = "polkadot"

[package.metadata.rpm.cargo]
buildflags = ["--release"]

[package.metadata.rpm.targets]
polkadot = { path = "/usr/bin/polkadot" }
39 changes: 35 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,43 @@ information about installing the `polkadot` binary and developing on the codebas
specific guides, like how to be a validator, see the
[Polkadot Wiki](https://wiki.polkadot.network/docs/en/).

## Building
## Installation

If you just wish to run a Polkadot node without compiling it yourself, you may
either run the latest binary from our
[releases](https://github.com/paritytech/polkadot/releases) page, or install
Polkadot from one of our package repositories.

### Debian-based (Debian, Ubuntu)

Currently supports Debian 10 (Buster) and Ubuntu 20.04 (Focal), and derivatives.

### Use a Provided Binary
```
# Import the security@parity.io GPG key
curl -fsSL 'https://keys.mailvelope.com/pks/lookup?op=get&search=security%40parity.io&options=mr&exact=on' | apt-key add -
# Add the Parity repository and update the package index
echo 'deb https://releases.parity.io/deb buster main' >> /etc/apt/sources.list.d/parity.list
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we please suggest putting the key into /usr/share/keyrings/ and using the deb [signed-by=<path to key>] URL… format instead?
There's no real reason to add a system-level apt key for a non-system repo.
(Warning: the key should be dearmored for this to work)

apt update
# Install polkadot
apt install polkadot

```

If you want to connect to one of the networks supported by this repo, you can go to the latest
release and download the binary that is provided.
### RPM-based (Fedora, CentOS)

Currently supports Fedora 32 and CentOS 8, and derivatives.

```
# Install dnf-plugins-core (This might already be installed)
dnf install dnf-plugins-core
# Add the repository and enable it
dnf config-manager --add-repo https://releases.parity.io/rpm/polkadot.repo
dnf config-manager --set-enabled polkadot
# Install polkadot (You may have to confirm the import of the GPG key)
dnf install polkadot
```

## Building

### Install via Cargo

Expand Down