From owner-freebsd-ports@freebsd.org Sun Jul 5 15:09:09 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 CAA6336DB06 for ; Sun, 5 Jul 2020 15:09:09 +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 4B0BtX52BSz43sq for ; Sun, 5 Jul 2020 15:09:08 +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 0C1E6893AE; Sun, 5 Jul 2020 17:09:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=karlsen.tech; s=mail; t=1593961746; bh=gegV7eR796ab9cz8y0874hedx0GcxaLZneflHH7B20I=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=KK5KA87NY3rQG0hXMQB/wMAj5/NlkTqCMlCG0RC7GFuo9fabjWyCgCZzJK6xbKzEK gRPfSLbPeUKK+1h/UpuEd86FNEwQrUMD8mczi0Ao+DSL/jyR7ekhVATo2eX5pTiwSO WWNAj1CscypSVZjhrpV2ZK5o/4Thd6xDOtHYRLbA= 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 17:09:05 +0200 Cc: freebsd-ports Content-Transfer-Encoding: quoted-printable Message-Id: References: <4B33F770-AE87-4374-9FB8-A83C1F13C259@karlsen.tech> 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 17:09:06 +0200 (CEST) X-Rspamd-Queue-Id: 4B0BtX52BSz43sq X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=karlsen.tech header.s=mail header.b=KK5KA87N; 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.51 / 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.48)[-0.477]; NEURAL_HAM_MEDIUM(-1.02)[-1.015]; 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 15:09:09 -0000 > On 5 Jul 2020, at 16:42, Brandon helsley = 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=