bugfindutils - Bugs: bug #63781, The number of characters cannot be...

 
 

bug #63781: The number of characters cannot be checked correctly with the -name option.

Submitter:  Moto <moto>
Submitted:  Fri 10 Feb 2023 07:29:14 AM UTC
   
 
Category:  find Severity:  3 - Normal
Item Group:  Wrong result Status:  Working as Intended
Privacy:  Public Assigned to:  berny
Originator Name:  Open/Closed:  Closed
Release:  4.8.0 Fixed Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Wed 15 Feb 2023 07:26:57 AM UTC, comment #6: 

Thanks for the feedback.
As such, I'm hereby closig this issue in our bug tracker.

Have a nice day,
Berny

Bernhard Voelker <berny>
Group administrator
Tue 14 Feb 2023 12:40:22 AM UTC, comment #5: 

Thank you for your answer.

Moto <moto>
Mon 13 Feb 2023 07:11:04 PM UTC, comment #4: 

As documented, find(1) relies on the system's fnmatch(3) function, i.e., that in glibc.  Of course, it's possible that
there was a change in that area.  I'm not aware of a change
in that area in findutils between 4.6.0 and 4.8.0.

Bernhard Voelker <berny>
Group administrator
Sun 12 Feb 2023 11:34:13 PM UTC, comment #3: 

Could it be a redhat-specific issue?

Moto <moto>
Sun 12 Feb 2023 11:24:36 PM UTC, comment #2: 

Was there a fix that behaved differently between versions 4.6.0 and 4.8.0 of findutils?

▼ver8.5
# rpm -qa | grep find
findutils-4.6.0-20.el8.x86_64
# locale
LANG=ja_JP.UTF-8
LC_CTYPE="ja_JP.UTF-8"
LC_NUMERIC="ja_JP.UTF-8"
LC_TIME="ja_JP.UTF-8"
LC_COLLATE="ja_JP.UTF-8"
LC_MONETARY="ja_JP.UTF-8"
LC_MESSAGES="ja_JP.UTF-8"
LC_PAPER="ja_JP.UTF-8"
LC_NAME="ja_JP.UTF-8"
LC_ADDRESS="ja_JP.UTF-8"
LC_TELEPHONE="ja_JP.UTF-8"
LC_MEASUREMENT="ja_JP.UTF-8"
LC_IDENTIFICATION="ja_JP.UTF-8"
LC_ALL=

▼ver9.1
# rpm -qa | grep find
findutils-4.8.0-5.el9.x86_64
# locale
LANG=ja_JP.UTF-8
LC_CTYPE="ja_JP.UTF-8"
LC_NUMERIC="ja_JP.UTF-8"
LC_TIME="ja_JP.UTF-8"
LC_COLLATE="ja_JP.UTF-8"
LC_MONETARY="ja_JP.UTF-8"
LC_MESSAGES="ja_JP.UTF-8"
LC_PAPER="ja_JP.UTF-8"
LC_NAME="ja_JP.UTF-8"
LC_ADDRESS="ja_JP.UTF-8"
LC_TELEPHONE="ja_JP.UTF-8"
LC_MEASUREMENT="ja_JP.UTF-8"
LC_IDENTIFICATION="ja_JP.UTF-8"
LC_ALL=

Moto <moto>
Fri 10 Feb 2023 08:21:15 PM UTC, comment #1: 

It's not clear from the bug report, but I assume that both
OSs use the same findutils version 4.8.0, right?

Apart from that it's possible that the downstream maintainer
has added distribution-specific patches which might change
the result, I'm pretty sure that the difference comes from
a different `locale` setting.

See man page:

LC_ALL If set to a non-empty string value, override the values of all the other internationalization variables.

LC_COLLATE
   The POSIX standard specifies that this variable affects the pattern matching to be used for the -name option.
   GNU find uses the fnmatch(3) library function, and so support for LC_COLLATE depends on the system library.
   This  variable  also  affects the interpretation of the response to -ok; while the LC_MESSAGES variable
   selects the actual pattern used to interpret the response to -ok, the interpretation of any bracket
   expressions in the pattern will be affected by LC_COLLATE.

LC_CTYPE
   This  variable affects the treatment of character classes used in regular expressions and also with
   the -name test, if the system's fnmatch(3) library function supports this.  This variable also affects
   the interpretation of any character classes in the regular expressions used to interpret the response
   to the prompt issued by -ok.  The LC_CTYPE environment variable will also affect which characters are
   considered to be unprintable when filenames are printed; see the section UNUSUAL FILENAMES.


Bernhard Voelker <berny>
Group administrator
Fri 10 Feb 2023 07:29:14 AM UTC, original submission:  

An event occurred in which RHEL8.5 and RockyLinux9.1 behaved differently in the process of checking the file name length. The file name contains Japanese characters. Why does find behave differently between ver8.5 and ver9.1? Please let me know if there is a workaround.

▼command

find "." -name "????????????????????????????????????????????????????????????????*" | wc -l

▼result Ver8.5

0

▼result Ver9.1

13

▼command

 find "." -name "????????????????????????????????????????????????????????????????*"

▼result ver9.1

./rgbe/納品/201610/Insert_UzT0301BatchInformation_継続検査用納税証明書発行.sql
./rgbc/testData/sql/設定切替/申告書・納付書一体型_カスタマイズ01へ変更.sql
./_customize/Normal/rgbf/old(rgbf_initialData_Authorityに格納されていたもの)
./rgbb/rgbb_BbFs0051調定表個別データ作成_異動事由区分取得.udf
./rgbb/rgbb_BbFt0038_納税通知書発行対象者一覧_未発行分.udf
./rgbb/rgbb_BbFt0039_納税通知書発行対象者一覧_範囲指定.udf
./rgbb/rgbb_BbFt0040_納税通知書発行対象者一覧_過去発行.udf
./rgbb/rgbb_BbFt0042更正通知書with納通_未発行_納税対象.udf
./rgbb/rgbb_BbFt0043更正通知書with納通_未発行_納税対象外.udf
./rgbb/rgbb_BbFt0044_仮徴収停止通知書発行対象者一覧_未発.udf
./rgbb/rgbb_BbFt0045_仮徴収停止通知書発行対象者一覧_範囲.udf
./rgbb/rgbb_BbFt0045更正通知書with納通_抽出_納税対象外.udf
./rgbb/rgbb_BbFt0046_仮徴収停止通知書発行対象者一覧_過去.udf

▼command

 find . -name "*1調定表個別データ作成_異動事由区分取得.udf*"

▼result ver8.5

./rgbb/rgbb_BbFs0051調定表個別データ作成_異動事由区分取得.udf

Moto <moto>

 

(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 berny (Posted a comment)
  • -email is unavailable- added by moto (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-02-15 berny Open/ClosedOpen Closed
    2023-02-10 berny StatusNone Working as Intended
        Assigned toNone berny

    Back to the top

    Powered by Savane 3.12.
    Corresponding source code