On 2018/11/08 01:32, [email protected] wrote:
> >Synopsis:    mbsync/isync fails wit pledge "fattr", syscall 76
> >Category:    pledge or syscall problem
> >Environment:
>       System      : OpenBSD 6.4
>       Details     : OpenBSD 6.4-current (GENERIC.MP) #425: Sun Nov  4 
> 21:32:53 MST 2018
>                        
> [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> 
>       Architecture: OpenBSD.amd64
>       Machine     : amd64
> >Description:
> Not sure if this was due to ports@, sorry if it's misdirected.

Ideally if it's a porting-related problem (rather than something which
is clearly a problem with the upstream software itself) then the maintainer
should at least be CC'd (I've added him here). ports@ is probably slightly
better than bugs@.

> I just tried to install isync/mbsync to give it a try.
> After figuring out the config file syntax, I launched 'mbsync -a'.
> It failed with a pledge error.
> Since I'm (trying to) follow current I thought it was a because I didn't 
> upgrade before installing isync.
> So I updgraded to the latest snapshot, rebooted, did pkg_add -u, rebooted and 
> retried.
> Same error :
> 
> ccam$ mbsync -a
> C: 0/1  B: 0/6  M: +0/0 *0/0 #0/0  S: +0/0 *0/0 #0/0
> Warning: lost track of 553 pulled message(s)
> C: 0/1  B: 0/6  M: +0/0 *0/0 #0/0  S: +0/556 *0/0 #0/0Abort trap (core dumped)
> 
> And at the end of the dmesg, we can find the pledge error.

You mentioned in subject, but it would be clearer to include this here too, e.g.

mbsync[96869]: pledge "fattr", syscall 76

Using your config (which was useful) I can confirm it.

syscall 76 is utimes() which is done here in maildir_store_msg()
in drv_maildir.c:

1636         if (data->date) {
1637                 /* Set atime and mtime according to INTERNALDATE or mtime 
of source message */
1638                 struct utimbuf utimebuf;
1639                 utimebuf.actime = utimebuf.modtime = data->date;
1640                 if (utime( buf, &utimebuf ) < 0) {
1641                         sys_error( "Maildir error: cannot set times for 
%s", buf );
1642                         cb( DRV_BOX_BAD, 0, aux );
1643                         return;
1644                 }
1645         }

This port diff should fix things.

Index: Makefile
===================================================================
RCS file: /cvs/ports/mail/isync/Makefile,v
retrieving revision 1.37
diff -u -p -r1.37 Makefile
--- Makefile    22 May 2018 21:24:08 -0000      1.37
+++ Makefile    8 Nov 2018 10:50:20 -0000
@@ -3,7 +3,7 @@
 COMMENT=       synchronize IMAP4 and maildir mailboxes
 
 DISTNAME=      isync-1.3.0
-REVISION=      3
+REVISION=      4
 
 CATEGORIES=    mail
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=isync/}
Index: patches/patch-src_main_c
===================================================================
RCS file: /cvs/ports/mail/isync/patches/patch-src_main_c,v
retrieving revision 1.5
diff -u -p -r1.5 patch-src_main_c
--- patches/patch-src_main_c    22 May 2018 21:24:08 -0000      1.5
+++ patches/patch-src_main_c    8 Nov 2018 10:50:20 -0000
@@ -33,14 +33,14 @@ Index: src/main.c
 +              }
 +      } else {
 +              if (needs_proc_exec) {
-+                      if (pledge("stdio rpath wpath cpath inet flock dns"
-+                          " getpw tty proc exec prot_exec", NULL) == -1) {
++                      if (pledge("stdio rpath wpath cpath inet fattr flock"
++                          " dns getpw tty proc exec prot_exec", NULL) == -1) {
 +                              sys_error("pledge\n");
 +                              exit(1);
 +                      }
 +              } else {
-+                      if (pledge("stdio rpath wpath cpath inet flock dns"
-+                          " getpw tty prot_exec", NULL) == -1) {
++                      if (pledge("stdio rpath wpath cpath inet fattr flock"
++                          " dns getpw tty prot_exec", NULL) == -1) {
 +                              sys_error("pledge\n");
 +                              exit(1);
 +                      }

Reply via email to