-
Notifications
You must be signed in to change notification settings - Fork 11
Respin how-to guide #57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 6 commits
e5964f5
2da150e
d7b150f
5ac43c0
73d0e68
c9da13a
321445e
374007b
2e71ac0
4deeefe
95c2a74
9dc38f4
0efd5b7
6560328
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,240 @@ | ||
| # How to respin a kernel | ||
|
|
||
| Sometimes regressions or last-minute changes are identified in kernels in #proposed (already cranked). | ||
benjamin051000 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
benjamin051000 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| It is possible to make changes before the SRU cycle closes. This is a special version of a crank called a respin. | ||
benjamin051000 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| These are the steps to respin a kernel, with examples from a previous `2025.01.13` respin of the `noble:linux-gke` kernel due to a late-cycle decision to revert a patchset. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hey @benjamin051000 , i haven't finished reviewing this but a how-to shouldn't be too specific in terms of the scenarios described in the guide. |
||
|
|
||
| ## 1. Create a respin Jira card | ||
|
|
||
| ```{attention} | ||
| Only one person peforms this step. If you already have a Jira card, note the respin number in the card (see Note at the end of this step) and skip this step. | ||
| ``` | ||
|
Comment on lines
+12
to
+14
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It does stand out, but I think that's ok.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would use Warning / Attention / Caution for something that you absolutely don't want someone to do without understanding the impact. So in this case, if you DO create another Jira card, what happens? |
||
|
|
||
| Use [kteam-tools create-respin-card](https://kernel.ubuntu.com/forgejo/kernel/kteam-tools/src/branch/master/stable/create-respin-card) script: | ||
|
|
||
| ```text | ||
| ./create-respin-card <cycle-number> | ||
| ``` | ||
|
|
||
| This will create a respin card on Jira. (For example, here's the one we created: [KSRU-15479 (Jira)](https://warthogs.atlassian.net/browse/KSRU-15479)) | ||
benjamin051000 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
benjamin051000 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Next, on Jira, fill in the details of the respin in the description. This can include: | ||
|
|
||
| * Details on why the kernel is being respun | ||
| * Links to relevant bugs | ||
| * Affected kernels that will need to be respun | ||
|
|
||
| ```{note} | ||
| Note the respin number, as it's used in subsequent steps. | ||
| The respin number is in the title of the Jira card in parentheses. | ||
| For example, "Re-spin (#8)" indicates the number is 8. | ||
| ``` | ||
|
Comment on lines
+34
to
+39
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is important to read, even if you were told to skip this section... How should we make that more clear? Maybe it's clear enough as-is. |
||
|
|
||
| ## 2. Create tracking bugs | ||
| Each affected kernel needs a new Launchpad tracking bug. | ||
benjamin051000 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| Use the kteam-tools `create-kernel-tasks` script: | ||
|
|
||
| ```text | ||
| ./create-kernel-tasks --handle <handle> --spin <spin-number> <cycle-number> | ||
| ``` | ||
|
|
||
| For example, we used: | ||
| ```{terminal} | ||
| :input: ./create-kernel-tasks --handle noble:linux-gke --spin 8 2025.01.13 | ||
| :dir: kteam-tools/stable/ | ||
tswhison marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ``` | ||
|
|
||
| The output states that a new tracking bug has been made, prints its bug number, and also prints the bug number for the original tracking bug from this kernel's original crank. | ||
|
|
||
| On Launchpad, mark the original tracking bug as a duplicate of the newly-created bug. | ||
| <!-- TODO screenshots of how to do this --> | ||
|
Comment on lines
+58
to
+59
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be nice to have a screenshot of how to do this in launchpad, it's not obvious to newbies (myself). |
||
|
|
||
| ## 3. Checkout the last cranked version of the kernel | ||
|
|
||
| Use cranky to checkout the kernel: | ||
|
|
||
| ```text | ||
| cranky checkout --cleanup --pristine <handle> | ||
benjamin051000 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ``` | ||
|
|
||
| Then, use `cranky rmadison` to get the version number from the #proposed kernel: | ||
| ```text | ||
| cranky rmadison <handle> | ||
| ``` | ||
|
|
||
| In `linux-main/`, ensure `HEAD` is on the tag of the kernel in #proposed (the output of `cranky rmadison`). | ||
benjamin051000 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| <!-- TODO what if it isn't (new commits were applied)? --> | ||
|
||
|
|
||
| <!-- For example, when running `git show` in `linux-main/`, we saw that `HEAD` was on `Ubuntu-` --> | ||
|
|
||
| ## 4. Add patchset | ||
|
|
||
| ```{attention} | ||
| This step only applies to kernels which don't have a parent with patches applied. If your kernel has a parent kernel where respin patches were applied, skip this step. | ||
| ``` | ||
|
|
||
| Usually patches will come from a mailing list, as `.patch` files. Use `git am` to apply them. | ||
|
|
||
| You may also be asked to modify the commit message. | ||
| <!--TODO elaborate?--> | ||
|
Comment on lines
+89
to
+90
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we elaborate? Is there a standard/convention we generally follow? |
||
|
|
||
| ## 5. Rebase | ||
| ```{attention} | ||
| This step only applies to kernels which are derivatives of kernels also being respun. Skip this step if your kernel has a parent that isn't being respun. | ||
| ``` | ||
|
|
||
| Your kernel's parent will have a new tag from its respin. Rebase off that tag: | ||
| ```text | ||
| cranky rebase -b <parent-respin-tag> | ||
| ``` | ||
|
|
||
| For `noble:linux-gke`, the parent kernel, `noble:linux`, was not respun, so we skipped this step. | ||
|
|
||
| ## 6. Continue cranking, with some modifications | ||
|
|
||
| Run the following commands as normal: | ||
| ```text | ||
| cranky open | ||
| cranky review-master-changes | ||
| ``` | ||
|
|
||
| In theory, no changes should be detected by this step. | ||
benjamin051000 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Next, run `cranky link-tb` with a modified cycle number: | ||
| ```text | ||
| cranky link-tb --sru-cycle <cycle-number>-<spin-number> | ||
| ``` | ||
|
|
||
| In our crank, we used `cranky link-tb --sru-cycle 2025.01.13-8`, where 8 was the spin number. | ||
|
|
||
| Next, run: | ||
| ```text | ||
| cranky update-dkms-versions | ||
| ``` | ||
| In theory, no changes should be detected by this step. | ||
benjamin051000 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Next, finish the crank: | ||
| ```text | ||
| cranky close | ||
| cranky update-dependents | ||
| cranky tags | ||
| ``` | ||
|
|
||
| ## 7. Pull sources | ||
| The primary difference with pulling the previous deb package sources is that we need to specify to pull the ones in #proposed. (By default, `cranky pull-sources` pulls TODO.) | ||
|
|
||
| First, we need to know which versions are in #proposed. Run `cranky rmadison` to get this info: | ||
| ```text | ||
| cranky rmadison <handle> | ||
| ``` | ||
|
|
||
| You can `grep` the result for "proposed", too. | ||
|
|
||
| Note both the package name `cranky rmadison` produces and the version numbers of each package this kernel has (main, meta, signed, etc.) that are in #proposed. | ||
|
|
||
| For each package, we will run `cranky pull-source`. | ||
|
|
||
| ```{attention} | ||
| Note that the command is `cranky pull-source`, _not_ `cranky pull-sources` (no 's'). | ||
| We use `cranky pull-source` on each package manually so that we can specify the correct version number for each one. | ||
| ``` | ||
benjamin051000 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| Then, use `cranky pull-source` with the following syntax: | ||
| ```text | ||
| cd .. | ||
| cranky pull-source <rmadison-package-name> <version-in-proposed> <series> | ||
| ``` | ||
|
|
||
| For example, the rmadison format looked like this (at time of our respin) for `noble:linux-gke` | ||
|
|
||
| ```{terminal} | ||
| :input: cranky rmadison noble:linux-gke | ||
| :dir: noble/linux-gke/ | ||
tswhison marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| linux-gke | 6.8.0-1003.5 | noble | source | ||
| linux-gke | 6.8.0-1017.21 | noble-security | source | ||
| linux-gke | 6.8.0-1017.21 | noble-updates | source | ||
| linux-gke | 6.8.0-1019.23 | noble-proposed | source | ||
| linux-gke | 6.8.0-1017.21 | noble-proposed#2 | source | ||
| linux-meta-gke | 6.8.0-1003.5 | noble | source | ||
| linux-meta-gke | 6.8.0-1017.21 | noble-security | source | ||
| linux-meta-gke | 6.8.0-1017.21 | noble-updates | source | ||
| linux-meta-gke | 6.8.0-1019.23 | noble-proposed | source | ||
| linux-meta-gke | 6.8.0-1017.21 | noble-proposed#2 | source | ||
| linux-signed-gke | 6.8.0-1003.5 | noble | source | ||
| linux-signed-gke | 6.8.0-1017.21 | noble-security | source | ||
| linux-signed-gke | 6.8.0-1017.21 | noble-updates | source | ||
| linux-signed-gke | 6.8.0-1019.23 | noble-proposed | source | ||
| linux-signed-gke | 6.8.0-1017.21 | noble-proposed#2 | source | ||
| ``` | ||
|
|
||
| `noble:linux-gke` has `main`, `meta`, and `signed` packages, so we noted those specific package names and versions from `cranky rmadison`: | ||
|
|
||
| | package name | version in `noble-updates` | | ||
| | - | - | | ||
| | `linux-gke` | `6.8.0-1017.21` | | ||
| | `linux-meta-gke` | `6.8.0-1017.21` | | ||
| | `linux-signed-gke` | `6.8.0-1017.21` | | ||
|
|
||
| ```{note} | ||
| In the example, the version numbers for each package are the same. | ||
| This is not always the case, so it's still important to go through this step for each package. | ||
| ``` | ||
|
|
||
| So, we ran the following commands: | ||
| ```{terminal} | ||
| :input: cranky pull-source linux-gke 6.8.0-1017.21 noble | ||
| :dir: noble/linux-gke/ | ||
| ``` | ||
|
|
||
| ```{terminal} | ||
| :input: cranky pull-source linux-meta-gke 6.8.0-1017.21 noble | ||
| :dir: noble/linux-gke/ | ||
| ``` | ||
|
|
||
| ```{terminal} | ||
| :input: cranky pull-source linux-signed-gke 6.8.0-1017.21 noble | ||
| :dir: noble/linux-gke/ | ||
tswhison marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ``` | ||
|
|
||
| ## 8. Build sources | ||
|
|
||
| We need to pass the information about the packages in #proposed gathered in the previous step (`pull-source`) to build the sources this time. | ||
| <!--TODO why?--> | ||
benjamin051000 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| `cranky build-sources` has a `--build-opts` flag we can use to specify the version to use. Pass this flag once for each package, like so: | ||
|
|
||
| ```bash | ||
| cd linux-main/ | ||
| cranky build-sources --build-opts 'main:-v<version-in-updates>' --build-opts 'meta:-v<version-in-updates>' --build-opts 'signed:<version-in-updates>' | ||
| ``` | ||
|
|
||
| ```{note} | ||
| The syntax used for each `--build-opts` is `<package-dirname>:-v<version>`. | ||
| The `package-dirname` is the name of the directory this package lives in (use `ls` to see them). | ||
| They are usually `linux-main/`, `linux-meta/`, `linux-lrm`, `linux-signed/`, etc. | ||
| Use these without the `linux-` prefix. | ||
| ``` | ||
|
|
||
| For example, we used the following command to build `noble:linux-gke`: | ||
|
|
||
| ```{terminal} | ||
| :input: cranky build-sources --build-opts 'main:-v6.8.0-1017.21' --build-opts 'meta:-v6.8.0-1017.21' --build-opts 'signed:-v6.8.0-1017.21' | ||
| :dir: noble/linux-gke/linux-main | ||
tswhison marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ``` | ||
|
|
||
| ## 9. Review changes and upload | ||
|
|
||
| At this point, refer to the normal crank process to finish the respin. | ||
benjamin051000 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ```bash | ||
| cd .. | ||
| cranky review *.changes | ||
| ``` | ||
|
|
||
| Lastly, upload the package or push it for a peer-review. | ||
benjamin051000 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Uh oh!
There was an error while loading. Please reload this page.