Re: Error in 'make-ca' script

"Xi Ruoyao" ([email protected] via blfs-dev Mailing List) <[email protected]> Tue, 03 Feb 2026 11:01:12 +0800
Newsgroups gmane.linux.lfs.beyond.devel
Message-ID <[email protected]>
On Mon, 2026-02-02 at 19:52 -0600, Bruce Dubbs wrote:
> On 2/2/26 7:23 PM, Xi Ruoyao ([email protected] via blfs-dev Mailing List) wrote:
> > On Mon, 2026-02-02 at 15:06 -0600, Bruce Dubbs wrote:
> > > On 2/2/26 2:47 PM, "Erwin" ([email protected] via blfs-dev Mailing List) wrote:
> > > > The 'make-ca' script does not work when the environment variable TMPDIR is
> > > > set.
> > > > The script contains several calls of 'mktemp'.
> > > > On call is:  mktemp -p ${TEMPDIR}/certs -t make-ca.XXXXXXXX.tmp
> > > > Unfortunately the parameter '-p' is ignored when $TMPDIR is set
> > > > such that the temporary file is created in the wrong directory.
> > > > A solution could be to unset TMPDIR before 'mktemp -p' is called.
> > > > 
> > > > The manual of 'mktemp' suggests that the parameter '-p' has precedence over
> > > > $TMPDIR.
> > > > But a simple test shows that $TMPDIR has precedence instead.
> > > > 
> > > > 'mktemp' from coreutils 9.9 has been used.
> > > 
> > > Our use is according to the man page.  If the implementation is not in accordance
> > > with that, then you should probably report it to the coreutils developers.
> > 
> > The problem is the manual states:
> > 
> >         -t     interpret TEMPLATE as a single file name component, relative to a
> >                directory:  $TMPDIR, if set; else the directory specified via -p;
> >                else /tmp [deprecated]
> > 
> > Thus if -t is used and TMPDIR is set, mktemp will ignore the directory
> > gave via -p.
> > 
> > How about just removing -t here?  It's deprecated anyway.
> 
> Hmm.  OK.  I looked for 'mktemp.*-t' and found two instances.  I guess we could make 
> that a sed instead of a whole new release.  It seems to be a a rather unusual corner 
> case where the environment variable TMPDIR is set.
> 
> Xi, do you want to do that?

Done.


-- 
Xi Ruoyao <[email protected]>

-- 
http://lists.linuxfromscratch.org/sympa/info/blfs-dev
Unsubscribe: See the above information page