From a1bcad3f11a535d14eeda3279415382f74406def Mon Sep 17 00:00:00 2001 From: Matthew Almond Date: Mar 09 2021 22:54:10 +0000 Subject: Use block quotes and fix local package build command line --- diff --git a/docs/onboarding.md b/docs/onboarding.md index f853541..56f7a72 100644 --- a/docs/onboarding.md +++ b/docs/onboarding.md @@ -42,20 +42,28 @@ SIG members can push SIG branches to any repo under git.centos.org. SIG branch n To create a new package file a ticket on https://pagure.io/centos-infra/. Before doing that, think about whether you actually need a new package in CentOS proper, or whether you can use Fedora/EPEL instead. To clone an existing package: -`git clone ssh://git@git.centos.org/rpms/systemd.git` +``` +$ git clone ssh://git@git.centos.org/rpms/systemd.git +``` To make a new empty SIG branch (you can also branch c8s if you prefer starting from the existing packaging): -`git checkout --orphan c8s-sig-hyperscale` +``` +$ git checkout --orphan c8s-sig-hyperscale +``` If you need to add new source tarballs: -`lookaside_upload -f systemd-246.1.tar.gz -n systemd -b c8s-sig-hyperscale` +``` +$ lookaside_upload -f systemd-246.1.tar.gz -n systemd -b c8s-sig-hyperscale +``` + to push them to lookaside, then update gitignore and metadata (example: https://git.centos.org/rpms/systemd/c/482fd4b94ecc46dc4cfa4b2f8f2ddbe11535bc31?branch=c8s-sig-hyperscale) `lookaside_upload` comes from https://git.centos.org/centos-git-common and requires a valid CentOS certificate. To do a local test build -`rpmbuild --define "%_topdir $PWD" -bs SPECS/new-package.spec` -`mock -r centos-stream-x86_64 SRPMS/new-package*.src.rpm` +``` +$ mock -r centos-stream-8-x86_64 --sources ./SOURCES --spec ./SPECS/*.spec +``` ## Working with cbs @@ -71,16 +79,25 @@ Release tags: * `${tag}-release` To run a scratch build from git: -`cbs build --scratch hyperscale8s-packages-main-el8 "git+https://git.centos.org/rpms/systemd.git#$(git rev-parse HEAD)"` +``` +$ cbs build --scratch hyperscale8s-packages-main-el8 "git+https://git.centos.org/rpms/systemd.git#$(git rev-parse HEAD)" +``` To run a real build, the package needs to be registered to a destination tags first: -`cbs add-pkg --owner=dcavalca hyperscale8s-packages-candidate systemd` -`cbs add-pkg --owner=dcavalca hyperscale8s-packages-testing systemd` -`cbs add-pkg --owner=dcavalca hyperscale8s-packages-release systemd` +``` +$ cbs add-pkg --owner=dcavalca hyperscale8s-packages-candidate systemd +$ cbs add-pkg --owner=dcavalca hyperscale8s-packages-testing systemd +$ cbs add-pkg --owner=dcavalca hyperscale8s-packages-release systemd +``` + This only needs to be done once per package. To kickoff a build: -`cbs build hyperscale8s-packages-main-el8 "git+https://git.centos.org/rpms/systemd.git#$(git rev-parse HEAD)"` +``` +$ cbs build hyperscale8s-packages-main-el8 "git+https://git.centos.org/rpms/systemd.git#$(git rev-parse HEAD)" +``` To publish to buildlogs.centos.org: -`cbs tag-build hyperscale8s-packages-main-testing systemd-246.1-2.hs.el8` +``` +$ cbs tag-build hyperscale8s-packages-main-testing systemd-246.1-2.hs.el8 +```