From nobody Sat Apr 09 13:06:33 2022 X-Original-To: freebsd-hackers@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 24B5A1A9A9C3; Sat, 9 Apr 2022 13:06:38 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta002.cacentral1.a.cloudfilter.net (omta002.cacentral1.a.cloudfilter.net [3.97.99.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KbFkP14xlz4bL0; Sat, 9 Apr 2022 13:06:37 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from shw-obgw-4002a.ext.cloudfilter.net ([10.228.9.250]) by cmsmtp with ESMTP id dAixnHzbogTZYdAnUnLzjm; Sat, 09 Apr 2022 13:06:36 +0000 Received: from spqr.komquats.com ([70.66.148.124]) by cmsmtp with ESMTPA id dAnSnMspFqyysdAnTnNbrL; Sat, 09 Apr 2022 13:06:36 +0000 X-Authority-Analysis: v=2.4 cv=Y6brDzSN c=1 sm=1 tr=0 ts=625184dc a=Cwc3rblV8FOMdVN/wOAqyQ==:117 a=Cwc3rblV8FOMdVN/wOAqyQ==:17 a=kj9zAlcOel0A:10 a=z0gMJWrwH1QA:10 a=7Qk2ozbKAAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=whenkf9jZ82PwOJKZ_8A:9 a=CjuIK1q_8ugA:10 a=HNhVPpsFFhwA:10 a=1lyxoWkJIXJV6VJUPhuM:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 51896115A; Sat, 9 Apr 2022 06:06:34 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 446673AD; Sat, 9 Apr 2022 06:06:33 -0700 (PDT) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Kyle Evans cc: Warner Losh , "freebsd-arch@freebsd.org" , FreeBSD Hackers , ports-list freebsd Subject: Re: [RFC] patch's default backup behavior In-reply-to: References: Comments: In-reply-to Kyle Evans message dated "Fri, 08 Apr 2022 22:44:34 -0500." List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 09 Apr 2022 06:06:33 -0700 Message-Id: <20220409130633.446673AD@slippy.cwsent.com> X-CMAE-Envelope: MS4xfPlcm9V00LeZBmPaR+826IRgrXaRXST6AAYJ8Q9k5TOYzzcKJaAW7ULXXCvQQz6LnQ0BsgNnFzW3mj8hSrHAm7RywHVElykilB7Ikbn7XBbDn03AwEWh wdPNlu0+nRX3RhSz958tFK1OS80d0QB9ECyR9kY7mlu1ILCWyyeBJXl2hT/Gqnd1cgRYeJy8C22y4rrlQl4RLZf2WAMLnd8uP9EmETlFsKZwU7BZrYcZptFz n2J+T+bVigkhZJZZaOL59+NftFszBr0n7Rt48vt4sblFeZFVpDqJFG/lLnBBSES3bb07ZZRsbV9HTdKcCtGXWIaBTK0wmk9nMN12NalOlvQ= X-Rspamd-Queue-Id: 4KbFkP14xlz4bL0 X-Spamd-Bar: ++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 3.97.99.33) smtp.mailfrom=cy.schubert@cschubert.com X-Spamd-Result: default: False [2.11 / 15.00]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[4]; RCVD_IN_DNSWL_MED(-0.20)[3.97.99.33:from]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US]; RCVD_TLS_LAST(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[70.66.148.124:received]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; ARC_NA(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.91)[0.910]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[cschubert.com: no valid DMARC record]; AUTH_NA(1.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(1.00)[1.000]; MLMMJ_DEST(0.00)[freebsd-hackers,freebsd-ports,freebsd-arch]; R_SPF_NA(0.00)[no SPF record] X-ThisMailContainsUnwantedMimeParts: N In message , Kyle Evans writes: > On Fri, Apr 8, 2022 at 10:41 PM Warner Losh wrote: > > > > > > > > On Fri, Apr 8, 2022, 9:26 PM Kyle Evans wrote: > >> > >> Hello! > >> > >> 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 (presumably this means either > >> a hunk needed fuzz or a hunk outright failed). 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). > >> > >> 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. > > > > > > Could one select the old behavior? Or would it just be a change? A new -V v > alue? > > > > Yeah, the current behavior is actually represented by the `-b` flag. > With the new behavior, we'd specifically implement > `--backup-if-mismatch` (a nop from the beginning), > `--no-backup-if-mismatch` (turn off backups, equivalent to `-V none` > but "lighter" in that it won't override -b/-V) and we'd leave existing > flags otherwise alone. Looks good to me. > > > I like the Idea. > > > > Warner > > > >> Thanks, > >> > >> Kyle Evans > >> > -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few.