Re: [new] exfat-fuse 1.2.4

2016-07-09 Thread Marc Espie
On Sat, Jul 09, 2016 at 05:02:31PM +0200, Antoine Jacoutot wrote:
> On Sat, Jul 09, 2016 at 04:04:40PM +0200, Dmitrij D. Czarkoff wrote:
> > YASUOKA Masahiko  wrote:
> > 
> > > I'd like to add 'exfat-fuse'.
> > > 
> > > It is an exFAT file system implementation working on FUSE.  It's
> > > useful to mount a SDCARD which is used by Android, for example.
> > > 
> > > ok?
> > 
> > 1.  You need to add
> > 
> > | BUILD_DEPENDS = ${MODGNU_AUTOCONF_DEPENDS} \
> > | ${MODGNU_AUTOMAKE_DEPENDS}
> > 
> > so that the port actually depends on auto* tools.
> > 
> > 2.  PLIST should have annotations for binaries:
> 
> By the way, wasn't the @bin marker introduced because of prebind support?
> Since that got removed, maybe we could drop that marker as well after 6.0?

Initially yes, but it can be useful for other reasons...



Re: [new] exfat-fuse 1.2.4

2016-07-09 Thread temp+101
YASUOKA Masahiko  wrotes:
>I'd like to add 'exfat-fuse'.
>
>It is an exFAT file system implementation working on FUSE.  It's
>useful to mount a SDCARD which is used by Android, for example.
>
>ok?

I usually using exfat (older version with my own patches) with
disklabel UID in fstab.

Is it good to replace all open(2) calls with opendev(3)?

--- libexfat/io.c.orig  Fri Jun  3 10:00:35 2016
+++ libexfat/io.c   Sun Jul 10 01:02:19 2016
@@ -36,6 +36,7 @@
 #include 
 #include 
 #endif
+#include 
 #include 
 
 struct exfat_dev
@@ -45,14 +46,14 @@
off_t size; /* in bytes */
 };
 
-static int open_ro(const char* spec)
+static int open_ro(const char* spec, char **realpath)
 {
-   return open(spec, O_RDONLY);
+   return opendev(spec, O_RDONLY, OPENDEV_PART, realpath);
 }
 
