From a12735b2891c5dfd1cadd59b164fa3322adc35cf Mon Sep 17 00:00:00 2001 From: Robert Marshall Date: Jul 06 2018 20:54:52 +0000 Subject: Update Side Build SOP - declares what to do when a side build tag was used before - updates the documentation to have more information about the procedure and the koji commands Signed-off-by: Robert Marshall --- diff --git a/docs/source/sop_adding_side_build_targets.rst b/docs/source/sop_adding_side_build_targets.rst index 658d76c..e0a0165 100644 --- a/docs/source/sop_adding_side_build_targets.rst +++ b/docs/source/sop_adding_side_build_targets.rst @@ -7,95 +7,206 @@ Adding Side Build Tags Description =========== -Bigger Features can take a while to stabilise and land or need a large number +Bigger Features can take a while to stabilize and land or need a large number of packages to be built against each other, this is easiest served by having a separate build tag for the development work. This SOP will describe the steps necessary to prepare the new build target. Action ====== -Adding a side build target is fairly straightforward, but comes with a cost -of extra newRepo tasks in koji. +Engineers should be aware that adding side build targets incurs extra +newRepo tasks in the koji. -Koji ----- -In koji a tag needs to be made, it needs to inherit from the ``-build`` tag of -the base your wanting to develop against, this is to ensure that group info -makes it into your tag so you can build successfully. As we will be building -against this tag we need to give it the needed arches also. +Research Tag +------------ -The ``add-tag``, ``add-tag-inheritance``, ``edit-tag``, and ``add-target`` -commands are used. +#. Verify whether a tag already exists. -:: + The typical tag format is *PRODUCT*-*DESCRIPTOR*. The *DESCRIPTOR* should + be something brief that clearly shows why the tag exists. - $ koji add-tag --help - Usage: koji add-tag [options] name - (Specify the --help global option for a list of other help options) + .. note:: - Options: - -h, --help show this help message and exit - --parent=PARENT Specify parent - --arches=ARCHES Specify arches + Don't think too hard about what makes a good descriptor. The + descriptor for the XFCE version 4.8 side-build target was *xfce48*. + KDE often simply uses *kde* as its descriptor. Use best judgement and + if in doubt ask in IRC on ``#fedora-releng``. - $ koji add-target --help - Usage: koji add-target name build-tag - (Specify the --help global option for a list of other help options) + .. admonition:: EPEL6 - Options: - -h, --help show this help message and exit + :: -For example if we wanted to create the EPEL tags for EL6 to build XFCE , we would do -the following: + $ koji taginfo epel6-kde -:: + .. admonition:: EPEL7 - $ koji add-tag epel6-xfce48 --parent=dist-6E-epel-build --arches=i686,x86_64,ppc64 - $ koji add-target epel6-xfce48 epel6-xfce48 + :: -For EL7 we would do the following: + $ koji taginfo epel7-kde -:: + .. admonition:: Fedora - $ koji add-tag epel7-xfce48 --parent=epel7-build --arches=aarch64,x86_64,ppc64,ppc64le - $ koji add-target epel7-xfce48 epel7-xfce48 + :: -A Fedora example would be: + $ koji taginfo f28-kde -:: + .. note:: + If the tag already exists, continue searching for an available tag + by appending ``-2`` and incrementing the number by one until an + available tag is found. For example, if ``f28-kde`` already exists + then search for ``f28-kde-2``, ``f28-kde-3``, and so on until a + suitable tag is found. - $ koji add-tag f23-gnutls --parent=f23-build --arches=armv7hl,i686,x86_64 - $ koji add-target f23-gnutls f23-gnutls +#. Determine the appropriate architectures. -Once the target is added, please file a ticket in `pagure infrastructure`_ about the -new tag that is created so that they can enable auto signing for the tag. + .. admonition:: EPEL6 + + :: + + $ koji taginfo dist-6E-epel-build + + .. admonition:: EPEL7 + + :: + + $ koji taginfo epel7-build + + .. admonition:: Fedora + + :: + + $ koji taginfo f28-build + +Create Side Build Target +------------------------ + +#. Create the proper tag. + + Note the slightly different syntax depending on + which product needs the side-build target and the comma delimited list of + architectures based on the information from a previous step. + + + .. admonition:: EPEL6 + + :: + + $ koji add-tag epel6-kde --parent=dist-6E-epel-build --arches=i686,x86_64,ppc64 + + .. admonition:: EPEL7 + + :: + + $ koji add-tag epel7-kde --parent=epel7-build --arches=aarch64,x86_64,ppc64,ppc64le + + .. admonition:: Fedora + + :: + + $ koji add-tag f28-kde --parent=f28-build --arches=armv7hl,i686,x86_64,aarch64,ppc64,ppc64le,s390x + +#. Create the target. + + .. admonition:: EPEL6 + + :: + + $ koji add-target epel6-kde epel6-kde + + .. admonition:: EPEL7 + + :: + + $ koji add-target epel7-kde epel7-kde + + .. admonition:: Fedora + + :: + + $ koji add-target f28-kde f28-kde + +#. Find the taskID for the newRepo task associated with the newly created + target. + + :: + + $ koji list-tasks --method=newRepo + ID Pri Owner State Arch Name + 25101143 15 kojira OPEN noarch newRepo (f28-kde) + + +#. Ensure the newRepo task is being run across all architectures. + + :: + + $ koji watch-task 25101143 + Watching tasks (this may be safely interrupted)... + 25101143 newRepo (f28-kde): open (buildvm-14.phx2.fedoraproject.org) + 25101154 createrepo (i386): closed + 25101150 createrepo (ppc64le): closed + 25101152 createrepo (ppc64): closed + 25101151 createrepo (aarch64): closed + 25101149 createrepo (armhfp): closed + 25101153 createrepo (s390x): open (buildvm-ppc64le-04.ppc.fedoraproject.org) + 25101148 createrepo (x86_64): open (buildvm-aarch64-21.arm.fedoraproject.org) + + +#. Request Package Auto-Signing for New Tag + + File a ticket in `pagure infrastructure`_ requesting the new tag be enabled + for package auto-signing. + +#. Update the Pagure Issue + + Update the issue according to the following template which assumes a side + target was made for KDE under Fedora 28. + *TAG_NAME* has been created: + + $ koji add-tag f28-kde --parent=f28-build --arches=armv7hl,i686,x86_64,aarch64,ppc64,ppc64le,s390x + + $ koji add-target f28-kde f28-kde + + You can do builds with: + + $ fedpkg build --target=f28-kde + + Let us know when you are done and we will move all the builds into + f28. -Verification -============ -Check in koji that a newRepo task is created for your new tag and has the -appropriate arches Cleanup ======= -When the builds are completed to remove the target and merge builds across +Fedora Release Engineering is responsible for merging the packages from the +side-build target and tag back into the main tag. The requestor will update +the original ticket when ready for the procedure outlined below. + +#. Remove the target + + :: + + $ koji remove-target -:: +#. Merge side build back to main target. - $ koji remove-target epel6-xfce48 + Get the latest checkout from `Fedora Release Engineering Repository`_ + and run the `mass-tag.py` from the scripts directory. -Merging the side build target back into the main target is done with -mass-tag.py from the releng git repo. + :: + $ ./mass-tag.py --source --target > mass_tag.txt -:: + .. note:: + The *MAIN_TAG_NAME* for Fedora is typically the pending subtag, e.g. + ``f28-pending`` when bodhi is not managing updates. After bodhi is + enabled and managing updates then merge into ``f28-updates-candidate``. - $ ./mass-tag.py --source --target +#. Paste Output to the Original Ticket -Paste the output from mass-tag.py into the pagure/releng ticket to show -what packages were merged and what packages need rebuilding for those who -work on the buildroot. + Paste the output from mass-tag.py into the pagure/releng ticket to show + what packages were merged and what packages need rebuilding for those who + work on the buildroot. -Tags are ``never`` removed. +Tags are **never** removed. Consider Before Running ======================= @@ -106,3 +217,4 @@ Consider Before Running rebuild is underway .. _pagure infrastructure: https://pagure.io/fedora-infrastructure/issues +.. _Fedora Release Engineering Repository: https://pagure.io/releng/