bugGNU roff - Bugs: bug #44890, [gropdf] find(1)'s -maxdepth...

 
 

bug #44890: [gropdf] find(1)'s -maxdepth option is not portable

Submitter:  Peter Bray <illumino>
Submitted:  Tue 21 Apr 2015 06:47:00 AM UTC
   
 
Category:  Driver gropdf Severity:  3 - Normal
Item Group:  Incorrect behaviour Status:  Fixed
Privacy:  Public Assigned to:  deri
Open/Closed:  Closed Planned Release:  1.22.4
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 23 Apr 2015 02:08:42 AM UTC, comment #3: 

Deri,

Built against updated git repo as at 2015/04/23 - fonts are now installed in the share/groff/<version>/font/devpdf tree on Solaris 10 and Solaris 11.

Many Thanks,
Peter

Peter Bray <illumino>
Tue 21 Apr 2015 08:24:29 PM UTC, comment #2: 

Patch installed. Many thanks Peter.

Deri James <deri>
Group Member
Tue 21 Apr 2015 07:13:49 AM UTC, comment #1: 

Indeed.  The `-maxdepth' limitation is also documented in the `autoconf' info manual.

Deri, I'm assigning this to you – feel free to install this very small patch in case you are OK with it.

Werner LEMBERG <wl>
Group administrator
Tue 21 Apr 2015 06:47:00 AM UTC, original submission:  

Greetings,

The file font/devpdf/devpdf.am, Line 24 use GNU find's -maxdepth option.

    23  GROFF_FONT_FILES=`cd $(top_builddir)/font/devpdf \
    24                    && find * -maxdepth 0 -type f ! -name 'devpdf.am' \
    25                              -exec grep -l internalname {} \;`

This breaks quietly on Solaris 10, but stops the build on Solaris 11
systems.  On Solaris 10 this result in a number of files not being
installed (when compared to a "fixed" build)

It seems the intent is to list the filenames in the current directory
that contain the string "internalname" except the file 'devpdf.am'.

The following show the summarized results of the GNU find version, and
two possible alternate implementations. Drop the wc -l to convince
yourself, these results are the same.

% ( cd font/devpdf ; gfind * -maxdepth 0 -type f ! -name 'devpdf.am' \
                       -exec grep -l internalname {} \; ) | wc -l
      71

% ( cd font/devpdf ; grep -l internalname * | grep -v devpdf.am ) | wc -l
      71

% ( cd font/devpdf ; grep -l internalname [A-Z]* ) | wc -l
      71

Question: Are font names in this directory always [A-Z]* ?

I tested the middle approach in the provided patch. It seems to work
with Solaris grep as part of the normal build process, and on the
command line with GNU grep 2.5.1.

This appears to be the only use of find's -maxdepth in the project.

Additionally, the process of building "font/devpdf/build_font_files",
the BuildFoundries command can call "missing", which is located in the
"build-aux" directory. This is not part of the PATH variable setup for
that command invocation. The attached patch also fixes that issue.

Regards,
Peter Bray
Sydney, Australia


Peter Bray <illumino>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #33733:  devpdf.am.diff added by illumino (1KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gbranden (Updated the item)
  • -email is unavailable- added by deri (Posted a comment)
  • -email is unavailable- added by wl (Posted a comment)
  • -email is unavailable- added by illumino (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 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-05-02 gbranden CategoryNone Driver gropdf
        StatusNone Fixed
        Summary[git@2015_04_10] find's -maxdepth option is not portable [gropdf] find(1)'s -maxdepth option is not portable
    2015-04-21 deri Open/ClosedOpen Closed
        Planned ReleaseNone 1.22.4
    2015-04-21 wl Assigned toNone deri
    2015-04-21 illumino Attached File- Added devpdf.am.diff, #33733

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code