A NOTE has been added to this issue. 
====================================================================== 
https://austingroupbugs.net/view.php?id=1457 
====================================================================== 
Reported By:                steffen
Assigned To:                ajosey
====================================================================== 
Project:                    1003.1(2016/18)/Issue7+TC2
Issue ID:                   1457
Category:                   Shell and Utilities
Type:                       Enhancement Request
Severity:                   Editorial
Priority:                   normal
Status:                     Under Review
Name:                       Steffen Nurpmeso 
Organization:                
User Reference:              
Section:                    Vol. 3: Shell and Utilities. 
Page Number:                (page or range of pages) 
Line Number:                (Line or range of lines) 
Interp Status:              --- 
Final Accepted Text:         
====================================================================== 
Date Submitted:             2021-03-09 21:21 UTC
Last Modified:              2022-02-25 21:24 UTC
====================================================================== 
Summary:                    Add readlink(1) utility
====================================================================== 

---------------------------------------------------------------------- 
 (0005721) mirabilos (reporter) - 2022-02-25 21:24
 https://austingroupbugs.net/view.php?id=1457#c5721 
---------------------------------------------------------------------- 
mksh has a realpath builtin, please don’t add an incompatible requirement
if you do ;-)

It takes an optional first argument "--" (skipped) and a mandatory second
argument (file); no options, and any other arguments cause an error message
as well.

I’ve recently learnt about some differences between BSD and POSIX
realpath on the C level (from reading the OpenSSH mailing list). The
realpath in mksh is specified to allow referring to nōnexistant files in
existing directories, which I understand is very much not a POSIX thing.
Without that, though, I’d consider it good as useless (one can always add
a test -e afterwards).

https://github.com/MirBSD/mksh/blob/5d135a8ee38d84c5a4f6c175b9a831d5acbc641b/misc.c#L1886
in case of interest.

I understand other OSes have diverging realpath utilities. mksh has a mode
where a utility can call the builtin or an external one depending on the
existence of the latter and, optionally, presence of flags. The latter is
implemented for realpath, so “realpath -h” calls coreutils’ realpath
on my GNU system, but not on the BSD system without an external realpath
utility. This is a compromise.

“readlink” is important. I’d argue for standardised readlink without
and with -f but not adding realpath (unless the latter can be done in a way
that doesn’t blow up (remember the story of cat(1) that went out and came
back waving flags) mksh or, worse, make its implementation incompatible). 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2021-03-09 21:21 steffen        New Issue                                    
2021-03-09 21:21 steffen        Status                   New => Under Review 
2021-03-09 21:21 steffen        Assigned To               => ajosey          
2021-03-09 21:21 steffen        Name                      => Steffen Nurpmeso
2021-03-09 21:21 steffen        Section                   => Vol. 3: Shell and
Utilities.
2021-03-09 21:21 steffen        Page Number               => (page or range of
pages)
2021-03-09 21:21 steffen        Line Number               => (Line or range of
lines)
2021-03-10 04:11 emaste         Issue Monitored: emaste                      
2022-02-22 15:58 geoffclare     Note Added: 0005700                          
2022-02-22 16:01 geoffclare     Note Edited: 0005700                         
2022-02-22 16:09 geoffclare     Note Edited: 0005700                         
2022-02-22 16:11 geoffclare     Project                  1003.1(2008)/Issue 7 =>
1003.1(2016/18)/Issue7+TC2
2022-02-22 16:13 geoffclare     Note Edited: 0005700                         
2022-02-22 21:39 emaste         Note Added: 0005701                          
2022-02-22 21:41 emaste         Note Deleted: 0005701                        
2022-02-22 22:19 steffen        Note Added: 0005702                          
2022-02-22 22:34 calestyo       Issue Monitored: calestyo                    
2022-02-23 08:32 geoffclare     Note Added: 0005703                          
2022-02-23 13:31 emaste         Note Added: 0005704                          
2022-02-23 13:38 calestyo       Note Added: 0005705                          
2022-02-24 09:28 geoffclare     Note Added: 0005706                          
2022-02-24 09:32 geoffclare     Note Edited: 0005700                         
2022-02-24 09:34 geoffclare     Note Edited: 0005700                         
2022-02-24 09:36 geoffclare     Note Edited: 0005703                         
2022-02-25 21:24 mirabilos      Note Added: 0005721                          
======================================================================


              • ... Geoff Clare via austin-group-l at The Open Group
              • ... Robert Elz via austin-group-l at The Open Group
              • ... Geoff Clare via austin-group-l at The Open Group
              • ... Geoff Clare via austin-group-l at The Open Group
              • ... Robert Elz via austin-group-l at The Open Group
          • ... Jonathan Wakely via austin-group-l at The Open Group
          • ... Robert Elz via austin-group-l at The Open Group
            • ... Jonathan Wakely via austin-group-l at The Open Group
              • ... Jonathan Wakely via austin-group-l at The Open Group
              • ... G. Branden Robinson via austin-group-l at The Open Group
  • [1003.1(2016... Austin Group Bug Tracker via austin-group-l at The Open Group
    • Re: [10... Robert Elz via austin-group-l at The Open Group
      • Re:... Thorsten Glaser via austin-group-l at The Open Group
      • Re:... Robert Elz via austin-group-l at The Open Group
  • [1003.1(2016... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [1003.1(2016... Austin Group Bug Tracker via austin-group-l at The Open Group
    • Re: [10... Quentin Rameau via austin-group-l at The Open Group
      • Re:... Eric Blake via austin-group-l at The Open Group
      • Re:... Robert Elz via austin-group-l at The Open Group
        • ... Jonathan Wakely via austin-group-l at The Open Group
          • ... Eric Blake via austin-group-l at The Open Group

Reply via email to