At the risk of appearing silly.
No worries. We all have to start somewhere and being as clear as possible about this is more likely to help us spot where things go wrong and help you fix that. But most of all: I know that all of this can be a little daunting at first.
2) Docker Installation
At this point, I want to install the latest version of docker...I go to
/usr/ports/sysutils/docker-freebsd and execute the command
# make extract
. But I have a hard time understanding how I could add this
patch.
You don't have to. That patch was meant to update the port so that it would run better on the latest FreeBSD snapshot, which you don't use. I don't have hands on experience with the aftermath of PR's but considering that the report was closed and marked as fixed I can't help think that there's nothing left to fix here.
So you should be able to install the port using
# make install clean
. Or, as you apparently did before, use the binary package (so: using
# pkg install docker-freebsd
). That would install the latest version which was made available for FreeBSD, ready to use.
I also checked
the details of the patch you referred to and it seems to me that all the patch does is change a few lines in
Makefile and
distinfo (most specifically lines which contain version numbers) but nothing more. Which, to me, would render this patch somewhat useless because it doesn't actually change much, nothing related to the actual source code anyway.
Something which is made quite clear here:
Code:
root@box:/usr/ports # svn patch ~egypcio/freebsd/ports/ports.HEAD.r419559.sysutils.docker-freebsd.patch
U sysutils/docker-freebsd/Makefile
U sysutils/docker-freebsd/distinfo
But to address your actual question.. If you check the link I shared above you'll gain access to the actual patch itself. Copy the whole thing (so control-a, control-c, copy all that text) and create a new file in the ports directory called "docker.patch", then paste this stuff in.
Warning: I'd
strongly advice you to copy the port directory and experiment on that instead of messing with the actual port itself. This allows you to easily revert your changes.
So:
Code:
macron:/home/peter/temp/docker-freebsd $ ls
Makefile docker.patch pkg-descr
distinfo files/ pkg-message
macron:/home/peter/temp/docker-freebsd $ head docker.patch
Index: sysutils/docker-freebsd/Makefile
===================================================================
--- sysutils/docker-freebsd/Makefile (revision 419559)
+++ sysutils/docker-freebsd/Makefile (working copy)
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= docker-freebsd
-PORTVERSION= 20150625
+PORTVERSION= 20150701
Now... In order to apply such a patch you'd need the
patch(1) command. The patch itself points to
sysutils/docker-freebsd/Makefile but in my example that file sits in the current directory. That's nothing which
patch can't handle; we need to strip the first parts of the file entry which can be done using
-p (referred to as 'strip count').
We need to strip 2 parts (
sysutils/ and
docker-freebsd/) so I'll be using this command:
patch -p2 < docker.patch
.
The result is a messy
Makefile (not all parts got changed, seems the patch was made based on outdated information) but a fully patched
distfile. You can fix this by manually replacing
20150625 in the
Makefile with
20150701.
After that you should have all the suggested changes applied. But I obviously can't be sure that they'll also actually work.