Date: Fri, 12 Feb 2021 03:37:25 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 252132] mergemaster: needs to cope with empty $FreeBSD$ tags or /etc files must have $FreeBSD: number$ Message-ID: <bug-252132-227-dLE5goeX61@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-252132-227@https.bugs.freebsd.org/bugzilla/> References: <bug-252132-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D252132 Katsuyuki Miyoshi <katsubsd@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katsubsd@gmail.com --- Comment #3 from Katsuyuki Miyoshi <katsubsd@gmail.com> --- Created attachment 222381 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D222381&action= =3Dedit id_tools.tar.gz This is my personal solution. My solution is to replace "$FreeBSD$" with "$FreeBSD: MD5 $". (MD5 is the MD5 checksum of the source file.) "$FreeBSD: MD5 $" is not the original "$FreeBSD$" format, but it is useful enough for mergemaster. I'm happy with these. However, I don't know if these are enough for everyone who does various tasks. And, I don't even know what will happen to "$FreeBS= D$" in the future. I hope that a better response will be made. Here are the steps: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D [Provides 3 files] replace_id.sh: This is a script that replaces "$FreeBSD ... $" in files installed by "make distribution" with "$FreeBSD: MD5 $". src_id.sh: This is a git filter script. post-commit: This is a git hook script. ---------------------------------------------------------------------- [0] Start with the mergemaster completed by the traditional way. It doesn't matter if you use a subversion repository, a git repository, or= any revision of the source files.=20 ---------------------------------------------------------------------- [1-1] Backup the files installed by "make distribution" (That is, /etc/*, /root/*, and /boot/device.hints) It's not mandatory to do this, but I recommend that you back up your /etc, /root, /boot/device.hints files so that you can restore them in case of an accident. [1-2] # sh replace_id.sh Make sure the SOURCEDIR and DESTDIR in replace_id.sh are correct and run replace_id.sh. With the above, "$FreeBSD ... $" in files installed by "make distribution" = will be replaced with "$FreeBSD: MD5 $". Make sure those files are not corrupted. ---------------------------------------------------------------------- [2-1] Now let /usr/src be the new git repository. [2-2] Install "src_id.sh" in the appropriate directory in the ${PATH}. (ex: /usr/local/bin/src_id.sh) And, in the git repository: [2-3] # git config filter.src_id.smudge 'src_id.sh add' [2-4] # git config filter.src_id.clean 'src_id.sh del' [2-5] # echo '* filter=3Dsrc_id' >> .git/info/attributes [2-6] (After checking that your post-commit file doesn't exist in .git/hook= s) # /bin/cp post-commit .git/hooks [2-7] # git ls-files -z | /usr/bin/xargs -0 /bin/rm -f [2-8] # git checkout -f >From now on, even if you update the source files, mergemaster will work fin= e. ---------------------------------------------------------------------- [Notes] When you first run mergemaster after the above work, you will be asked to m= erge the following four files. /etc/mail/freebsd.cf /etc/mail/freebsd.submit.cf /etc/mail/sendmail.cf /etc/mail/submit.cf For these, please merge at that time. (This is because replace_id.sh doesn't support cases for those files.) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D That's all. Thanks. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-252132-227-dLE5goeX61>