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
All checks were successful
mkdocs build / build (push) Successful in 30s
Reviewed-on: #4 Reviewed-by: Neil Hanlon <neil@noreply@resf.org>
This commit is contained in:
commit
9b02752e37
@ -50,12 +50,14 @@ cd SIG/cloud/
|
|||||||
mkdir -p {rpms,patch,src,srpmproc-cache,src-git}
|
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
|
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
|
#!/bin/bash
|
||||||
set -x
|
set -x
|
||||||
@ -70,6 +72,21 @@ MYHOME=`pwd`
|
|||||||
--source-rpm kernel --tmpfs-mode kernel
|
--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
|
### `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.
|
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
|
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`
|
Find and apply patches from `kernel.spec`
|
||||||
```
|
```
|
||||||
@ -436,7 +466,12 @@ index 6c21c18..2889b25 100644
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Commit locally and rerun `srpmproc`
|
### 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
|
$ git log
|
||||||
@ -474,5 +509,5 @@ kernel/r8/SOURCES/ampereone.patch
|
|||||||
### Rebuild with local `dist-git`
|
### Rebuild with local `dist-git`
|
||||||
Reuse methods above
|
Reuse methods above
|
||||||
|
|
||||||
### CREATE PR to RESF
|
### CREATE PR to RESFs
|
||||||
This is following the developer guidelines.
|
Contributor Access Guide: https://wiki.rockylinux.org/contributing/start/#requesting-access-to-groups-in-rocky-account-services
|
||||||
|
Loading…
Reference in New Issue
Block a user