Date: Sun, 5 Jul 2020 17:09:05 +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: <D0E0C668-3585-4CA4-B7DC-C8D2CE8FCB2D@karlsen.tech> In-Reply-To: <CY4PR19MB01049D0E0EBEC60E982C1728F9680@CY4PR19MB0104.namprd19.prod.outlook.com> References: <CY4PR19MB0104E2513B1A1B57CE4CFB22F9680@CY4PR19MB0104.namprd19.prod.outlook.com> <4B33F770-AE87-4374-9FB8-A83C1F13C259@karlsen.tech> <CY4PR19MB01049D0E0EBEC60E982C1728F9680@CY4PR19MB0104.namprd19.prod.outlook.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> On 5 Jul 2020, at 16:42, Brandon helsley <brandon.helsley@hotmail.com> = wrote: >=20 >> 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 >>=20 >> 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. >>=20 >> 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). >=20 >=20 > Could you please go into more detail about what you mean in step one = and three, I am getting really close to figuring out how this works. In = step three I don't understand "cd /ports" or = "portpatches/thecategory_theport_version.diff" Absolutely! In step 1 I use svn to download the latest revision of the ports tree = into a location I use for this purpose. In many cases for me this has = been /ports because I like to keep /usr/ports =E2=80=9Cclean=E2=80=9D/uncl= uttered by my own fiddling. I=E2=80=99m not sure if you have been doing it this way. In case not, = it=E2=80=99s as simple as doing: # mkdir /ports # svn co https://svn.freebsd.org/ports/head /ports To update this copy of the tree later on (next time), run =E2=80=99svn = up=E2=80=99 in the same dir. For a real-ish example for step 3, let=E2=80=99s assume I=E2=80=99m = upgrading sysutils/toybox. When it=E2=80=99s ready to be submitted, I = would do this: # cd /ports (or whichever dir you choose to checkout the ports tree) # svn diff sysutils/toybox > = /home/vidar/portdiffs/sysutils_toybox-0.8.4.diff And then create a PR and upload the diff file. You don=E2=80=99t have to specify the category/port for 'svn diff', but = it makes it go faster as it won=E2=80=99t have to scan for changes in = any other places than what you specify. Hope this cleared it up, Vidar Karlsen=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D0E0C668-3585-4CA4-B7DC-C8D2CE8FCB2D>