From nobody Mon Apr 11 16:42:18 2022 X-Original-To: freebsd-ports@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A15978D62A6; Mon, 11 Apr 2022 16:42:25 +0000 (UTC) (envelope-from pauamma@gundo.com) Received: from mail.gundo.com (gibson.gundo.com [75.145.166.65]) by mx1.freebsd.org (Postfix) with ESMTP id 4KcZQS40Phz4XmC; Mon, 11 Apr 2022 16:42:24 +0000 (UTC) (envelope-from pauamma@gundo.com) Received: from webmail.gundo.com (variax.gundo.com [75.145.166.70]) by mail.gundo.com (Postfix) with ESMTP id 75CE84C063C; Mon, 11 Apr 2022 11:42:18 -0500 (CDT) List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org MIME-Version: 1.0 Date: Mon, 11 Apr 2022 16:42:18 +0000 From: Pau Amma To: Kyle Evans Cc: freebsd-arch@freebsd.org, FreeBSD Hackers , ports-list freebsd Subject: Re: [RFC] patch's default backup behavior In-Reply-To: References: User-Agent: Roundcube Webmail/1.4.8 Message-ID: X-Sender: pauamma@gundo.com Organization: The Cabal (TINC) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4KcZQS40Phz4XmC X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=pass (policy=none) header.from=gundo.com; spf=pass (mx1.freebsd.org: domain of pauamma@gundo.com designates 75.145.166.65 as permitted sender) smtp.mailfrom=pauamma@gundo.com X-Spamd-Result: default: False [-3.90 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FREEFALL_USER(0.00)[pauamma]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_SPF_ALLOW(-0.20)[+ip4:75.145.166.64/28]; NEURAL_HAM_LONG(-1.00)[-1.000]; RWL_MAILSPIKE_GOOD(0.00)[75.145.166.65:from]; HAS_ORG_HEADER(0.00)[]; RCVD_IN_DNSWL_MED(-0.20)[75.145.166.65:from]; DMARC_POLICY_ALLOW(-0.50)[gundo.com,none]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MLMMJ_DEST(0.00)[freebsd-arch,freebsd-hackers,freebsd-ports]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:7922, ipnet:75.144.0.0/13, country:US]; RCVD_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N On 2022-04-09 03:25, Kyle Evans wrote: > FreeBSD's patch follows historical patch(1) behavior w.r.t. backups, > where a backup is created for every file patched. > > I'd like to test the waters on switching this to the GNU behavior, > which feels a whole lot more reasonable. Notably, they'll only create > backup files if a mismatch was detected I don't know what GNU patch does, but I had a look at SUSv4, which says -b always creates .orig files and not using -b never does. But you sound like you're actually speaking of .rej files, not .orig files. > (presumably this means either > a hunk needed fuzz or a hunk outright failed). SUSv4 says a .rej is created when applying the hunk fails completely, but not if the before context is found after fuzzing, that is either/both near where if was expected and after trimming some outer lines of it. (There's no option to control whether/when a .rej is created.) > This yields far fewer > backup files in the ideal scenario (context entirely matches), while > still leaving backup files when it's sensible (base file changed and > we might want to regenerate the patch). I feel that way about the SUSv4 version, but I'm not sure how conformant the GNU version is, or what you think should happen with respect to .rej files. > Thoughts / comments / concerns? Cross-posted this to a couple of > different lists to try and hit the largest number of stakeholders in > patch(1) behavior. I'm not sure -arch@ will accept my reply. This may or may not split the discussion. -- #BlackLivesMatter #TransWomenAreWomen #AccessibilityMatters #StandWithUkrainians English: he/him/his (singular they/them/their/theirs OK) French: il/le/lui (iel/iel and ielle/ielle OK) Tagalog: siya/niya/kaniya (please avoid sila/nila/kanila)