#1060837 update-auctex-elisp --daemon creates INITFILE in /

#1060837#5
Date:
2024-01-15 11:49:12 UTC
From:
To:
Invoking

  /usr/sbin/update-auctex-elisp --daemon

creates and leaves behind INITFILE in /, from

    if [ -n "${DAEMON_MODE}" -a "${DAEMON_MODE}" = 'true' ]; then
        export _UPDATE_AUCTEX_ELISP_DAEMON_MODE=${DAEMON_MODE}
        cd / && nohup ${0} ${_FLAVORS} </dev/null &>/dev/null &

and

        INITFILE=$(mktemp ./XXXXXXXX-el)

Perhaps best to always create INITFILE in /tmp?

This is with current Debian testing/unstable.

Best
-k

#1060837#10
Date:
2024-04-09 06:23:01 UTC
From:
To:
Indeed, I think mktemp -t should be used. Also, while testing this, I
found update-auctex-elisp outputs

/update-auctex-elisp: line 126: [: -gt: unary operator expected

due to unset EXIT_STATUS, which should have a default value of zero. Patch
for both issues:
--- update-auctex-elisp.eperl.orig 2024-04-09 08:19:06.232939684 +0200 +++ update-auctex-elisp.eperl 2024-04-09 08:19:23.472885040 +0200 @@ -107,11 +107,12 @@ "(log to ${LOGFILE})..." if [ -z "${NO_ACT}" -o "${NO_ACT}" != 'true' ]; then exec {stdout}>&1 {stderr}>&2 &>${LOGFILE} - INITFILE=$(mktemp ./XXXXXXXX-el) + INITFILE=$(mktemp -t XXXXXXXX-el) cat <<EOF >${INITFILE} (defun font-lock-fontify-syntactic-keywords-region (start end)) EOF fi + EXIT_STATUS=0 ${NO_ACT:+'echo'} ${FLAVOR} --batch --no-site-file --no-init-file \ --load=${INITFILE} \ --load=/usr/share/emacs/site-lisp/tex-site.el \