README.md : Added "Creating a Gentoo's patch" notes

This commit is contained in:
saundersp
2026-01-27 18:38:48 +01:00
parent 9f01c694df
commit 300641c290

View File

@@ -225,3 +225,27 @@ e2fsck -f $FS
resize2fs $FS $SIZE resize2fs $FS $SIZE
mount $FS $MOUNT_POINT mount $FS $MOUNT_POINT
``` ```
## Creating a Gentoo's patch
### Using diff
```sh
tar -xvf /var/cache/distfiles/package.tar.xz
mv package a
cp -r a b
# Make your changes to b.
diff -ur a b > /etc/portage/patches/example-category/example-packagename/my-patch.patch
```
### Using git
```sh
tar -xvf /var/cache/distfiles/package.tar.xz
cd package
git init
git add .
git commit -m "Initial commit"
# Make your changes
git diff > /etc/portage/patches/example-category/example-packagename/my-patch.patch
```