guix-install.sh: Expand mktemp template for busybox compatibility.
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>
Wed, 16 Nov 2022 21:23:15 +0000 (16:23 -0500)
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>
Wed, 16 Nov 2022 21:23:15 +0000 (16:23 -0500)
Fixes <https://issues.guix.gnu.org/58858>.

* etc/guix-install.sh (main): Use 6 'X' characters in the template, as this is
the minimum required by Busybox's mktemp (which matches glibc's mktemp
behavior).

Reported-by: conses <contact@conses.eu>
etc/guix-install.sh

index 88ca0e6..6bef21b 100755 (executable)
@@ -633,7 +633,7 @@ main()
     _msg "${INF}system is ${ARCH_OS}"
 
     umask 0022
-    tmp_path="$(mktemp -t -d guix.XXX)"
+    tmp_path="$(mktemp -t -d guix.XXXXXX)"
 
     if [ -z "${GUIX_BINARY_FILE_NAME}" ]; then
         guix_get_bin_list "${GNU_URL}"