You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Neil Alexander 5419ead231
Require Go 1.16
3 months ago
README.md Readme: Adds instructions for local build on Fedora 3 years ago
yggdrasil.spec Require Go 1.16 3 months ago

README.md

Yggdrasil RPM

This is a specification file used to build RPMs for Yggdrasil.


There's no need to build the package yourself, if you're using CentOS/RedHat >= 7 or Fedora >= 29. You can find pre-built packages on Fedora COPR.


How-to (General)

This assumes you have Go 1.11 or later installed.

Start by installing rpmbuild:

dnf install rpmbuild

Create the working folders:

mkdir -p /tmp/rpmbuild/BUILD /tmp/rpmbuild/RPMS /tmp/rpmbuild/SOURCES /tmp/rpmbuild/SPECS /tmp/rpmbuild/SRPMS

Place the yggdrasil.spec file into /tmp/rpmbuild/SPECS.

Download the sources for the specified version, e.g. v0.3.5:

curl -o/tmp/rpmbuild/SOURCES/v0.3.5 https://codeload.github.com/yggdrasil-network/yggdrasil-go/tar.gz/v0.3.5

Build the RPM:

cd /tmp/rpmbuild/
rpmbuild -v -bb SPECS/yggdrasil.spec

Build package on Fedora using mock

Make sure you have rpmbuild and mock installed:

sudo dnf install rpmbuild mock

Download all sources defined in SPEC file:

spectool -g -R yggdrasil.spec

Create a SRPM (source RPM) package from the SPEC file:

rpmbuild -bs yggdrasil.spec

Create RPM package in an isolated environment using mock:

mock -r fedora-30-x86_64 --rebuild ~/rpmbuild/SRPMS/yggdrasil-0.3.5-1.fc30.src.rpm --old-chroot

(--old-chroot is needed because it enables internet connection in the build environment)

You will find your package in /var/lib/mock/fedora-29-x86_64/result.