On Oct 10, 2014, at 3:59 AM, Kim Alvefur <[email protected]> wrote:
> Hi Lonnie,
>
> On 2014-10-09 21:40, Lonnie Abelbeck wrote:
>> I'm having a problem with 0.9.5 and loading 's2s' and 'adhoc'. The paths
>> are not correct...
>>
>> I'm seeing errors:
>> --
>> Oct 09 14:15:52 modulemanager error Unable to load module 's2s':
>> /usr/lib/prosody/modules/mod_s2s.lua: No such file or directory
>> Oct 09 14:15:52 modulemanager error Unable to load module 'adhoc':
>> /usr/lib/prosody/modules/mod_adhoc.lua: No such file or directory
>> --
>> which are not the correct installed paths for adhoc/ and mod_s2s/ :
>> --
>> drwxr-xr-- 1 root root 80 Oct 9 08:43 adhoc
>> drwxr-xr-- 1 root root 80 Oct 9 08:43 mod_s2s
>
> I notice there's no o+x there, which may well cause a permission error,
> which unfortunately gets hidden because modulemanager (actually
> util.pluginloader) tries various combinations of paths and only reports
> the very last error.
Figured it out, the problem traces back to the original source tarball...
$ tar tvf prosody-0.9.4.tar.gz prosody-0.9.4/plugins/ | grep '^d'
drwxrwxr-x 0 matthew matthew 0 Apr 1 2014 prosody-0.9.4/plugins/
drwxrwxr-x 0 matthew matthew 0 Apr 1 2014 prosody-0.9.4/plugins/mod_s2s/
drwxrwxr-x 0 matthew matthew 0 Apr 1 2014 prosody-0.9.4/plugins/adhoc/
drwxrwxr-x 0 matthew matthew 0 Apr 1 2014 prosody-0.9.4/plugins/muc/
drwxrwxr-x 0 matthew matthew 0 Apr 1 2014 prosody-0.9.4/plugins/storage/
$ tar tvf prosody-0.9.5.tar.gz prosody-0.9.5/plugins/ | grep '^d'
drwxr-x--- 0 zash zash 0 Oct 3 06:52 prosody-0.9.5/plugins/
drwxr-x--- 0 zash zash 0 Oct 3 06:52 prosody-0.9.5/plugins/adhoc/
drwxr-x--- 0 zash zash 0 Oct 3 06:52 prosody-0.9.5/plugins/storage/
drwxr-x--- 0 zash zash 0 Oct 3 06:52 prosody-0.9.5/plugins/muc/
drwxr-x--- 0 zash zash 0 Oct 3 06:52 prosody-0.9.5/plugins/mod_s2s/
Then, since the Makefile uses "cp -r plugins/* $(MODULES)" the tarball
directory permissions are copied over to the target.
It seems this only causes issues to the modules/ directory, but doing a survey
of other OSS releases the directories have 755 permissions.
So, for our case using Buildroot, adding the following:
--
define PROSODY_SOURCE_CLEANUP
find $(@D) -type d -print0 | xargs -0 chmod 755
endef
PROSODY_POST_EXTRACT_HOOKS += PROSODY_SOURCE_CLEANUP
--
Solves the problem.
Another solution is for the Makefile to set the proper permissions after the
"cp -r plugins/* $(MODULES)" .
Lonnie
--
You received this message because you are subscribed to the Google Groups
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/prosody-dev.
For more options, visit https://groups.google.com/d/optout.