From nobody Sat Apr 09 03:41:44 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 E55EC1A953AF for ; Sat, 9 Apr 2022 03:41:56 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-vs1-xe35.google.com (mail-vs1-xe35.google.com [IPv6:2607:f8b0:4864:20::e35]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Kb1Bq4dlXz3NgS for ; Sat, 9 Apr 2022 03:41:55 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-vs1-xe35.google.com with SMTP id t6so8394529vsq.11 for ; Fri, 08 Apr 2022 20:41:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=HGk+thzFTctV//nQfaFYIijxcu9GDJOv5QxpgEAtTk8=; b=Y/1zsl7WnH1cYIqq5Le4hlwYbLJ/HnRCZRiXjCxQhsugW6fuRH8yutHrOHm6061TlT RUSTKfQOJcemZSBpYNu29PXV6cdhKIX2tCBwCf9fhYFrhzrY9+Z9waAO3grLG9G+AME9 Uiy7L6MdSlwkwjrYTCZF/qUayZiG3wng2+S0TwdjOZ9pxCxEBDXkpJ4tH1/u4xOdDnlh Bh50NkcvXjKUrDIr8jRILaCEHrRe5Wo5muaWyHzOTL1z4IpQA7GbQ7Z4LAf03rO52NWt TwyUBNKpxi8A8JO39nBjcmsUtokDPd/J3rnxpd6WfXZSVfdhwcvVrD8OrDUAEA2XF98I vVug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=HGk+thzFTctV//nQfaFYIijxcu9GDJOv5QxpgEAtTk8=; b=Ll/N/7l7D4/ZtuOgzJkQCc7lZiIaSJswC9fqVB+pDvKsFFTove4EaB2Dsg36KUENpi z6YqkYZliu1u4hdOrAO+RpPlS5j72B6MD24vtZ87vwS0F8I6buwU1A1K2f5nMiw3nT+2 B1kZ0lTeQq8JYjJOZ1SKHpTHcWwIfv87UUDBkBUVv81S9KazEOQ5Vg0HZ1+LoWNFoNaL ENNgfA7h7tSxdtKizxNUvWglg2LsXPlGsLaSU/E/Wzadvk4xKAnwbayzNb3rSMDH3HXy suCJkwcYjDvMwPtvGRExcdzsPolss30PQ4t9IzqiJ9t68fGESPdY6QA5c14z5vnhx8p6 q4ZQ== X-Gm-Message-State: AOAM532Avgq/z9ttCb0b5J0TE/wW1hPn3nG+cVtEzR0JAlQLwGrCoUqm FeqkkakP+rkkHOFEOiDdzO+mDQePxs3tihc3XReyCQ== X-Google-Smtp-Source: ABdhPJxrZpD7rzEzckUUUuQvhRd7l/DqYqMHO2oW1CGrU2u/wBHqoydv0Sul+xsJTCKytwiLzNFXRIgVDk+furDWrLc= X-Received: by 2002:a67:cb81:0:b0:328:da1:312b with SMTP id h1-20020a67cb81000000b003280da1312bmr4497196vsl.6.1649475715041; Fri, 08 Apr 2022 20:41:55 -0700 (PDT) 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 References: In-Reply-To: From: Warner Losh Date: Fri, 8 Apr 2022 21:41:44 -0600 Message-ID: Subject: Re: [RFC] patch's default backup behavior To: Kyle Evans Cc: "freebsd-arch@freebsd.org" , FreeBSD Hackers , ports-list freebsd Content-Type: multipart/alternative; boundary="0000000000000fa54005dc307e7e" X-Rspamd-Queue-Id: 4Kb1Bq4dlXz3NgS X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20210112.gappssmtp.com header.s=20210112 header.b="Y/1zsl7W"; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::e35) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-3.00 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20210112.gappssmtp.com:s=20210112]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20210112.gappssmtp.com:+]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::e35:from]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; MLMMJ_DEST(0.00)[freebsd-hackers]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; R_SPF_NA(0.00)[no SPF record]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com] X-ThisMailContainsUnwantedMimeParts: N --0000000000000fa54005dc307e7e Content-Type: text/plain; charset="UTF-8" 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 value? I like the Idea. Warner Thanks, > > Kyle Evans > > --0000000000000fa54005dc307e7e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Fri, Apr 8, 2022, 9:26 PM Kyle Evans <kevans@fre= ebsd.org> 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 value?

= I like the Idea.=C2=A0

W= arner=C2=A0

Thanks,

Kyle Evans

--0000000000000fa54005dc307e7e--