From c1f6f7c671759062bda2d6e6f505120306bd1ab3 Mon Sep 17 00:00:00 2001 From: Francesco Pantano Date: Mar 05 2021 08:52:14 +0000 Subject: Add readme with more info about the building process Signed-off-by: Francesco Pantano --- diff --git a/README.md b/README.md index 1699c81..fa6b366 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,50 @@ This is a dist-git like repo for cephadm -The master brach is unused. Use an existing branch instead. Branch names follow convention like c-sig-storage-ceph-VERSION> as descibed on [Naming and Patterns for Mapping Git Branches to Koji Tags] (https://wiki.centos.org/BrianStinson/GitBranchesandKojiTags) +The master brach is unused: use an existing branch instead. +Branch names follow convention like c-sig-storage-ceph-VERSION> as described + +on [Naming and Patterns for Mapping Git Branches to Koji Tags](https://wiki.centos.org/BrianStinson/GitBranchesandKojiTags) + +``` c8-sig-storage-ceph-octopus: CentOS-8 + c8-sig-storage-ceph-pacific: CentOS-8 ... +``` Instructions for building the ceph package for the CentOS Storage SIG can be found in the following places: - Comunity Build System - Storage SIG landing page +[Comunity Build System](https://wiki.centos.org/HowTos/CommunityBuildSystem) +[Storage SIG landing page](https://wiki.centos.org/SpecialInterestGroup/Storage) + +Before starting, choose the branch containing the maintained spec for the cephadm package: + + git checkout -t origin/c8-sig-storage-ceph- + +You can find the sha1 for the "patches_base" comment and "Source0" with "git ls-remote", e.g. + +``` + $ git ls-remote https://github.com/ceph/ceph pacific + ca0faa0a628c041f5b5313060344006830812e25 refs/heads/pacific +``` + +The source code can be downloaded using the 'spectool' tool , which uses the Source0 entry in the SPEC: + +``` + $ spectool -g SPECS/cephadm.spec + $ mv cephadm SOURCES/cephadm +``` + +Create a src.rpm with: -Create a src.rpm with: $ rpmbuild -bs \ --define "_sourcedir $PWD/SOURCES" --define "_srcrpmdir $PWD" \ --define "dist .el8" SPECS/cephadm.spec +``` + $ rpmbuild -bs \ --define "_sourcedir $PWD/SOURCES" --define "_srcrpmdir $PWD" \ --define "dist .el8" SPECS/cephadm.spec +``` -To build: +and finally we can build it running: -$ cbs build [--scratch] storage8-ceph-octopus-el8 cephadm.el8.src.rpm +``` + $ cbs build [--scratch] storage8-ceph-pacific-el8 cephadm.el8.src.rpm +```