aboutsummaryrefslogtreecommitdiff
path: root/README
blob: a88b0058a5085394c76ea0432164d8eaf3fa9376 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
                 Patches for NetBSD and pkgsrc

This repository contains my patches for various pkgsrc packages as
well as the NetBSD distribution itself. It also contains scripts
that make it easier to write patches.

The pkg* scripts are designed to be used in conjunction with the
scripts from the pkgtools/pkgdiff package, as they depend on the
existence of .orig files. The *ex scripts operate on existing
patches, i.e. those in ~/patches.

   Use `pkgdiffs' to make a patch containing multiple changes.
   Use `pkgdiffex' to make a patch containing new changes only.
   Use `pkgpatch' to apply a patch to a source directory.
   Use `pkgpatchex' to apply all existing patches.
   Use `pkgundo' to reinstate the original files.

The following scripts do not depend on pkgtools/pkgdiff:

   Use `convpatch' to make a patch from `git diff' output.
   Use `savepatch' to save a patch in ~/patches.
   Use `psu' to undo all patches applied to a pkgsrc build.
   Use `psx' to fetch and extract a pkgsrc package.

The `psu' and `psx' scripts are only to be used within pkgsrc
package directories. They do nothing within the NetBSD source tree.

                    Applying pkgsrc patches

To have `make do-patch' apply local patches, be sure to set the
LOCALPATCHES variable in mk.conf:

	echo LOCALPATCHES = ~/patches >> /etc/mk.conf

To rebuild a package with new patches, something along the following
lines should be performed:

	psu -x
	make do-patch
	make do-build
	make do-install
	# pkg_delete PACKAGE
	make reinstall # or make replace