From nobody Mon May 02 20:09:30 2022 X-Original-To: freebsd-current@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 09B6A1AB287F for ; Mon, 2 May 2022 20:09:43 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-vk1-xa30.google.com (mail-vk1-xa30.google.com [IPv6:2607:f8b0:4864:20::a30]) (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 4KsZ1y0LQdz4gB8 for ; Mon, 2 May 2022 20:09:41 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-vk1-xa30.google.com with SMTP id y27so7082755vkl.8 for ; Mon, 02 May 2022 13:09:41 -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=0czNl5xnHcV3Jnxk26qsimE18Iq0rxQ5O6Wwkcqwybk=; b=A0xOvPFHkkH71ehKCe/4LKG+R9pSE602MSHRuVw6d8vdCu8/WGh57DcVZwcqiiAz8O xbp1XJGJPqpufS712Z91O8/KraB+3K4cLjPiOYZ2PO8S6UJtT77j6NEPzmp1cQn8yF95 ljnizS9NNWlRzyOvoZnC8y2ddP2eqmhi61cJ3LBLcmfeunuaWESD0nTRjaA9zuB3iEyz P8dL0p5r+13Apeb489uAkjOeMe6bN20OMQ1f8qYCBotyIs4AO3th5WSsXIatYC5cbBTp Yt/++DiOVdLDDfrBRkOkRh0SkHBssDbsohZRhx0zpj1Zc9d1vkf/3o2mSNC9IoH50Oq3 fEwQ== 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=0czNl5xnHcV3Jnxk26qsimE18Iq0rxQ5O6Wwkcqwybk=; b=h6owIwOG+0icq4HDqXxnt60HsweKyedMwpRncGYvxmcG2izDY7VQSE9BnwXrM3rGKo PQry8j/J53bBQskfOgwRIschYZUqHGhhtylj8/2j2qEAUCsKPWm6GRE4mtnYHnpHjnQG MsfmBkfoC6WYm/nSNhayiPK+tTN59xxikEFKw1Ck1bJCJWlwPGaFIWAnfYkr90tMUMLc DBclbdVkaUrkloVulQejU5YM9a6NylTFp13Gq0RLjx9/zMlCs0YyizeiR8rbafIvcEzX MfdHSXprwu8PPrsR71uledKWDbIvVGvmUzCYu463dtZtv2MdBhtTF0gIwrvb9vEff+m5 8HJA== X-Gm-Message-State: AOAM532+8xu15/KK1Iz5oX0u3RoFDHxqeq5Aoijz20FpsenTQBrGRO/q Z9zCOYI/PERuRV+OQFmhZBNn4Xy3RFw2GsTiW5Klj26pSWo= X-Google-Smtp-Source: ABdhPJxy95DeusrKMPmELu9DLI2QtWdFVKSWpo4ikHFIYnuIUBNIN2ihZEKZ9PVty0JHSgrJ0ba628XkqBKfCnNiSiA= X-Received: by 2002:a1f:ce46:0:b0:34e:b018:c8a4 with SMTP id e67-20020a1fce46000000b0034eb018c8a4mr2015055vkg.26.1651522181348; Mon, 02 May 2022 13:09:41 -0700 (PDT) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 References: <4ba8458e-db94-6f74-a8e0-ba71692ea72a@plan-b.pwste.edu.pl> In-Reply-To: <4ba8458e-db94-6f74-a8e0-ba71692ea72a@plan-b.pwste.edu.pl> From: Warner Losh Date: Mon, 2 May 2022 14:09:30 -0600 Message-ID: Subject: Re: discussion on future removal of empty $FreeBSD$ tags To: Marek Zarychta Cc: freeBSD Current , FreeBSD Hackers Content-Type: multipart/alternative; boundary="000000000000f552fa05de0cf892" X-Rspamd-Queue-Id: 4KsZ1y0LQdz4gB8 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20210112.gappssmtp.com header.s=20210112 header.b=A0xOvPFH; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::a30) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.00 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20210112.gappssmtp.com:s=20210112]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; SUBJECT_HAS_CURRENCY(1.00)[]; DMARC_NA(0.00)[bsdimp.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(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::a30:from]; MLMMJ_DEST(0.00)[freebsd-current]; 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 --000000000000f552fa05de0cf892 Content-Type: text/plain; charset="UTF-8" The current plans are to keep $FreeBSD$ in main until stable/12 is out of support. no new files will have it added, unless they are to be merged to stable/12 and are installed / managed by mergemaster. We'll do a coordinated sweep of the tree removing them after stable/12 drops out of support and we'll do similar commits to stable/13 to reduce as much as possible any merge conflicts after that point. stable/13 and newer they are, of course, just noise. mergemaster doesn't require them to be non-empty, but will skip modified files if they match. Though it's been a while since I've used mergemaster... It has no maintainer and only receives emergency fixes when something breaks (and it usually takes a while for the right people to notice). Warner On Mon, May 2, 2022 at 12:25 PM Marek Zarychta < zarychtam@plan-b.pwste.edu.pl> wrote: > Dear subscribers, > > after one of the recent commits[1] surprisingly we got rid of $FreeBSD$ > from among others, two configuration files: /etc/ssh/ssh_config and > /etc/ssh/sshd_config. I was told these IDs are going to be deprecated in > the whole source tree when 12.x branch reaches EoL, what is surprising > news, at least for me. While indeed empty $FreeBSD$ tags after the > transition to git became useless, leaving them in config files, still might > be handy. Please let me explain why. > > After the transition to git, a lot of people complained about breakage in > mergemaster(8). Finally, they were told that this tool is outdated, cannot > do 3-way merge, has no maintainer, etc. so it's going to be deprecated > soon. Then appropriate notice was added, the handbook got updated, so > seemingly everyone was fine with this depreciation. I am not going to bring > any serious arguments against etcupdate(8), but when providing support on > IRC, a few cases of foot shooting with this tool had been reported to me > and the last one happened this year IIRC. Moreover some people, including > me, just like and are used to old sdiff(1)-way work of mergemaster(8). So > soon after the transition to git to overcome this deficiency I wrote for > myself a git primer helping with quick creation of local repository > including $FreeBSD$ recreation for mergemaster(8) relying on empty > $FreeBSD$ tags. I will attach this primer[2] for users here, maybe someone > (noncommitter) will benefit from this (if it will not get burned with fire > here earlier). > > Please don't get me wrong, I am not fighting with etcupdate(8) which works > almost flawlessly in unison with freebsd-update(8), but people who follow > STABLE/CURRENT really do appreciate the existence of mergemaster(8) and > still use it behind the scenes, including probably members of core@ team. > I am only asking for leaving these empty $FreeBSD$ IDs in config files. > This will of course add some burden to committers' work but might be > beneficial in the future. I am neither committer, nor contributor, but the > voice from the userbase. > > Best regards, > > Marek Zarychta > > [1] https://cgit.freebsd.org/src/commit/?id=835ee05f > > [2] > > ######################################################## > # > # FreeBSD Git src with worktrees and clean/smudge filters > # for mergemaster(8) > # > ######################################################## > # Preparation of the tree > > zfs create zroot/usr/src_head > zfs create zroot/usr/src_13 > > ######################################################## > # Making src of stable/13 mountable in /usr/src > > echo "/usr/src_13 /usr/src nullfs rw,late 0 0" >> /etc/fstab > mount -al > > ######################################################## > # Cloning the repository > > cd /usr/src_head > git clone https://git.freebsd.org/src.git/ ./ > > ######################################################## > # Adding filters > # Filters require lang/ruby and lang/perl installed > > git config filter.freebsdid.smudge expand_freebsd > git config filter.freebsdid.clean 'perl -pe "s/\\\$FreeBSD[^\\\$]*\\\$/\\\$FreeBSD\\\$/"' > > ######################################################## > # Limiting filters scope > # In /usr/src_head create file .git/info/attributes with > # following contents (at least): > > ------------cut------------ > cat > .git/info/attributes << EOF > etc/* filter=freebsdid > etc/*/* filter=freebsdid > libexec/rc/* filter=freebsdid > libexec/rc/rc.d/* filter=freebsdid > *.conf filter=freebsdid > dot.??* filter=freebsdid > lib/libc/gen/shells filter=freebsdid > lib/libc/net/hosts filter=freebsdid > lib/libpam/pam.d/* filter=freebsdid > lib/libwrap/hosts.allow filter=freebsdid > usr.sbin/services_mkdb/services filter=freebsdid > usr.sbin/bsnmpd/bsnmpd/snmpd.config filter=freebsdid > usr.sbin/periodic/etc/* filter=freebsdid > usr.sbin/cron/cron/crontab filter=freebsdid > crypto/openssh/ssh*_config filter=freebsdid > EOF > ------------cut------------ > > ######################################################## > # Smudge filter setup > # Create file /usr/local/bin/expand_freebsd with following > # contents and make it executable. > > ------------cut------------ > #!/usr/bin/env ruby > data = STDIN.read > last_info = `git log --pretty=format:"%h %ae %ad" -1` > puts data.gsub('$FreeBSD$', '$FreeBSD: ' + last_info.to_s + '$') > ------------cut------------ > > chmod a+x /usr/local/bin/expand_freebsd > > ######################################################## > # Adding worktrees > # Add worktree for stable/13, filters will be applied > > git worktree add /usr/src_13 stable/13 > > # To have IDs in main (HEAD) > # do checkout of filtered files again > > cd /usr/src_head > rm etc/master.passwd etc/group > rm libexec/rc/rc.d/* > git checkout -f -- . > > ######################################################## > # To find more files with $FreeBSD tags which might > # be added to .git/info/attributes file issue command: > > find . -type f -a -not -name '*~' | xargs grep -l '$FreeBSD' > > -- > Marek Zarychta > > --000000000000f552fa05de0cf892 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
The current plans are to keep $FreeBSD$ in main until stab= le/12 is out of support. no new files will have it added, unless they are t= o be merged to stable/12 and are installed / managed by mergemaster.
We'll do a coordinated sweep of the tree removing them aft= er stable/12 drops out of support and we'll do similar commits to stabl= e/13 to reduce as much as possible any merge conflicts after that point.

stable/13 and newer they are, of course, just noise.= mergemaster doesn't require them to be non-empty, but will skip modifi= ed files if they match. Though it's been a while since I've used me= rgemaster... It has no maintainer and only receives emergency fixes when so= mething breaks (and it usually takes a while for the right people to notice= ).

Warner

On Mon, May 2, 2022 at 12:25 PM Mar= ek Zarychta <zarychtam@= plan-b.pwste.edu.pl> wrote:
=20 =20 =20

Dear subscribers,

after one of the recent commits[1] surprisingly we got rid of $FreeBSD$ from among others, two configuration files: /etc/ssh/ssh_config and /etc/ssh/sshd_config. I was told these IDs are going to be deprecated in the whole source tree when 12.x branch reaches EoL, what is surprising news, at least for me. While indeed empty $FreeBSD$ tags after the transition to git became useless, leaving them in config files, still might be handy. Please let me explain why.

After the transition to git, a lot of people complained about breakage in mergemaster(8). Finally, they were told that this tool is outdated, cannot do 3-way merge, has no maintainer, etc. so it's going to be deprecated soon. Then appropriate notice was added, the handbook got updated, so seemingly everyone was fine with this depreciation. I am not going to bring any serious arguments against etcupdate(8), but when providing support on IRC, a few cases of foot shooting with this tool had been reported to me and the last one happened this year IIRC. Moreover some people, including me, just like and are used to old sdiff(1)-way work of mergemaster(8).=C2=A0 So soon after the transition to git to overcome this deficiency I wrote for myself a git primer helping with quick creation of local repository including $FreeBSD$ recreation for mergemaster(8) relying on empty $FreeBSD$ tags. I will attach this primer[2] for users here, maybe someone (noncommitter) will benefit from this (if it will not get burned with fire here earlier).

Please don't get me wrong, I am not fighting with etcupdate(8) which works almost flawlessly in unison with freebsd-update(8), but people who follow STABLE/CURRENT really do appreciate the existence of mergemaster(8) and still use it behind the scenes, including probably members of core@ team. I am only asking for leaving these empty $FreeBSD$ IDs in config files. This will of course add some burden to committers' work but might be beneficia= l in the future. I am neither committer, nor contributor, but the voice from the userbase.

Best regards,

Marek Zarychta

[1] https://cgit.freebsd.org/src/commit/?id=3D835ee05f

[2]

########################################################
#
# FreeBSD Git src with worktrees and clean/smudge filters=20
# for mergemaster(8)
#
########################################################
# Preparation of the tree

zfs create zroot/usr/src_head
zfs create zroot/usr/src_13

########################################################
# Making src of stable/13 mountable in /usr/src
=20
echo "/usr/src_13 	/usr/src 		nullfs rw,late 0 0" >> /etc/f=
stab
mount -al

########################################################
# Cloning the repository

cd /usr/src_head
git clone ht=
tps://git.freebsd.org/src.git/ ./

########################################################
# Adding filters
# Filters require lang/ruby and lang/perl installed

git config filter.freebsdid.smudge expand_freebsd
git config filter.freebsdid.clean 'perl -pe "s/\\\$FreeBSD[^\\\$]*=
\\\$/\\\$FreeBSD\\\$/"'

########################################################
# Limiting filters scope
# In /usr/src_head create file .git/info/attributes with=20
# following contents (at least):

------------cut------------
cat > .git/info/attributes << EOF
etc/* 	                filter=3Dfreebsdid
etc/*/*                 filter=3Dfreebsdid
libexec/rc/*            filter=3Dfreebsdid
libexec/rc/rc.d/*       filter=3Dfreebsdid
*.conf                  filter=3Dfreebsdid
dot.??*                 filter=3Dfreebsdid
lib/libc/gen/shells     filter=3Dfreebsdid
lib/libc/net/hosts      filter=3Dfreebsdid
lib/libpam/pam.d/*      filter=3Dfreebsdid
lib/libwrap/hosts.allow filter=3Dfreebsdid
usr.sbin/services_mkdb/services filter=3Dfreebsdid
usr.sbin/bsnmpd/bsnmpd/snmpd.config filter=3Dfreebsdid
usr.sbin/periodic/etc/* filter=3Dfreebsdid
usr.sbin/cron/cron/crontab filter=3Dfreebsdid
crypto/openssh/ssh*_config filter=3Dfreebsdid
EOF
------------cut------------

########################################################
# Smudge filter setup
# Create file /usr/local/bin/expand_freebsd with following=20
# contents and make it executable.

------------cut------------
#!/usr/bin/env ruby
data =3D STDIN.read
last_info =3D `git log --pretty=3Dformat:"%h %ae %ad" -1`
puts data.gsub('$FreeBSD$', '$FreeBSD: ' + last_info.to_s +=
 '$')
------------cut------------

chmod a+x /usr/local/bin/expand_freebsd=20

########################################################
# Adding worktrees
# Add worktree for stable/13, filters will be applied

git worktree add /usr/src_13 stable/13

# To have IDs in main (HEAD)=20
# do checkout of filtered files again

cd /usr/src_head
rm etc/master.passwd etc/group=20
rm libexec/rc/rc.d/*
git checkout -f -- .

########################################################
# To find more files with $FreeBSD tags which might
# be added to .git/info/attributes file issue command:=20

find . -type f -a -not -name '*~' | xargs grep -l '$FreeBSD'=
; 

--=20
Marek Zarychta
--000000000000f552fa05de0cf892--