Proskurin Kirill
2008-Nov-28 10:55 UTC
[Dovecot] Autocreate plugin for 1.1 - trying to patch under FreeBSD
Hello all. I try to add Autocreate plugin patch to my FreeBSD host. I think I make all wrong. Could you tell me how to patch it? What I do: cd /usr/ports/mail/dovecot make extract cd cd work/dovecot-1.1.6/src/ fetch http://www.dovecot.org/patches/1.1/autocreate-plugin.c sh -x /tmp/patch.sh + export DOVECOT=~/usr/ports/mail/dovecot/work/dovecot-1.1.6/src + gcc -fPIC -shared -g -Wall -I~/usr/ports/mail/dovecot/work/dovecot-1.1.6/src -I~/usr/ports/mail/dovecot/work/dovecot-1.1.6/src/src/lib -I~/usr/ports/mail/dovecot/work/dovecot-1.1.6/src/src/lib-storage -I~/usr/ports/mail/dovecot/work/dovecot-1.1.6/src/src/lib-mail -I~/usr/ports/mail/dovecot/work/dovecot-1.1.6/src/src/lib-imap -DHAVE_CONFIG_H autocreate-plugin.c -o autocreate_plugin.so autocreate-plugin.c:22:17: error: lib.h: No such file or directory autocreate-plugin.c:23:26: error: mail-storage.h: No such file or directory autocreate-plugin.c:24:28: error: mail-namespace.h: No such file or directory autocreate-plugin.c:28: error: 'PACKAGE_VERSION' undeclared here (not in a function) autocreate-plugin.c:31: warning: 'struct mail_namespace' declared inside parameter list autocreate-plugin.c:31: warning: its scope is only this definition or declaration, which is probably not what you want autocreate-plugin.c:33: warning: 'struct mail_namespace' declared inside parameter list autocreate-plugin.c: In function 'autocreate_mailboxes': autocreate-plugin.c:43: warning: implicit declaration of function 'mail_namespace_find' autocreate-plugin.c:43: warning: assignment makes pointer from integer without a cast autocreate-plugin.c:45: warning: implicit declaration of function 'mail_storage_mailbox_create' autocreate-plugin.c:45: error: dereferencing pointer to incomplete type autocreate-plugin.c:46: error: 'FALSE' undeclared (first use in this function) autocreate-plugin.c:46: error: (Each undeclared identifier is reported only once autocreate-plugin.c:46: error: for each function it appears in.) autocreate-plugin.c:49: warning: implicit declaration of function 'i_snprintf' autocreate-plugin.c: At top level: autocreate-plugin.c:54: warning: 'struct mail_namespace' declared inside parameter list autocreate-plugin.c: In function 'autosubscribe_mailboxes': autocreate-plugin.c:64: warning: assignment makes pointer from integer without a cast autocreate-plugin.c:66: warning: implicit declaration of function 'mailbox_list_set_subscribed' autocreate-plugin.c:66: error: dereferencing pointer to incomplete type autocreate-plugin.c:66: error: 'TRUE' undeclared (first use in this function) autocreate-plugin.c: At top level: autocreate-plugin.c:74: warning: 'struct mail_namespace' declared inside parameter list autocreate-plugin.c: In function 'autocreate_mail_namespaces_created': autocreate-plugin.c:77: warning: passing argument 1 of 'autocreate_next_hook_mail_namespaces_created' from incompatible pointer type autocreate-plugin.c:79: warning: passing argument 1 of 'autocreate_mailboxes' from incompatible pointer type autocreate-plugin.c:80: warning: passing argument 1 of 'autosubscribe_mailboxes' from incompatible pointer type autocreate-plugin.c: In function 'autocreate_plugin_init': autocreate-plugin.c:89: error: 'hook_mail_namespaces_created' undeclared (first use in this function) autocreate-plugin.c: In function 'autocreate_plugin_deinit': autocreate-plugin.c:95: error: 'hook_mail_namespaces_created' undeclared (first use in this function) + cp autocreate_plugin.so /usr/local/lib/dovecot/imap/autocreate_plugin.so cp: autocreate_plugin.so: No such file or directory P.S. cat /tmp/patch.sh # replace * with the correct version: export DOVECOT=~/usr/ports/mail/dovecot/work/dovecot-1.1.6/src gcc -fPIC -shared -g -Wall -I$DOVECOT -I$DOVECOT/src/lib \ -I$DOVECOT/src/lib-storage -I$DOVECOT/src/lib-mail \ -I$DOVECOT/src/lib-imap -DHAVE_CONFIG_H \ autocreate-plugin.c -o autocreate_plugin.so # $PREFIX is the installation directory, e.g. /usr/local or /usr: cp autocreate_plugin.so /usr/local/lib/dovecot/imap/autocreate_plugin.so -- Best regards, Proskurin Kirill
Timo Sirainen
2008-Nov-30 01:53 UTC
[Dovecot] Autocreate plugin for 1.1 - trying to patch under FreeBSD
On Fri, 2008-11-28 at 13:55 +0300, Proskurin Kirill wrote:> + export DOVECOT=~/usr/ports/mail/dovecot/work/dovecot-1.1.6/src/src is too much here, as you can see:> -I~/usr/ports/mail/dovecot/work/dovecot-1.1.6/src/src/libThere's /src/src/ now and that directory doesn't exist. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20081130/a70638c3/attachment-0002.bin>
Proskurin Kirill
2008-Nov-30 21:52 UTC
[Dovecot] Autocreate plugin for 1.1 - trying to patch under FreeBSD
????????????, Timo. ?? ?????? 30 ?????? 2008 ?., 4:53:48:> On Fri, 2008-11-28 at 13:55 +0300, Proskurin Kirill wrote: >> + export DOVECOT=~/usr/ports/mail/dovecot/work/dovecot-1.1.6/src> /src is too much here, as you can see:>> -I~/usr/ports/mail/dovecot/work/dovecot-1.1.6/src/src/lib> There's /src/src/ now and that directory doesn't exist.Yes, fixed. I update dovecot to 1.1.7 and try again: #sh -x /tmp/patch.sh + export DOVECOT=~/usr/ports/mail/dovecot/work/dovecot-1.1.7/ + gcc -fPIC -shared -g -Wall -I~/usr/ports/mail/dovecot/work/dovecot-1.1.7/ -I~/usr/ports/mail/dovecot/work/dovecot-1.1.7//src/lib -I~/usr/ports/mail/dovecot/work/dovecot-1.1.7//src/lib-storage -I~/usr/ports/mail/dovecot/work/dovecot-1.1.7//src/lib-mail -I~/usr/ports/mail/dovecot/work/dovecot-1.1.7//src/lib-imap -DHAVE_CONFIG_H autocreate-plugin.c -o autocreate_plugin.so autocreate-plugin.c:22:17: error: lib.h: No such file or directory autocreate-plugin.c:23:26: error: mail-storage.h: No such file or directory autocreate-plugin.c:24:28: error: mail-namespace.h: No such file or directory autocreate-plugin.c:28: error: 'PACKAGE_VERSION' undeclared here (not in a function) autocreate-plugin.c:31: warning: 'struct mail_namespace' declared inside parameter list autocreate-plugin.c:31: warning: its scope is only this definition or declaration, which is probably not what you want autocreate-plugin.c:33: warning: 'struct mail_namespace' declared inside parameter list autocreate-plugin.c: In function 'autocreate_mailboxes': autocreate-plugin.c:43: warning: implicit declaration of function 'mail_namespace_find' autocreate-plugin.c:43: warning: assignment makes pointer from integer without a cast autocreate-plugin.c:45: warning: implicit declaration of function 'mail_storage_mailbox_create' autocreate-plugin.c:45: error: dereferencing pointer to incomplete type autocreate-plugin.c:46: error: 'FALSE' undeclared (first use in this function) autocreate-plugin.c:46: error: (Each undeclared identifier is reported only once autocreate-plugin.c:46: error: for each function it appears in.) autocreate-plugin.c:49: warning: implicit declaration of function 'i_snprintf' autocreate-plugin.c: At top level: autocreate-plugin.c:54: warning: 'struct mail_namespace' declared inside parameter list autocreate-plugin.c: In function 'autosubscribe_mailboxes': autocreate-plugin.c:64: warning: assignment makes pointer from integer without a cast autocreate-plugin.c:66: warning: implicit declaration of function 'mailbox_list_set_subscribed' autocreate-plugin.c:66: error: dereferencing pointer to incomplete type autocreate-plugin.c:66: error: 'TRUE' undeclared (first use in this function) autocreate-plugin.c: At top level: autocreate-plugin.c:74: warning: 'struct mail_namespace' declared inside parameter list autocreate-plugin.c: In function 'autocreate_mail_namespaces_created': autocreate-plugin.c:77: warning: passing argument 1 of 'autocreate_next_hook_mail_namespaces_created' from incompatible pointer type autocreate-plugin.c:79: warning: passing argument 1 of 'autocreate_mailboxes' from incompatible pointer type autocreate-plugin.c:80: warning: passing argument 1 of 'autosubscribe_mailboxes' from incompatible pointer type autocreate-plugin.c: In function 'autocreate_plugin_init': autocreate-plugin.c:89: error: 'hook_mail_namespaces_created' undeclared (first use in this function) autocreate-plugin.c: In function 'autocreate_plugin_deinit': autocreate-plugin.c:95: error: 'hook_mail_namespaces_created' undeclared (first use in this function) + cp autocreate_plugin.so /usr/local/lib/dovecot/imap/autocreate_plugin.so cp: autocreate_plugin.so: No such file or directory I wonder for what need to add "~" in DOVECOT env and remove it. Then try to patch: #sh -x /tmp/patch.sh + export DOVECOT=/usr/ports/mail/dovecot/work/dovecot-1.1.7 + gcc -fPIC -shared -g -Wall -I/usr/ports/mail/dovecot/work/dovecot-1.1.7 -I/usr/ports/mail/dovecot/work/dovecot-1.1.7/src/lib -I/usr/ports/mail/dovecot/work/dovecot-1.1.7/src/lib-storage -I/usr/ports/mail/dovecot/work/dovecot-1.1.7/src/lib-mail -I/usr/ports/mail/dovecot/work/dovecot-1.1.7/src/lib-imap -DHAVE_CONFIG_H autocreate-plugin.c -o autocreate_plugin.so In file included from /usr/ports/mail/dovecot/work/dovecot-1.1.7/src/lib/lib.h:24, from autocreate-plugin.c:22: /usr/ports/mail/dovecot/work/dovecot-1.1.7/src/lib/compat.h:55:29: error: sys/sysmacros.h: No such file or directory + cp autocreate_plugin.so /usr/local/lib/dovecot/imap/autocreate_plugin.so cp: autocreate_plugin.so: No such file or directory sysmacros.h? I update locate db and try to find it: # locate sysmacros.h /usr/src/sys/compat/opensolaris/sys/sysmacros.h /usr/src/sys/contrib/opensolaris/uts/common/sys/sysmacros.h mx# What I miss? -- Best regards, Proskurin Kirill