Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 5 Jul 2020 14:42:32 +0000
From:      Brandon helsley <brandon.helsley@hotmail.com>
To:        Vidar Karlsen <vidar@karlsen.tech>
Cc:        freebsd-ports <freebsd-ports@freebsd.org>
Subject:   RE: Porting Practice
Message-ID:  <CY4PR19MB01049D0E0EBEC60E982C1728F9680@CY4PR19MB0104.namprd19.prod.outlook.com>
In-Reply-To: <4B33F770-AE87-4374-9FB8-A83C1F13C259@karlsen.tech>
References:  <CY4PR19MB0104E2513B1A1B57CE4CFB22F9680@CY4PR19MB0104.namprd19.prod.outlook.com>, <4B33F770-AE87-4374-9FB8-A83C1F13C259@karlsen.tech>

next in thread | previous in thread | raw e-mail | index | archive | help
For making changes to a port, I find =92svn diff=92 to be the easiest way b=
y 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_thepo=
rt_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=
=92t 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 p=
ersonally do that in the port=92s =91work=92 dir and create the patches wit=
h =91make makepatch=92, and there I need to create .orig files (cp file.c f=
ile.c.orig before making changes).


Could you please go into more detail about what you mean in step one and th=
ree, I am getting really close to figuring out how this works. In step thre=
e I don't understand "cd /ports" or "portpatches/thecategory_theport_versio=
n.diff"
________________________________________
From: owner-freebsd-ports@freebsd.org [owner-freebsd-ports@freebsd.org] on =
behalf of Vidar Karlsen [vidar@karlsen.tech]
Sent: Sunday, July 5, 2020 2:18 AM
To: Brandon helsley
Cc: freebsd-ports
Subject: Re: Porting Practice

> On 5 Jul 2020, at 02:46, Brandon helsley <brandon.helsley@hotmail.com> wr=
ote:

[=85]

> The documentation for (diff -u) says "To create a suitable diff for a sin=
gle patch, copy the file that needs patching to something.orig, save the ch=
anges to something and then create the patch:"
> % diff -u something.orig something > something.diff
>
> Im not sure really the meaning of this documentation. What file needs pat=
ching, which file to copy, where to save changes to exactly, and how and wh=
y 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 anythin=
g that's relevant even if i didn't mention it. I'm really excited to get st=
arted and will absorb like a sponge any know how that's offered!!!

For making changes to a port, I find =92svn diff=92 to be the easiest way b=
y 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_thepo=
rt_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=
=92t 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 p=
ersonally do that in the port=92s =91work=92 dir and create the patches wit=
h =91make makepatch=92, and there I need to create .orig files (cp file.c f=
ile.c.orig before making changes).


Hope this helps,
Vidar Karlsen
_______________________________________________
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CY4PR19MB01049D0E0EBEC60E982C1728F9680>