From d1946032301ec82a92410c885a65d71d7b4e6c0c Mon Sep 17 00:00:00 2001 From: Petr Písař Date: Jun 01 2023 12:22:22 +0000 Subject: [PATCH 1/2] Use variables instead of hard-coding Fedora and EPEL versions at most places This enables us to keep examples up-to-date to current operating system. --- diff --git a/modules/ROOT/pages/Package_Maintenance_Guide.adoc b/modules/ROOT/pages/Package_Maintenance_Guide.adoc index edf3bdd..4a5c938 100644 --- a/modules/ROOT/pages/Package_Maintenance_Guide.adoc +++ b/modules/ROOT/pages/Package_Maintenance_Guide.adoc @@ -233,13 +233,15 @@ But you need to create a config file `package.cfg` in the repository and set option for the builds. For example config file is created in a stream branch `8` of package `foo`, which has content: +[subs="attributes+"] .... [koji] -targets = f28 epel7 +targets = f{MAJOROSVER} epel{MAJOREPELVER} .... This example shows when you execute the `build` command, -`fedpkg` is able to submit builds for releases, `f28` and `epel7`. +`fedpkg` is able to submit builds for releases, `f{MAJOROSVER}` and +`epel{MAJOREPELVER}`. In practice, you are able to specify two shortcut names `fedora` and `epel` for convenience. `fedpkg` retrieves current active Fedora and EPEL releases automatically. @@ -546,11 +548,12 @@ Check the https://pdc.fedoraproject.org//[Product Definition Center] to get the You can remove the package by using https://fedoraproject.org/wiki/Koji[Koji]: +[subs="attributes+"] .... -koji untag-pkg f35 foo-1.1.3-1.fc35 +koji untag-pkg f{NEXTOSVER} foo-1.1.3-1.fc{NEXTOSVER} .... -where `foo-1.1.3-1.fc35` is replaced with the name of your package build. +where `foo-1.1.3-1.fc{NEXTOSVER}` is replaced with the name of your package build. See `koji help` or xref:Using_the_Koji_Build_System.adoc[Using the Koji Build System] for more information. [#ssh_fingerprint] diff --git a/modules/ROOT/pages/Package_Retirement_Process.adoc b/modules/ROOT/pages/Package_Retirement_Process.adoc index 27ab382..080d1f9 100644 --- a/modules/ROOT/pages/Package_Retirement_Process.adoc +++ b/modules/ROOT/pages/Package_Retirement_Process.adoc @@ -1,3 +1,5 @@ +include::{partialsdir}/attributes.adoc[] + = Package Retirement Process When a package reaches the end of its useful life, @@ -73,11 +75,12 @@ It is enough for a package to be blocked in an older tag to be also blocked in a newer tag due to inheritance. Example output: +[subs="attributes+"] .... -$ koji list-pkgs --show-blocked --tag f21 --package curry +$ koji list-pkgs --show-blocked --tag f{MAJOROSVER} --package curry Package Tag Extra Arches Owner ----------------------- ----------------------- ---------------- --------------- -curry f20 gemi [BLOCKED] +curry f{PREVIOUSOSVER} gemi [BLOCKED] .... Please wait for two days to allow for a compose to happen @@ -97,9 +100,10 @@ with one difference: * You can remove the package from any EPEL branch whether or not it has been released. -For example, if your package has been added to base RHEL in RHEL-6.4 +For example, if your package has been added to base RHEL in +RHEL-{MAJOREPELVER}.4 then perform the steps above -but use the `el6` branch instead of `rawhide`. +but use the `el{MAJOREPELVER}` branch instead of `rawhide`. When you need to add package from EPEL to any RHEL release, only retire EPEL branch when package is released in that RHEL release. diff --git a/modules/ROOT/pages/Package_Update_Guide.adoc b/modules/ROOT/pages/Package_Update_Guide.adoc index 486a7e2..c7a9d70 100644 --- a/modules/ROOT/pages/Package_Update_Guide.adoc +++ b/modules/ROOT/pages/Package_Update_Guide.adoc @@ -207,29 +207,33 @@ you can 'waive' the result using the tool `waiverdb-cli`. You can submit a waiver for a failing result with `waiverdb-cli` specifying the `subject` and the `testcase`: +[subs="attributes+"] .... -waiverdb-cli -t YOUR_TESTCASE_HERE -s '{"item": "this-is-the-subject", "type": "also-this-is-part-of-the-subject"}' -p "fedora-26" -c "This is fine"` +waiverdb-cli -t YOUR_TESTCASE_HERE -s '{"item": "this-is-the-subject", "type": "also-this-is-part-of-the-subject"}' -p "fedora-{MAJOROSVER}" -c "This is fine"` .... Example: +[subs="attributes+"] .... -waiverdb-cli -t dist.rpmdeplint -s '{"item": "python-requests-1.2.3-1.fc26", "type": "koji_build"}' -p "fedora-26" -c "This is fine"` +waiverdb-cli -t dist.rpmdeplint -s '{"item": "python-requests-1.2.3-1.fc{MAJOROSVER}", "type": "koji_build"}' -p "fedora-{MAJOROSVER}" -c "This is fine"` .... You can also waive a failing result by result's id, which you can retrieve from resultsdb with curl. To do that, you'll need the `testcase` name and the `nvr`. For example: +[subs="attributes+"] .... -curl "https://taskotron.fedoraproject.org/resultsdb_api/api/v2.0/results?testcases=dist.python-versions&item=python-alembic-0.9.7-1.fc2" | jq ".data[0].id" +curl "https://taskotron.fedoraproject.org/resultsdb_api/api/v2.0/results?testcases=dist.python-versions&item=python-alembic-0.9.7-1.fc{MAJOROSVER}" | jq ".data[0].id" .... This should print out the of the failing result. You can then submit a waiver for this failing result with +[subs="attributes+"] .... -waiverdb-cli -p fedora-27 -r YOUR_ID_HERE -c "This is fine." +waiverdb-cli -p fedora-{MAJOROSVER} -r YOUR_ID_HERE -c "This is fine." .... Also, if you enabled automatic stable push at a karma threshold, diff --git a/modules/ROOT/pages/Packaging_Tutorial_GNU_Hello.adoc b/modules/ROOT/pages/Packaging_Tutorial_GNU_Hello.adoc index 605405a..dce3698 100644 --- a/modules/ROOT/pages/Packaging_Tutorial_GNU_Hello.adoc +++ b/modules/ROOT/pages/Packaging_Tutorial_GNU_Hello.adoc @@ -744,7 +744,7 @@ Successful execution looks something like this: 0 free 3 open 4 done 0 failed 92465744 buildArch (hello-2.10-1.fc{MAJOROSVER}.src.rpm, i686): open (buildhw-x86-12.iad2.fedoraproject.org) -> closed 0 free 2 open 5 done 0 failed -92465688 build (f37-candidate, hello-2.10-1.fc{MAJOROSVER}.src.rpm): open (buildvm-ppc64le-25.iad2.fedoraproject.org) -> closed +92465688 build (f{MAJOROSVER}-candidate, hello-2.10-1.fc{MAJOROSVER}.src.rpm): open (buildvm-ppc64le-25.iad2.fedoraproject.org) -> closed 0 free 1 open 6 done 0 failed 92465747 buildArch (hello-2.10-1.fc{MAJOROSVER}.src.rpm, ppc64le): open (buildvm-ppc64le-11.iad2.fedoraproject.org) -> closed 0 free 0 open 7 done 0 failed diff --git a/modules/ROOT/pages/Using_the_Koji_Build_System.adoc b/modules/ROOT/pages/Using_the_Koji_Build_System.adoc index 9ae213f..3a0cde7 100644 --- a/modules/ROOT/pages/Using_the_Koji_Build_System.adoc +++ b/modules/ROOT/pages/Using_the_Koji_Build_System.adoc @@ -1,3 +1,5 @@ +include::{partialsdir}/attributes.adoc[] + = Using the Koji build system [#using_koji_in_fedora] @@ -45,11 +47,12 @@ fedpkg build --target TARGET For example, if building on rawhide against a side-tag for updating API for many packages, -such as `dist-f14-python`, +such as `f{NEXTOSVER}-python`, use the following: +[subs="attributes+"] .... -fedpkg build --target 'dist-f14-python' +fedpkg build --target 'f{NEXTOSVER}-python' .... [#chained_builds] @@ -145,8 +148,9 @@ Run `fedpkg scratch-build --help` or `koji build --help` for more information. If your package fails to build, you get an error, for example: +[subs="attributes+"] .... -420066 buildArch kernel-2.6.18-1.2739.10.9.el5.jjf.215394.2.src.rpm, +420066 buildArch kernel-2.6.18-1.2739.10.9.el{MAJOREPELVER}.jjf.215394.2.src.rpm, ia64): open (build-1.example.com) -> FAILED: BuildrootError: error building package (arch ia64), mock exited with status 10 .... @@ -223,10 +227,11 @@ Options: -o FILE Output to a file .... -For example to get the latest buildroot for `dist-f12-build` run: +For example to get the latest buildroot for `f{MAJOROSVER}-build` run: +[subs="attributes+"] .... -koji mock-config --tag dist-f12-build --arch=x86_64 --topurl=http://kojipkgs.fedoraproject.org/ dist-f12 +koji mock-config --tag f{MAJOROSVER}-build --arch=x86_64 --topurl=http://kojipkgs.fedoraproject.org/ f{MAJOROSVER} .... You must pass `--topurl=http://kojipkgs.fedoraproject.org/` to any mock-config command @@ -267,8 +272,9 @@ koji build For example: +[subs="attributes+"] .... -koji build dist-f14 'git url' +koji build f{MAJOROSVER}-candidate 'git url' .... The koji build command creates a build task in Koji. @@ -333,16 +339,17 @@ $ koji list-targets You can see just a single target with the `--name` option: +[subs="attributes+"] .... -$ koji list-targets --name f30 +$ koji list-targets --name f{MAJOROSVER} Name Buildroot Destination --------------------------------------------------------------------------------------------- -f30 f30-build f30-pending +f{MAJOROSVER} f{MAJOROSVER}-build f{MAJOROSVER}-updates-candidate .... -This tells you a build for target `f30` -will use a buildroot with packages from the `f30-build` tag -and tag the resulting packages as f30-pending. +This tells you a build for target `f{MAJOROSVER}` +will use a buildroot with packages from the `f{MAJOROSVER}-build` tag +and tag the resulting packages as `f{MAJOROSVER}-updates-candidate`. You probably do not want to build against rawhide. If Fedora N is the latest one out, @@ -362,8 +369,9 @@ As mentioned above, each tag has its own list of packages that may be placed in the tag. To see that list for a tag, use the `list-pkgs` command: +[subs="attributes+"] .... -$ koji list-pkgs --tag dist-f14 +$ koji list-pkgs --tag f{MAJOROSVER} .... The first column is the name of the package, @@ -375,8 +383,9 @@ and the third tells you the owner of the package. To see the latest builds for a tag, use the `latest-pkg` command: +[subs="attributes+"] .... -$ koji latest-pkg --all dist-f14 +$ koji latest-pkg --all f{MAJOROSVER} .... The output gives you not only the latest builds, From 4374f3011069795374b00180d1ff55bdf52cb025 Mon Sep 17 00:00:00 2001 From: Petr Písař Date: Jun 01 2023 12:22:22 +0000 Subject: [PATCH 2/2] Update variables https://pagure.io/fedora-docs/package-maintainer-docs/issue/127 --- diff --git a/modules/ROOT/partials/attributes.adoc b/modules/ROOT/partials/attributes.adoc index 82e2da1..1cc453e 100644 --- a/modules/ROOT/partials/attributes.adoc +++ b/modules/ROOT/partials/attributes.adoc @@ -1,5 +1,5 @@ -:year: 2022 -:PREVIOUSOSVER: 35 -:MAJOROSVER: 36 -:NEXTOSVER: 37 -:MAJOREPELVER: 8 +:year: 2023 +:PREVIOUSOSVER: 37 +:MAJOROSVER: 38 +:NEXTOSVER: 39 +:MAJOREPELVER: 9