Re: git: 8ea6c1154094 - main - usr.bin/bc: remove OpenBSD derived bc and dc commands

From: Stefan_Eßer <se_at_FreeBSD.org>
Date: Mon, 25 Nov 2024 16:03:02 UTC
Am 25.11.24 um 15:25 schrieb Kyle Evans:
> On 11/24/24 16:08, Stefan Eßer wrote:
>> The branch main has been updated by se:
>>
>> URL: https://cgit.FreeBSD.org/src/commit/? 
>> id=8ea6c115409450ff58a8c6b5e818319d181c6bff
>>
>> commit 8ea6c115409450ff58a8c6b5e818319d181c6bff
>> Author:     Stefan Eßer <se@FreeBSD.org>
>> AuthorDate: 2024-11-24 21:38:23 +0000
>> Commit:     Stefan Eßer <se@FreeBSD.org>
>> CommitDate: 2024-11-24 21:38:23 +0000
>>
>>      usr.bin/bc: remove OpenBSD derived bc and dc commands
>>      In 2020, an improved implementation of the bc and dc commands
>>      developed by Gavin D. Howard has been imported into FreeBSD.
>>      It has replaced the OpenBSD-derived versions of these commands
>>      in all currently supported FreeBSD releases.
>>      The OpenBSD versions could still be built using the WITHOUT_GH_BC
>>      option. There have been no reports of problems or unexpected
>>      deviations from the OpenBSD version for some time, therefore
>>      keeping the OpenBSD version is no longer required in FreeBSD.
>>      This commit removes the option to build the OpenBSD version and
>>      corresponding source files from -CURRENT. No MFC is planned, all
>>      currently released FreeBSD versions should retain the build option.
>>      The WITHOUT_GH_BC option is no longer accepted and will cause
>>      make buildworld to fail.
> 
> What does this mean?  It's not clear from the diff; it looks like you just 
> removed the option, which generally doesn't mean 'make buildworld' will fail if 
> the knob is exercised -- just that the knob doesn't do anything.  Was this just 
> supposed to mean that it's no longer accepted because it would have caused 
> buildworld to fail?

Hi Kyle,

I must have been wrong about WITHOUT_GH_BC now causing build errors. I suspect
there was a problem with this option in /etc/src.conf while I was preparing the
patch, but I don't remember any details.

I wanted to warn that this option was a possible cause of build failures, but
it seems that warning was unfounded.

>  > [... snip ...]
>  >
>> diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc
>> index 1378d6b6dcfa..5362ba0e5955 100644
>> --- a/ObsoleteFiles.inc
>> +++ b/ObsoleteFiles.inc
>> @@ -51,6 +51,13 @@
>>   #   xargs -n1 | sort | uniq -d;
>>   # done
>> +# 20241124: library and tests of OpenBSD dc
>> +OLD_FILES+=usr/share/misc/bc.library
>> +OLD_FILES+=usr/tests/usr.bin/dc/Kyuafile
>> +OLD_FILES+=usr/tests/usr.bin/dc/bcode
>> +OLD_FILES+=usr/tests/usr.bin/dc/inout
>> +OLD_DIRS+=usr/tests/usr.bin/dc
>> +
>>   # 20241119: rewrite mv tests
>>   OLD_FILES+=usr/tests/bin/mv/legacy_test
> 
> This seems to have missed removing the associated mtree entry in ^/etc/mtree/ 
> BSD.tests.dist.

Thank you for pointing this out!
I have removed creation of tests/usr.bin/dc in commit aa308b49e3a1.

Best regards, STefan