Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 52871 - ar generates bad name for temporary file when creating ar archive using mri-script
ar generates bad name for temporary file when creating ar archive using mri-s...
Status: CLOSED WORKSFORME
Product: Red Hat Linux
Classification: Retired
Component: binutils (Show other bugs)
7.1
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
David Lawrence
http://sources.redhat.com/ml/bug-binu...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-08-30 05:07 EDT by seiki
Modified: 2007-04-18 12:36 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-02 15:41:46 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description seiki 2001-08-30 05:07:46 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; NetCaptor 
6.5.0B7)

Description of problem:
The 'ar' command prepend 'tmp-' prefix for name of temporary file when 
creating archive using CREATE command of mri-script ('-M' option).
'echo CREATE ../../test.a | ar -M' produce error message '


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. 'echo CREATE /tmp/test.a | ar -M'


Actual Results:  Error Message: Can't open output archive tmp-/tmp/test.a


Expected Results:  create an empty archive '/tmp/test.a' silently


Additional info:

function 'ar_open()' in arsup.c is problematic.
should prepend 'tmp-' prefix to base name of path name.
patch at the attached URL does not work when path name contains more than 
single path separator ('/' or '\').
Comment 1 seiki 2001-08-30 05:24:00 EDT
Expected Results was not correct: '/tmp/test.a' will not be created
Comment 2 Jakub Jelinek 2001-10-18 05:38:54 EDT
See http://sources.redhat.com/ml/binutils/2001-10/msg00337.html
BTW: If you want to create empty /tmp/test.a archive, you need to do:
echo -e 'CREATE /tmp/test.a\nSAVE' | ar -M
(SAVE is important).
Comment 3 seiki 2002-08-08 02:14:46 EDT
Not resolved in 7.2 either
Comment 4 Jakub Jelinek 2004-10-02 15:41:46 EDT
echo -e 'CREATE /tmp/test.a\nSAVE' | ar -M
definitely works in current binutils, and as mentioned above
without SAVE the command doesn't write any output.

Note You need to log in before you can comment on or make changes to this bug.