mainAutoconf - Support: sr #110971, busybox mkdir is misdetected

 
 

sr #110971: busybox mkdir is misdetected

Submitter:  Valery Ushakov <uwe>
Submitted:  Wed 06 Dec 2023 11:01:58 AM UTC
   
 
Priority:  * 7 - Release N (Desirable) Severity:  3 - Normal
Status:  Done Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Operating System:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Wed 13 Dec 2023 01:58:12 PM UTC, comment #7: 
Zack Weinberg <zackw>
Group administrator
Fri 08 Dec 2023 03:33:12 PM UTC, comment #6: 

Fair enough.  I will try to find an Alpine system to test on.

Zack Weinberg <zackw>
Group administrator
Thu 07 Dec 2023 06:41:32 PM UTC, comment #5: 

comment #4:

> It seems to me it will be more robust to filter out the troublesome error message


Not really, as BusyBox plausibly might change that diagnostic's wording and then the filtering will stop working. Conversely, if the output of 'mkdir --version' says "BusyBox" it's extreeeemly likely that it's BusyBox.

Paul Eggert <eggert>
Group administrator
Thu 07 Dec 2023 06:26:22 PM UTC, comment #4: 

It seems to me it will be more robust to filter out the troublesome error message and leave the match patterns alone, but I could be persuaded otherwise.

Zack Weinberg <zackw>
Group administrator
Thu 07 Dec 2023 03:43:24 AM UTC, comment #3: 

Wouldn't this patch be simpler?


diff --git a/lib/autoconf/programs.m4 b/lib/autoconf/programs.m4
index d06d18c4..8226a7c7 100644
--- a/lib/autoconf/programs.m4
+++ b/lib/autoconf/programs.m4
@@ -700,7 +700,7 @@ if test -z "$MKDIR_P"; then
            AS_EXECUTABLE_P(["$as_dir$ac_prog$ac_exec_ext"]) || continue
            case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
              'mkdir ('*'coreutils) '* | \
-             'BusyBox '* | \
+             *'BusyBox '* | \
              'mkdir (fileutils) '4.1*)
                ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
                break 3;;


Paul Eggert <eggert>
Group administrator
Wed 06 Dec 2023 10:10:25 PM UTC, comment #2: 

Could you please test this patch (apply to autoconf git trunk)?

diff --git a/lib/autoconf/programs.m4 b/lib/autoconf/programs.m4
index d06d18c4..9ab71c38 100644
--- a/lib/autoconf/programs.m4
+++ b/lib/autoconf/programs.m4
@@ -698,7 +698,8 @@ if test -z "$MKDIR_P"; then
       [for ac_prog in mkdir gmkdir; do
          for ac_exec_ext in '' $ac_executable_extensions; do
            AS_EXECUTABLE_P(["$as_dir$ac_prog$ac_exec_ext"]) || continue
-           case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
+           case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1 |
+                 grep -v "unrecognized option"` in #(
              'mkdir ('*'coreutils) '* | \
              'BusyBox '* | \
              'mkdir (fileutils) '4.1*)


Zack Weinberg <zackw>
Group administrator
Wed 06 Dec 2023 07:48:05 PM UTC, comment #1: 

This might be less of problem b/c of the fix for bug #110740 in 2.72d.

Valery Ushakov <uwe>
Wed 06 Dec 2023 11:01:58 AM UTC, original submission:  

AC_PROG_MKDIR_P checks the output of mkdir --version with

  case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in
    ...

and checks for busybox with the pattern

  'BusyBox '*

However that pattern fails because in

  uwe@Alpine:~$ busybox mkdir --version 2>&1
  mkdir: unrecognized option: version
  BusyBox v1.36.1 (2023-11-07 18:53:09 UTC) multi-call binary.

  Usage: mkdir [-m MODE] [-p] DIRECTORY...
  ...

the error message about unrecognized option gets in the way.


Either stderr should be redirected away to /dev/null or the pattern changed by prepending a * before BusyBox.

Valery Ushakov <uwe>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by eggert (Posted a comment)
  • -email is unavailable- added by zackw (Posted a comment)
  • -email is unavailable- added by uwe (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-12-13 zackw StatusConfirmed Done
        Open/ClosedOpen Closed
    2023-12-08 zackw StatusNone Confirmed
    2023-12-08 zackw Priority5 - Unprioritized 7 - Release N (Desirable)

    Back to the top

    Powered by Savane 3.13-bb6a.
    Corresponding source code