Creating a PR with patch to update a FreeBSD port: Difference between revisions

From TykWiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 20: Line 20:
FULLNAME="Thomas Steen Rasmussen"
FULLNAME="Thomas Steen Rasmussen"
</pre>
</pre>
This will make sure the values are pre-filled in the PR submit screen.
== Updating a port ==
This example is for updating <code>/usr/ports/games/openttd</code> from 1.0.3 to 1.0.4.
First thing I do is to make a backup copy of the port dir before making any changes, so I have something to compare with when I am done making changes.
<pre>

Revision as of 22:49, 29 September 2010

This article is about submitting an updated port to the FreeBSD project. It is not about updating an installed port on a system to a newer version. It is about getting an updated version of something into the FreeBSD ports tree.

Background

The FreeBSD ports tree is huge, and as such, there is a lot of updating to do to keep everything fresh. What I used to do when I found something that was outdated was:

  • Wait for someone else to update the port
  • Send an email to ports@ or the maintainer and ask if someone can update the port

Turns out both of the above options are pretty silly when it is as simple as it is to update many ports. Why waste someone elses time when it takes me just as long to submit a PR with a patch to update the port ?

Preparation

To ease the process of creating a PR to update a port, there is a port called ports-mgmt/porttools which I install:

portmaster /usr/ports/ports-mgmt/porttools/

I then edit /home/tykling/.porttools and set name and email in that file:

[tykling@tyklappy ~]$ egrep "(EMAIL|FULLNAME)" .porttools 
EMAIL="thomas@gibfest.dk"
FULLNAME="Thomas Steen Rasmussen"

This will make sure the values are pre-filled in the PR submit screen.

Updating a port

This example is for updating /usr/ports/games/openttd from 1.0.3 to 1.0.4.

First thing I do is to make a backup copy of the port dir before making any changes, so I have something to compare with when I am done making changes.