Skip to content

Commit 1ec6108

Browse files
committed
README: provide an example to refresh patches
Signed-off-by: Yann Dirson <[email protected]>
1 parent d5d1920 commit 1ec6108

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,29 @@ git clone https://github.com/xcp-ng-rpms/xapi.git
126126
* `--rm` destroys the container on exit. Helps preventing containers from using too much space on disk. You can still reclaim space afterwards by running `docker container prune` and `docker image prune`
127127
* `-v` / `--volume` (see *Mounting repos from outside the container* below)
128128
129+
**Refreshing fuzzy patches**
130+
131+
In XCP-ng 9.0, `rpmbuild` rejects fuzzy patches. The easiest-known
132+
way to get them refreshed is to let `quilt` do the job, but that's not
133+
fully automated.
134+
135+
1. modify the specfile to add `-Squilt` to `%autosetup` or
136+
`%autopatch` in the `%prep` block; add `BuildRequires: quilt`
137+
2. let quilt apply them in a 8.3 buildenv (`quilt` in 8.3 is only in EPEL) and get you a shell:
138+
```
139+
xcpng/build-env/run.py --rm -b 8.3 -l . --rpmbuild-stage=p -n --enablerepo=epel
140+
```
141+
3. ask `quilt` to refresh all your patches (alternatively just the one you want)
142+
```
143+
$ cd rpmbuild/BUILD/$dir
144+
$ quilt pop -a --refresh
145+
$ cp patches/* ../../SOURCES/
146+
```
147+
4. carefully pick up the bits you need
148+
149+
Note: unfortunately `rpmbuild` (in 8.3 at least) does not add all
150+
patches in `patches/series` upfront, so in case of real conflict this
151+
has to be redone from step 2 each time.
129152

130153
## Building packages manually
131154

0 commit comments

Comments
 (0)