Date: Sun, 5 Jul 2020 10:18:10 +0200 From: Vidar Karlsen <vidar@karlsen.tech> To: Brandon helsley <brandon.helsley@hotmail.com> Cc: freebsd-ports <freebsd-ports@freebsd.org> Subject: Re: Porting Practice Message-ID: <4B33F770-AE87-4374-9FB8-A83C1F13C259@karlsen.tech> In-Reply-To: <CY4PR19MB0104E2513B1A1B57CE4CFB22F9680@CY4PR19MB0104.namprd19.prod.outlook.com> References: <CY4PR19MB0104E2513B1A1B57CE4CFB22F9680@CY4PR19MB0104.namprd19.prod.outlook.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> On 5 Jul 2020, at 02:46, Brandon helsley <brandon.helsley@hotmail.com> = wrote: [=E2=80=A6] > The documentation for (diff -u) says "To create a suitable diff for a = single patch, copy the file that needs patching to something.orig, save = the changes to something and then create the patch:" > % diff -u something.orig something > something.diff >=20 > Im not sure really the meaning of this documentation. What file needs = patching, which file to copy, where to save changes to exactly, and how = and why the svn method is different. Which method should I choose? I = know it says that unified diff and svn are preffered but since I am new = maybe the (diff -u) command would be easier to begin with? Please help = and include anything that's relevant even if i didn't mention it. I'm = really excited to get started and will absorb like a sponge any know how = that's offered!!! For making changes to a port, I find =E2=80=99svn diff=E2=80=99 to be = the easiest way by far. I tend to do this: 1. svn up my work-in-progress ports tree 2. Make the changes and run tests (portlint, poudriere testport etc) 3. cd /ports; svn diff thecategory/theport > = /portpatches/thecategory_theport_version.diff (change the paths to the = dirs of your choice) 4. Upload the .diff file to Bugzilla Since I use svn in step 1, svn takes care of tracking the changes so I = don=E2=80=99t need to keep .orig files and run diff by hand. The diffing that Jonathan mentioned is more applicable if you have to = make changes to the upstream code itself in order for it to work on = FreeBSD. I personally do that in the port=E2=80=99s =E2=80=98work=E2=80=99= dir and create the patches with =E2=80=98make makepatch=E2=80=99, and = there I need to create .orig files (cp file.c file.c.orig before making = changes). Hope this helps, Vidar Karlsen=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4B33F770-AE87-4374-9FB8-A83C1F13C259>