--- Begin Message ---
Package: luatex
Version: 0.47.0-1
Severity: important
Tags: patch
User: debian-hurd@lists.debian.org
Usertags: hurd
Hi,
currently[1] luatex does not build on GNU/Hurd.
The problem is the unconditional usage of PATH_MAX.
The attached patch solves the issue, malloc'ing the buffers as needed.
It also adds a small bit to "recognize" the GNU platform.
[1] https://buildd.debian.org/fetch.cgi?pkg=luatex&arch=hurd-i386&ver=0.47.0-1&stamp=1261470395&file=log&as=raw
Thanks,
--
Pino
--- a/source/texk/web2c/luatexdir/lua/loslibext.c
+++ b/source/texk/web2c/luatexdir/lua/loslibext.c
@@ -81,6 +81,9 @@
# elif defined(__MACH__) && defined(__APPLE__)
# undef OS_PLATNAME
# define OS_PLATNAME "macosx"
+# elif defined(__GNU__)
+# undef OS_PLATNAME
+# define OS_PLATNAME "gnu"
# endif
#endif
@@ -117,7 +120,7 @@
static int exec_command(const char *file, char *const *argv, char *const *envp)
{
- char path[PATH_MAX];
+ char *path;
const char *searchpath, *esp;
size_t prefixlen, filelen, totallen;
@@ -125,6 +128,7 @@
return execve(file, argv, envp);
filelen = strlen(file);
+ path = NULL;
searchpath = getenv("PATH");
if (!searchpath)
@@ -141,14 +145,20 @@
if (prefixlen == 0 || searchpath[prefixlen - 1] == '/') {
totallen = prefixlen + filelen;
+#ifdef PATH_MAX
if (totallen >= PATH_MAX)
continue;
+#endif
+ path = malloc(totallen + 1);
memcpy(path, searchpath, prefixlen);
memcpy(path + prefixlen, file, filelen);
} else {
totallen = prefixlen + filelen + 1;
+#ifdef PATH_MAX
if (totallen >= PATH_MAX)
continue;
+#endif
+ path = malloc(totallen + 1);
memcpy(path, searchpath, prefixlen);
path[prefixlen] = '/';
memcpy(path + prefixlen + 1, file, filelen);
@@ -156,6 +166,8 @@
path[totallen] = '\0';
execve(path, argv, envp);
+ free(path);
+ path = NULL;
if (errno == E2BIG || errno == ENOEXEC ||
errno == ENOMEM || errno == ETXTBSY)
break; /* Report this as an error, no more search */
--- End Message ---
--- Begin Message ---
Source: luatex
Source-Version: 0.47.0-2
We believe that the bug you reported is fixed in the latest version of
luatex, which is due to be installed in the Debian FTP archive:
luatex_0.47.0-2.diff.gz
to main/l/luatex/luatex_0.47.0-2.diff.gz
luatex_0.47.0-2.dsc
to main/l/luatex/luatex_0.47.0-2.dsc
luatex_0.47.0-2_amd64.deb
to main/l/luatex/luatex_0.47.0-2_amd64.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 562176@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Norbert Preining <preining@debian.org> (supplier of updated luatex package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.8
Date: Thu, 24 Dec 2009 03:32:02 +0900
Source: luatex
Binary: luatex
Architecture: source amd64
Version: 0.47.0-2
Distribution: unstable
Urgency: low
Maintainer: Debian TeX Maintainers <debian-tex-maint@lists.debian.org>
Changed-By: Norbert Preining <preining@debian.org>
Description:
luatex - next generation TeX engine
Closes: 562176
Changes:
luatex (0.47.0-2) unstable; urgency=low
.
* add patch fix-hurd-ftbfs from Pino Toscano (Closes: #562176)
Checksums-Sha1:
84a36aea074c0d5b7f9a625181ec569a1a218f23 1313 luatex_0.47.0-2.dsc
e0fd17593b6262494063fb1f6272bcd195aecb4c 49758 luatex_0.47.0-2.diff.gz
42b889d61f85969580435aea122086bdd4809cfd 2342398 luatex_0.47.0-2_amd64.deb
Checksums-Sha256:
1dc898b746c1e426d949e29f14be7c0e6df24a5d82ed4e69857621fb2305b3e6 1313 luatex_0.47.0-2.dsc
98f8ecf1a6088d91fc887df6174dd62d191bfeb76dce9f8f95d45444d0d15b5f 49758 luatex_0.47.0-2.diff.gz
51675f253a57b41cc51be3c64b744c9a5e9080d0b1c37b0eb7ec5187a0cef091 2342398 luatex_0.47.0-2_amd64.deb
Files:
ec93d49f67e3db13527e5e26c62d0031 1313 tex optional luatex_0.47.0-2.dsc
e994696622b83821db0f565271719faf 49758 tex optional luatex_0.47.0-2.diff.gz
4de959e381956d9af51a2ffd7e5e3a02 2342398 tex optional luatex_0.47.0-2_amd64.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iD8DBQFLMmTW0r9KownFsJQRAiDbAJ93wUQEC5JEXlRc+FmfzUxSynjthgCfcofH
AIJTDq/kCAQVM8NCD+hYxoY=
=978o
-----END PGP SIGNATURE-----
--- End Message ---