Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Dec 2012 10:37:23 GMT
From:      ARAI Toshihiko <arai.toshihiko@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/174606: [patch] sysutils/fusefs-curlftpfs: for 9.1R
Message-ID:  <201212211037.qBLAbNm3070290@red.freebsd.org>
Resent-Message-ID: <201212211040.qBLAe0VF042648@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         174606
>Category:       ports
>Synopsis:       [patch] sysutils/fusefs-curlftpfs: for 9.1R
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Dec 21 10:40:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     ARAI Toshihiko
>Release:        9.1-RELEASE
>Organization:
>Environment:
FreeBSD misao 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r244418: Wed Dec 19 20:32:34 JST 2012     root@misao:/usr/obj/usr/src/sys/MISAO  i386

>Description:

>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -urN ../fusefs-curlftpfs.orig/Makefile ./Makefile
--- ../fusefs-curlftpfs.orig/Makefile	2012-12-21 19:06:00.000000000 +0900
+++ ./Makefile	2012-12-21 19:06:28.041610000 +0900
@@ -26,8 +26,13 @@
 
 .include <bsd.port.pre.mk>
 
-.if ${OSVERSION} >= 900000
-BROKEN=		does not build
+.if ${OSVERSION} >= 1000000
+EXTRA_PATCHES+= ${FILESDIR}/extra-64-ftpfs.h
+.else
+EXTRA_PATCHES+= ${FILESDIR}/extra-32-ftpfs.h
+.endif
+.if ${OSVERSION} < 900000
+EXTRA_PATCHES+= ${FILESDIR}/extra-patch-ftpfs.c
 .endif
 
 .include <bsd.port.post.mk> 
diff -urN ../fusefs-curlftpfs.orig/files/extra-32-ftpfs.h ./files/extra-32-ftpfs.h
--- ../fusefs-curlftpfs.orig/files/extra-32-ftpfs.h	1970-01-01 09:00:00.000000000 +0900
+++ ./files/extra-32-ftpfs.h	2012-12-21 18:30:59.000000000 +0900
@@ -0,0 +1,11 @@
+--- ftpfs.h.orig	2008-04-25 19:32:30.000000000 +0900
++++ ftpfs.h	2012-12-21 18:18:20.000000000 +0900
+@@ -75,7 +75,7 @@
+         do { if (level <= ftpfs.debug) {\
+                int i = 0; \
+                while (++i < level) fprintf(stderr, " "); \
+-               fprintf(stderr, "%ld ", time(NULL));\
++               fprintf(stderr, "%d ", time(NULL));\
+                fprintf(stderr, __FILE__ ":%d ", __LINE__);\
+                fprintf(stderr, args);\
+              }\
diff -urN ../fusefs-curlftpfs.orig/files/extra-64-ftpfs.h ./files/extra-64-ftpfs.h
--- ../fusefs-curlftpfs.orig/files/extra-64-ftpfs.h	1970-01-01 09:00:00.000000000 +0900
+++ ./files/extra-64-ftpfs.h	2012-12-21 18:50:48.000000000 +0900
@@ -0,0 +1,11 @@
+--- ftpfs.h.orig	2008-04-25 19:32:30.000000000 +0900
++++ ftpfs.h	2012-12-21 18:18:20.000000000 +0900
+@@ -75,7 +75,7 @@
+         do { if (level <= ftpfs.debug) {\
+                int i = 0; \
+                while (++i < level) fprintf(stderr, " "); \
+-               fprintf(stderr, "%ld ", time(NULL));\
++               fprintf(stderr, "%lld ", time(NULL));\
+                fprintf(stderr, __FILE__ ":%d ", __LINE__);\
+                fprintf(stderr, args);\
+              }\
diff -urN ../fusefs-curlftpfs.orig/files/extra-patch-ftpfs.c ./files/extra-patch-ftpfs.c
--- ../fusefs-curlftpfs.orig/files/extra-patch-ftpfs.c	1970-01-01 09:00:00.000000000 +0900
+++ ./files/extra-patch-ftpfs.c	2010-01-09 05:02:31.000000000 +0900
@@ -0,0 +1,19 @@
+--- ./ftpfs.c.orig	2008-04-30 01:05:47.000000000 +0200
++++ ./ftpfs.c	2010-01-08 19:14:39.000000000 +0100
+@@ -611,10 +611,12 @@
+     curl_easy_cleanup(fh->write_conn);
+   g_free(fh->full_path);
+   g_free(fh->open_path);
+-  sem_destroy(&fh->data_avail);
+-  sem_destroy(&fh->data_need);
+-  sem_destroy(&fh->data_written);
+-  sem_destroy(&fh->ready);
++  if (fh->data_avail) {
++    sem_destroy(&fh->data_avail);
++    sem_destroy(&fh->data_need);
++    sem_destroy(&fh->data_written);
++    sem_destroy(&fh->ready);
++  }
+   free(fh);
+ }
+ 
diff -urN ../fusefs-curlftpfs.orig/files/patch-ftpfs.c ./files/patch-ftpfs.c
--- ../fusefs-curlftpfs.orig/files/patch-ftpfs.c	2010-01-09 05:02:31.000000000 +0900
+++ ./files/patch-ftpfs.c	1970-01-01 09:00:00.000000000 +0900
@@ -1,19 +0,0 @@
---- ./ftpfs.c.orig	2008-04-30 01:05:47.000000000 +0200
-+++ ./ftpfs.c	2010-01-08 19:14:39.000000000 +0100
-@@ -611,10 +611,12 @@
-     curl_easy_cleanup(fh->write_conn);
-   g_free(fh->full_path);
-   g_free(fh->open_path);
--  sem_destroy(&fh->data_avail);
--  sem_destroy(&fh->data_need);
--  sem_destroy(&fh->data_written);
--  sem_destroy(&fh->ready);
-+  if (fh->data_avail) {
-+    sem_destroy(&fh->data_avail);
-+    sem_destroy(&fh->data_need);
-+    sem_destroy(&fh->data_written);
-+    sem_destroy(&fh->ready);
-+  }
-   free(fh);
- }
- 


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201212211037.qBLAbNm3070290>