On Tue, 2011-11-29 at 16:24 +0100, Svante Signell wrote: > On Tue, 2011-11-29 at 11:44 +0100, Svante Signell wrote: > > On Tue, 2011-11-29 at 01:15 +0100, Svante Signell wrote: > > > On Fri, 2011-11-25 at 08:48 +0100, Svante Signell wrote: > > > > On Fri, 2011-11-25 at 07:52 +0100, Tollef Fog Heen wrote: > > > > > ]] Svante Signell > > > > > > > > > > It's stuck upstream until somebody provides an updated patch which you > > > > > could trivially have found out for yourself. > > FYI: mlocate with the latest patch runs fine on my GNU/Linux amd64 and > GNU/Hurd kvm i386 boxes :) So far no problems!
After communicating with upstream in the now soon to be closed bug: https://fedorahosted.org/mlocate/ticket/17 the following applies: 1) The attached patch hurd.patch has been applied to the upstream development tree, and will be included in next release, 0.25?. It applies cleanly also to the latest released version 0.24. 2) The attached patch hurd_0.23.patch applies to version 0.23.1-1 of mlocate, and is not needed for versions 0.24 and later.
diff -r 60b367e5e3fe src/conf.c --- a/src/conf.c Wed Nov 16 14:00:19 2011 +0100 +++ b/src/conf.c Thu Dec 08 15:24:40 2011 +0100 @@ -474,7 +474,7 @@ size_t size, len1, size2; buf = NULL; - size = PATH_MAX; + size = BUFSIZ; /* Not PATH_MAX because it is not defined on some platforms. */ do buf = x2realloc (buf, &size); while ((res = getcwd (buf, size)) == NULL && errno == ERANGE); diff -r 60b367e5e3fe src/updatedb.c --- a/src/updatedb.c Wed Nov 16 14:00:19 2011 +0100 +++ b/src/updatedb.c Thu Dec 08 15:24:40 2011 +0100 @@ -362,10 +362,9 @@ sizeof (*conf_prunefs.entries), cmp_string_pointer) != NULL) { char *dir; + #ifndef PROC_MOUNTS_PATH - char dbuf[PATH_MAX]; - - dir = realpath (me->mnt_dir, dbuf); + dir = canonicalize_file_name (me->mnt_dir); if (dir == NULL) dir = me->mnt_dir; #else @@ -378,10 +377,11 @@ /* This is debuging output, don't mark anything for translation */ fprintf (stderr, " => type matches, dir `%s'\n", dir); if (strcmp (path, dir) == 0) - { - res = true; - goto err_f; - } + res = true; + if (dir != me->mnt_dir) + free(dir); + if (res != false) + goto err_f; } } err_f:
diff -ur a/src/updatedb.c b/src/updatedb.c --- mlocate-0.23.1.hurd.patch/src/updatedb.c 2011-12-14 18:42:55.000000000 +0100 +++ mlocate-0.23.1.patched/src/updatedb.c 2011-12-11 18:06:17.000000000 +0100 @@ -379,9 +379,8 @@ if (hasmntopt (me, "bind") != NULL && strcmp (me->mnt_fsname, me->mnt_dir) != 0) { - char dbuf[PATH_MAX], *dir; - - dir = realpath (me->mnt_dir, dbuf); + char *dir; + dir = canonicalize_file_name (me->mnt_dir); if (dir == NULL) dir = me->mnt_dir; if (conf_debug_pruning != false) @@ -389,6 +388,7 @@ fprintf (stderr, " => adding `%s'\n", dir); dir = obstack_copy (&bind_mount_paths_obstack, dir, strlen (dir) + 1); string_list_append (&bind_mount_paths, dir); + free(dir); } } endmntent (f);