Compare commits

...

4 Commits

Author SHA1 Message Date
9b02752e37 Merge pull request 'Fix up kernel srpmproc directions' (#4) from sig-cloud-kernel-fixups into main
All checks were successful
mkdocs build / build (push) Successful in 30s
Reviewed-on: #4
Reviewed-by: Neil Hanlon <neil@noreply@resf.org>
2024-05-09 16:47:57 +00:00
827594ff56
Fix up kernel srpmproc directions
The original directions were writen specifically for Rocky8 SIG-CLOUD
kernel updates with the assumption that everyone reading would know
about the different branches depending on the major version they were
using.  We now explicitly call them out.

There was also an assumption that the reader was well familiar with
setting up a dev environment to do backporting from a src.rpm but that
is not always the case so included those directions.

Also linked to how to onboard to Rocky Account Services so that anyone
can be linked back on how to contribute.
2024-05-09 11:09:00 -04:00
d13e2eafb1 Merge pull request 'FIXUP - Kernel Package' (#3) from devprocess into main
All checks were successful
mkdocs build / build (push) Successful in 26s
Reviewed-on: #3
Reviewed-by: Neil Hanlon <neil@noreply@resf.org>
2024-01-29 23:56:33 +00:00
4b23c615f9 Merge pull request 'Kernel Developer Process' (#2) from devprocess into main
All checks were successful
mkdocs build / build (push) Successful in 29s
Reviewed-on: #2
Reviewed-by: Neil Hanlon <neil@noreply@resf.org>
2024-01-29 21:41:30 +00:00

View File

@ -50,12 +50,14 @@ cd SIG/cloud/
mkdir -p {rpms,patch,src,srpmproc-cache,src-git}
```
Clone the configuration Directives and Patches repo
Clone the configuration Directives and Patches repo.
Note: By default this clone will default to the `r8` branch, to work on other major versions you'll need to change the branch to the corresponding `r#` branch.
```
git clone ssh://git@git.rockylinux.org:22220/sig/cloud/patch/kernel.git patch/kernel.git
```
Script example used to manage running `srpmproc` during
#### Rocky 8 SRPMPROC Example
Script example used to manage running `srpmproc`
```
#!/bin/bash
set -x
@ -70,6 +72,21 @@ MYHOME=`pwd`
--source-rpm kernel --tmpfs-mode kernel
```
#### Rocky 9 SRPMPROC Example
Script example used to manage running `srpmproc`. Note that the `--cdn` is not `rocky#` but rather just `rocky`.
```
#!/bin/bash
set -x
MYHOME=`pwd`
~/bin/srpmproc --cdn rocky --version 9 \
--upstream-prefix "file://${MYHOME}/" \
--storage-addr file:///${MYHOME}/srpmproc-cache \
--import-branch-prefix 'r' --strict-branch-mode \
--rpm-prefix "https://git.rockylinux.org/staging/rpms" \
--source-rpm kernel --tmpfs-mode kernel
```
### `srpmproc` 1st run
This step will be missing a lot of output just so that we can focus on the results and where we source building a local source git tree.
@ -111,6 +128,19 @@ Date: Tue Jan 2 15:44:17 2024 -0500
Initial Commit from RESF Source
```
#### Build Local Git Tree: Remotes
If you're doing novel development here you can skip this step. However most people are going to be cherry-picking patches from Linus's Mainline at Kernel.org, or another remote, so you'll need to add them here to preform the cherry-picks.
Example is just fro adding the Linus kernel.org mainline.
```
git remote add Linux-Mainline https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
```
#### Rebuild Local Repo with patches existing in the `dist-git` SPEC and SOURCES/
NOTE: You'll want to make sure you're looking at the correct spec file for the major verions you're working with, this will be in the path.
In the below example you'll see that `r8` is in the patch of dist-git from the `srpmproc` run.
`../../kernel/r8/SPECS/kernel.spec`
Find and apply patches from `kernel.spec`
```
@ -436,7 +466,12 @@ index 6c21c18..2889b25 100644
```
### Commit locally and rerun `srpmproc`
As of 2024.01.29 `srpmproc` cannot work off dev branches so this code will need to be on the main `r<version>` branch. Once this is done re-running `srpmproc` using the above script or exact same command parameters used when creating the local `srpmproc` will use the new local HEAD.
NOTE: As of 2024.01.29 `srpmproc` cannot work off dev branches so this code will need to be on the main `r<version>` branch.
`srpmproc` will only refernce code that is actually in the git repo, a little contrary to how traditional development works.
This requires that both the large monolithic patch and the `directives.cfg` file changes need to be commited for `srpmproc` to actually pick them up.
Once this is done re-running `srpmproc` using the above script or exact same command parameters used when creating the local `srpmproc` will use the new local HEAD.
```
$ git log
@ -474,5 +509,5 @@ kernel/r8/SOURCES/ampereone.patch
### Rebuild with local `dist-git`
Reuse methods above
### CREATE PR to RESF
This is following the developer guidelines.
### CREATE PR to RESFs
Contributor Access Guide: https://wiki.rockylinux.org/contributing/start/#requesting-access-to-groups-in-rocky-account-services