diff --git a/Makefile b/Makefile index 53e01eb..2230376 100644 --- a/Makefile +++ b/Makefile @@ -44,7 +44,7 @@ src: ## Download the cephadm sources according to the last hash $(SPECTOOL) -g SPECS/cephadm.spec -C SOURCES -f srpm: ## Build the srpm - rpmbuild -bs $(PWD)/SPECS/cephadm.spec \ + $(RPMBUILD) -bs $(PWD)/SPECS/cephadm.spec \ --define "_sourcedir $(PWD)/SOURCES" \ --define "_srcrpmdir $(PWD)" \ --define "dist .$(DIST)" diff --git a/README.md b/README.md index ddb541d..dadb392 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,9 @@ Branch names follow convention like c-sig-storage-ceph-VERSION> as desc 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 - ... +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: @@ -22,33 +22,33 @@ Instructions for building the ceph package for the CentOS Storage SIG can be fou Before starting, choose the branch containing the maintained spec for the cephadm package: ``` - git checkout -t origin/c8-sig-storage-ceph- +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 octopus - ca0faa0a628c041f5b5313060344006830812e25 refs/heads/octopus +$ git ls-remote https://github.com/ceph/ceph octopus +ca0faa0a628c041f5b5313060344006830812e25 refs/heads/octopus ``` 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 +$ spectool -g SPECS/cephadm.spec +$ mv cephadm SOURCES/cephadm ``` 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 ``` and finally we can build it running: ``` - $ cbs build [--scratch] storage8-ceph-octopus-el8 cephadm.el8.src.rpm +$ cbs build [--scratch] storage8-ceph-octopus-el8 cephadm.el8.src.rpm ``` ## Build cephadm using the Makefile @@ -103,7 +103,7 @@ found under the SPECS directory. At the end of this process, as described in the previous section, you can run the cbs build: ``` - $ cbs build [--scratch] storage8-ceph-octopus-el8 cephadm-15.2.10-2.el8.src.rpm +$ cbs build [--scratch] storage8-ceph-octopus-el8 cephadm-15.2.10-2.el8.src.rpm ``` @@ -117,11 +117,13 @@ For this reason a few parameters, exposed via the `cephadm.spec.in` file can be * DIST = el8 by default * VERSION -For instance, assuming we have the following data in the current spec: +For instance, assuming you have the following data in the current spec: +``` [fmount@buildbot cephadm]$ cat SPECS/cephadm.spec | grep -iE "(Release|Version)" Version: 15.2.10 Release: 2%{?dist} +``` you can patch (and bump to a newer NVR) the current (existing) spec file by running: @@ -132,5 +134,5 @@ DIST=el8 RELEASE=1 VERSION=15.2.11 make Then, running the regular cbs build command a new cephadm rpm can be built: ``` - $ cbs build [--scratch] storage8-ceph-octopus-el8 cephadm-15.2.10-2.el8.src.rpm +$ cbs build [--scratch] storage8-ceph-octopus-el8 cephadm-15.2.11-1.el8.src.rpm ```