This is an old revision of the document!
Porter's workflow AKA Hack-a-port
Documenting the workflow I've established to hack ports WORK IN PROGRESS - INCOMPLETE - YMMV
Tools required
devel/git: Minimized depedencies CONTRIB=off CVS=off GUI=off NLS=off P4=offsvn(lite): in base is sufficient (or devel/subversion from ports)ports-mgmt/portlint: Sanity checksports-mgmt/poudriere:
Workflow
One-time setup
Hack a port
- Create the category dir in
<ports> - In the category dir using svn
svn co https://svn0.eu.FreeBSD.org/ports/head/<category>/<port> - In
<ports>rungit add . - Modify your port
- whatever needs to change, see next sections
- In
<ports>/<category>/<port>update local svnsvn add/move/copy/remove <file>svn statusto check your worksvn updateto update your local svn tree
- in
<ports>/<category>/<port>runsvn diff > ../../patch-<port>-<version>-<shortdesc> - Build your modified port using poudriere
Quality checks
portlintmake check-plistmake -V CPE_STR
Submit a Bug Report
- If you're the maintainer of the port, prefix the Summary with [MAINTAINER]
- Describe what's changed, refer to link if you submitted it upstream as well
- Attach the svn diff(s)
- Set
maintainer-approvalto+if you're the maintainer of the port
- Attach the poudriere logs
- As plain text when < 2MB
- Gzipped when > 2MB
Tips-'n-tricks
make makepatchis your friend- make a backup of the files dir…
- run
make patchto extract and patch the port - Copy the file you want to modify to
<file>.orig - Edit the file
- In the port-dir run
make makepatchto update all patches in thefilesdir - NB. There can also be PATCH commands in the Makefile and extra-patches…