-static int open_rw(const char* spec)
+static int open_rw(const char* spec, char **realpath)
 {
-   int fd = open(spec, O_RDWR);
+   int fd = opendev(spec, O_RDWR, OPENDEV_PART, realpath);
 #ifdef __linux__
int ro = 0;
 
@@ -74,6 +75,7 @@
 {
struct exfat_dev* dev;
struct stat stbuf;
+   char *realpath;
 
dev = malloc(sizeof(struct exfat_dev));
if (dev == NULL)
@@ -85,7 +87,7 @@
switch (mode)
{
case EXFAT_MODE_RO:
-   dev->fd = open_ro(spec);
+   dev->fd = open_ro(spec, &realpath);
if (dev->fd == -1)
{
free(dev);
@@ -96,7 +98,7 @@
dev->mode = EXFAT_MODE_RO;
break;
case EXFAT_MODE_RW:
-   dev->fd = open_rw(spec);
+   dev->fd = open_rw(spec, &realpath);
if (dev->fd == -1)
{
free(dev);
@@ -107,13 +109,13 @@
dev->mode = EXFAT_MODE_RW;
break;
case EXFAT_MODE_ANY:
-   dev->fd = open_rw(spec);
+   dev->fd = open_rw(spec, &realpath);
if (dev->fd != -1)
{
dev->mode = EXFAT_MODE_RW;
break;
}
-   dev->fd = open_ro(spec);
+   dev->fd = open_ro(spec, &realpath);
if (dev->fd != -1)
{
dev->mode = EXFAT_MODE_RO;
@@ -182,7 +184,7 @@
 
/* Don't need to check that partition letter is valid as we 
won't get
   this far otherwise. */
-   partition = strchr(spec, '\0') - 1;
+   partition = strchr(realpath, '\0') - 1;
pp = &(lab.d_partitions[*partition - 'a']);
dev->size = DL_GETPSIZE(pp) * lab.d_secsize;
 

I also use mount_exfat-fuse instead of mount.exfat-fuse because of
fstab format.



Re: [new] exfat-fuse 1.2.4

2016-07-09 Thread Antoine Jacoutot
On Sat, Jul 09, 2016 at 04:04:40PM +0200, Dmitrij D. Czarkoff wrote:
> YASUOKA Masahiko  wrote:
> 
> > I'd like to add 'exfat-fuse'.
> > 
> > It is an exFAT file system implementation working on FUSE.  It's
> > useful to mount a SDCARD which is used by Android, for example.
> > 
> > ok?
> 
> 1.  You need to add
> 
> | BUILD_DEPENDS = ${MODGNU_AUTOCONF_DEPENDS} \
> | ${MODGNU_AUTOMAKE_DEPENDS}
> 
> so that the port actually depends on auto* tools.
> 
> 2.  PLIST should have annotations for binaries:

By the way, wasn't the @bin marker introduced because of prebind support?
Since that got removed, maybe we could drop that marker as well after 6.0?


> 
> --- pkg/PLIST.origSat Jul  9 01:33:50 2016
> +++ pkg/PLIST Sat Jul  9 16:02:23 2016
> @@ -4,11 +4,11 @@
>  @man man/man8/exfatlabel.8
>  @man man/man8/mkexfatfs.8
>  @man man/man8/mount.exfat-fuse.8
> -sbin/dumpexfat
> -sbin/exfatfsck
> -sbin/exfatlabel
> +@bin sbin/dumpexfat
> +@bin sbin/exfatfsck
> +@bin sbin/exfatlabel
>  sbin/fsck.exfat
> -sbin/mkexfatfs
> +@bin sbin/mkexfatfs
>  sbin/mkfs.exfat
>  sbin/mount.exfat
> -sbin/mount.exfat-fuse
> +@bin sbin/mount.exfat-fuse
> 
> Otherwise OK czarkoff@.
> 

-- 
Antoine



Re: [new] exfat-fuse 1.2.4

2016-07-09 Thread Dmitrij D. Czarkoff
YASUOKA Masahiko  wrote:

> I'd like to add 'exfat-fuse'.
> 
> It is an exFAT file system implementation working on FUSE.  It's
> useful to mount a SDCARD which is used by Android, for example.
> 
> ok?

1.  You need to add

| BUILD_DEPENDS = ${MODGNU_AUTOCONF_DEPENDS} \
| ${MODGNU_AUTOMAKE_DEPENDS}

so that the port actually depends on auto* tools.

2.  PLIST should have annotations for binaries:

--- pkg/PLIST.orig  Sat Jul  9 01:33:50 2016
+++ pkg/PLIST   Sat Jul  9 16:02:23 2016
@@ -4,11 +4,11 @@
 @man man/man8/exfatlabel.8
 @man man/man8/mkexfatfs.8
 @man man/man8/mount.exfat-fuse.8
-sbin/dumpexfat
-sbin/exfatfsck
-sbin/exfatlabel
+@bin sbin/dumpexfat
+@bin sbin/exfatfsck
+@bin sbin/exfatlabel
 sbin/fsck.exfat
-sbin/mkexfatfs
+@bin sbin/mkexfatfs
 sbin/mkfs.exfat
 sbin/mount.exfat
-sbin/mount.exfat-fuse
+@bin sbin/mount.exfat-fuse

Otherwise OK czarkoff@.



[new] exfat-fuse 1.2.4

2016-07-08 Thread YASUOKA Masahiko
I'd like to add 'exfat-fuse'.

It is an exFAT file system implementation working on FUSE.  It's
useful to mount a SDCARD which is used by Android, for example.

ok?

--yasuoka


exfat-fuse.tar.gz
Description: Binary data