From owner-freebsd-ports@freebsd.org Sun Jul 5 08:18:20 2020 Return-Path: Delivered-To: freebsd-ports@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C0AE036506F for ; Sun, 5 Jul 2020 08:18:20 +0000 (UTC) (envelope-from vidar@karlsen.tech) Received: from nivlheim.karlsen.tech (nivlheim.karlsen.tech [178.62.212.206]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B01mW59YHz4dky for ; Sun, 5 Jul 2020 08:18:18 +0000 (UTC) (envelope-from vidar@karlsen.tech) Received: from mbp.karlsen.tech (93-103-120-7.3g.t-2.net [93.103.120.7]) by nivlheim.karlsen.tech (Postfix) with ESMTPSA id 75707893AB; Sun, 5 Jul 2020 10:18:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=karlsen.tech; s=mail; t=1593937091; bh=iHO30BPewcHub96vXMy3XtUP9hvv6g75jYqUGuRSjb4=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=e8CFSQS7aSHEuRyv39g+eXO+hXAUWAeV0sBtobIuZMmWd+6O2qKhNkv8NcTvSC+wW mq4WxdsT7A/7igIv6GK3gZK+DxzT/XP2LMSalRup9Mk387JvHFMQNilBHrHrP7bmI4 Ruz7sNzz2wwxBy6Is9LP7Bzet95gHVkHJwTxRdBQ= Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: Porting Practice From: Vidar Karlsen In-Reply-To: Date: Sun, 5 Jul 2020 10:18:10 +0200 Cc: freebsd-ports Content-Transfer-Encoding: quoted-printable Message-Id: <4B33F770-AE87-4374-9FB8-A83C1F13C259@karlsen.tech> References: To: Brandon helsley X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.2 (nivlheim.karlsen.tech [0.0.0.0]); Sun, 05 Jul 2020 10:18:11 +0200 (CEST) X-Rspamd-Queue-Id: 4B01mW59YHz4dky X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=karlsen.tech header.s=mail header.b=e8CFSQS7; dmarc=none; spf=pass (mx1.freebsd.org: domain of vidar@karlsen.tech designates 178.62.212.206 as permitted sender) smtp.mailfrom=vidar@karlsen.tech X-Spamd-Result: default: False [-2.73 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[karlsen.tech:s=mail]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip4:178.62.212.206/32]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[karlsen.tech]; NEURAL_HAM_LONG(-1.02)[-1.017]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[karlsen.tech:+]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.72)[-0.718]; NEURAL_HAM_MEDIUM(-0.99)[-0.994]; FREEMAIL_TO(0.00)[hotmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:14061, ipnet:178.62.192.0/18, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[93.103.120.7:received] X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2020 08:18:20 -0000 > On 5 Jul 2020, at 02:46, Brandon helsley = 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=