diff options
54 files changed, 4264 insertions, 139 deletions
diff --git a/community/afpfs-ng/01-gcrypt.patch b/community/afpfs-ng/01-gcrypt.patch new file mode 100644 index 000000000..7bcace281 --- /dev/null +++ b/community/afpfs-ng/01-gcrypt.patch @@ -0,0 +1,26 @@ +diff -ru afpfs-ng-0.8.1/configure.ac afpfs-ng-0.8.1+iPhone/configure.ac +--- afpfs-ng-0.8.1/configure.ac 2008-03-08 16:23:12.000000000 +0000 ++++ afpfs-ng-0.8.1+iPhone/configure.ac 2010-10-24 05:26:15.000000000 +0000 +@@ -50,21 +50,6 @@ + case $host in + *-*-darwin*) + AC_MSG_CHECKING([for correct gcrypt version]) +- AC_RUN_IFELSE( +- [AC_LANG_PROGRAM([ +- #include <gcrypt.h> +- #include <stdio.h>],[ +- char*p= GCRYPT_VERSION; +- unsigned int vers; +- vers=atoi(p)*10000; +- p=strchr(p,'.')+1; +- vers+=atoi(p)*100; +- p=strchr(p,'.')+1; +- vers+=atoi(p); +- if (vers<10400) return 1; +- ])], +- [AC_MSG_RESULT([yes])], +- [AC_MSG_ERROR([version is < 1.4.0])]) + AM_CONDITIONAL(HAVE_LIBGCRYPT, true) + AC_DEFINE([HAVE_LIBGCRYPT], [1] ) + ;; + diff --git a/community/afpfs-ng/02-pointer.patch b/community/afpfs-ng/02-pointer.patch new file mode 100644 index 000000000..80507b572 --- /dev/null +++ b/community/afpfs-ng/02-pointer.patch @@ -0,0 +1,280 @@ +diff -up afpfs-ng-0.8.1/cmdline/getstatus.c.pointer afpfs-ng-0.8.1/cmdline/getstatus.c +--- afpfs-ng-0.8.1/cmdline/getstatus.c.pointer 2011-06-14 17:06:35.000000000 +0200 ++++ afpfs-ng-0.8.1/cmdline/getstatus.c 2011-06-14 17:07:25.000000000 +0200 +@@ -1,4 +1,5 @@ + #include <stdio.h> ++#include <stdlib.h> + #include <string.h> + #include <pthread.h> + +diff -up afpfs-ng-0.8.1/fuse/client.c.pointer afpfs-ng-0.8.1/fuse/client.c +--- afpfs-ng-0.8.1/fuse/client.c.pointer 2008-03-08 03:44:16.000000000 +0100 ++++ afpfs-ng-0.8.1/fuse/client.c 2011-06-14 17:02:15.000000000 +0200 +@@ -61,8 +61,9 @@ static int start_afpfsd(void) + snprintf(filename, PATH_MAX, + "/usr/local/bin/%s",AFPFSD_FILENAME); + if (access(filename,X_OK)) { +- snprintf(filename, "/usr/bin/%s", ++ snprintf(filename, sizeof(filename), "/usr/bin/%s", + AFPFSD_FILENAME); ++ filename[sizeof(filename) - 1] = 0; + if (access(filename,X_OK)) { + printf("Could not find server (%s)\n", + filename); +diff -up afpfs-ng-0.8.1/fuse/fuse_int.c.pointer afpfs-ng-0.8.1/fuse/fuse_int.c +--- afpfs-ng-0.8.1/fuse/fuse_int.c.pointer 2008-03-02 06:06:24.000000000 +0100 ++++ afpfs-ng-0.8.1/fuse/fuse_int.c 2011-06-14 17:02:15.000000000 +0200 +@@ -197,7 +197,7 @@ static int fuse_open(const char *path, s + ret = ml_open(volume,path,flags,&fp); + + if (ret==0) +- fi->fh=(void *) fp; ++ fi->fh=(unsigned long) fp; + + return ret; + } +diff -up afpfs-ng-0.8.1/include/afpfs-ng/afp.h.pointer afpfs-ng-0.8.1/include/afp.h +--- afpfs-ng-0.8.1/include/afpfs-ng/afp.h.pointer 2008-03-08 17:08:18.000000000 +0100 ++++ afpfs-ng-0.8.1/include/afpfs-ng/afp.h 2011-06-14 17:02:15.000000000 +0200 +@@ -370,7 +370,7 @@ int afp_unmount_all_volumes(struct afp_s + + int afp_opendt(struct afp_volume *volume, unsigned short * refnum); + +-int afp_closedt(struct afp_server * server, unsigned short * refnum); ++int afp_closedt(struct afp_server * server, unsigned short refnum); + + int afp_getcomment(struct afp_volume *volume, unsigned int did, + const char * pathname, struct afp_comment * comment); +diff -up afpfs-ng-0.8.1/include/afpfs-gn/utils.h.pointer afpfs-ng-0.8.1/include/utils.h +--- afpfs-ng-0.8.1/include/afpfs-ng/utils.h.pointer 2008-02-18 04:33:58.000000000 +0100 ++++ afpfs-ng-0.8.1/include/afpfs-ng/utils.h 2011-06-14 17:02:15.000000000 +0200 +@@ -8,8 +8,8 @@ + #define hton64(x) (x) + #define ntoh64(x) (x) + #else /* BYTE_ORDER == BIG_ENDIAN */ +-#define hton64(x) ((u_int64_t) (htonl(((x) >> 32) & 0xffffffffLL)) | \ +- (u_int64_t) ((htonl(x) & 0xffffffffLL) << 32)) ++#define hton64(x) ((u_int64_t) (htonl((((unsigned long long)(x)) >> 32) & 0xffffffffLL)) | \ ++ (u_int64_t) ((htonl((unsigned long long)(x)) & 0xffffffffLL) << 32)) + #define ntoh64(x) (hton64(x)) + #endif /* BYTE_ORDER == BIG_ENDIAN */ + +diff -up afpfs-ng-0.8.1/lib/afp_url.c.pointer afpfs-ng-0.8.1/lib/afp_url.c +--- afpfs-ng-0.8.1/lib/afp_url.c.pointer 2008-03-04 21:16:49.000000000 +0100 ++++ afpfs-ng-0.8.1/lib/afp_url.c 2011-06-14 17:02:15.000000000 +0200 +@@ -33,7 +33,7 @@ static int check_port(char * port) + static int check_uamname(const char * uam) + { + char * p; +- for (p=uam;*p;p++) { ++ for (p=(char *)uam;*p;p++) { + if (*p==' ') continue; + if ((*p<'A') || (*p>'z')) return -1; + } +@@ -188,7 +188,7 @@ int afp_parse_url(struct afp_url * url, + return -1; + + } +- if (p==NULL) p=toparse; ++ if (p==NULL) p=(char *)toparse; + + /* Now split on the first / */ + if (sscanf(p,"%[^/]/%[^$]", +diff -up afpfs-ng-0.8.1/lib/did.c.pointer afpfs-ng-0.8.1/lib/did.c +--- afpfs-ng-0.8.1/lib/did.c.pointer 2008-02-18 04:39:17.000000000 +0100 ++++ afpfs-ng-0.8.1/lib/did.c 2011-06-14 17:02:15.000000000 +0200 +@@ -226,7 +226,7 @@ int get_dirid(struct afp_volume * volume + + + /* Go to the end of last known entry */ +- p=path+(p-copy); ++ p=(char *)path+(p-copy); + p2=p; + + while ((p=strchr(p+1,'/'))) { +diff -up afpfs-ng-0.8.1/lib/dsi.c.pointer afpfs-ng-0.8.1/lib/dsi.c +--- afpfs-ng-0.8.1/lib/dsi.c.pointer 2008-02-18 04:53:03.000000000 +0100 ++++ afpfs-ng-0.8.1/lib/dsi.c 2011-06-14 17:02:15.000000000 +0200 +@@ -474,7 +474,7 @@ void dsi_getstatus_reply(struct afp_serv + } + server->flags=ntohs(reply1->flags); + +- p=(void *)((unsigned int) server->incoming_buffer + sizeof(*reply1)); ++ p=(void *)((unsigned long) server->incoming_buffer + sizeof(*reply1)); + p+=copy_from_pascal(server->server_name,p,AFP_SERVER_NAME_LEN)+1; + + /* Now work our way through the variable bits */ +@@ -757,7 +757,7 @@ gotenough: + printf("<<< read() of rest of AFP, %d bytes\n",amount_to_read); + #endif + ret = read(server->fd, (void *) +- (((unsigned int) server->incoming_buffer)+server->data_read), ++ (((unsigned long) server->incoming_buffer)+server->data_read), + amount_to_read); + if (ret<0) return -1; + if (ret==0) { +diff -up afpfs-ng-0.8.1/lib/loop.c.pointer afpfs-ng-0.8.1/lib/loop.c +--- afpfs-ng-0.8.1/lib/loop.c.pointer 2008-02-18 04:40:11.000000000 +0100 ++++ afpfs-ng-0.8.1/lib/loop.c 2011-06-14 17:02:15.000000000 +0200 +@@ -25,7 +25,7 @@ + static unsigned char exit_program=0; + + static pthread_t ending_thread; +-static pthread_t main_thread = NULL; ++static pthread_t main_thread = (pthread_t)NULL; + + static int loop_started=0; + static pthread_cond_t loop_started_condition; +diff -up afpfs-ng-0.8.1/lib/lowlevel.c.pointer afpfs-ng-0.8.1/lib/lowlevel.c +--- afpfs-ng-0.8.1/lib/lowlevel.c.pointer 2008-02-20 02:33:17.000000000 +0100 ++++ afpfs-ng-0.8.1/lib/lowlevel.c 2011-06-14 17:02:15.000000000 +0200 +@@ -582,7 +582,7 @@ int ll_getattr(struct afp_volume * volum + if (volume->server->using_version->av_number>=30) + stbuf->st_mode |= fp.unixprivs.permissions; + else +- set_nonunix_perms(stbuf,&fp); ++ set_nonunix_perms(&stbuf->st_mode,&fp); + + stbuf->st_uid=fp.unixprivs.uid; + stbuf->st_gid=fp.unixprivs.gid; +diff -up afpfs-ng-0.8.1/lib/midlevel.c.pointer afpfs-ng-0.8.1/lib/midlevel.c +--- afpfs-ng-0.8.1/lib/midlevel.c.pointer 2008-03-08 17:08:18.000000000 +0100 ++++ afpfs-ng-0.8.1/lib/midlevel.c 2011-06-14 17:02:15.000000000 +0200 +@@ -713,7 +713,7 @@ int ml_write(struct afp_volume * volume, + { + + int ret,err=0; +- int totalwritten = 0; ++ size_t totalwritten = 0; + uint64_t sizetowrite, ignored; + unsigned char flags = 0; + unsigned int max_packet_size=volume->server->tx_quantum; +diff -up afpfs-ng-0.8.1/lib/proto_attr.c.pointer afpfs-ng-0.8.1/lib/proto_attr.c +--- afpfs-ng-0.8.1/lib/proto_attr.c.pointer 2008-01-30 05:37:58.000000000 +0100 ++++ afpfs-ng-0.8.1/lib/proto_attr.c 2011-06-14 17:02:15.000000000 +0200 +@@ -166,7 +166,7 @@ int afp_getextattr(struct afp_volume * v + copy_path(server,p,pathname,strlen(pathname)); + unixpath_to_afppath(server,p); + p2=p+sizeof_path_header(server)+strlen(pathname); +- if (((unsigned int ) p2) & 0x1) p2++; ++ if (((unsigned long) p2) & 0x1) p2++; + req2=(void *) p2; + + req2->len=htons(namelen); +diff -up afpfs-ng-0.8.1/lib/proto_desktop.c.pointer afpfs-ng-0.8.1/lib/proto_desktop.c +--- afpfs-ng-0.8.1/lib/proto_desktop.c.pointer 2008-02-18 04:44:11.000000000 +0100 ++++ afpfs-ng-0.8.1/lib/proto_desktop.c 2011-06-14 17:02:15.000000000 +0200 +@@ -168,7 +168,7 @@ int afp_getcomment_reply(struct afp_serv + return 0; + } + +-int afp_closedt(struct afp_server * server, unsigned short * refnum) ++int afp_closedt(struct afp_server * server, unsigned short refnum) + { + struct { + struct dsi_header dsi_header __attribute__((__packed__)); +diff -up afpfs-ng-0.8.1/lib/proto_directory.c.pointer afpfs-ng-0.8.1/lib/proto_directory.c +--- afpfs-ng-0.8.1/lib/proto_directory.c.pointer 2008-02-19 03:39:29.000000000 +0100 ++++ afpfs-ng-0.8.1/lib/proto_directory.c 2011-06-14 17:02:15.000000000 +0200 +@@ -248,6 +248,7 @@ int afp_enumerate_reply(struct afp_serve + + return 0; + } ++ + int afp_enumerateext2_reply(struct afp_server *server, char * buf, unsigned int size, void * other) + { + +@@ -266,8 +267,7 @@ int afp_enumerateext2_reply(struct afp_s + char * p = buf + sizeof(*reply); + int i; + char *max=buf+size; +- struct afp_file_info * filebase = NULL, *filecur=NULL, *new_file=NULL; +- void ** x = other; ++ struct afp_file_info * filebase = NULL, *filecur = NULL, *new_file = NULL, **x = (struct afp_file_info **) other; + + if (reply->dsi_header.return_code.error_code) { + return reply->dsi_header.return_code.error_code; +diff -up afpfs-ng-0.8.1/lib/proto_map.c.pointer afpfs-ng-0.8.1/lib/proto_map.c +--- afpfs-ng-0.8.1/lib/proto_map.c.pointer 2008-01-30 05:37:59.000000000 +0100 ++++ afpfs-ng-0.8.1/lib/proto_map.c 2011-06-14 17:02:15.000000000 +0200 +@@ -122,7 +122,7 @@ int afp_mapid_reply(struct afp_server *s + + if (reply->header.return_code.error_code!=kFPNoErr) return -1; + +- copy_from_pascal_two(name,&reply->name,255); ++ copy_from_pascal_two(name,reply->name,255); + + return 0; + } +diff -up afpfs-ng-0.8.1/lib/proto_session.c.pointer afpfs-ng-0.8.1/lib/proto_session.c +--- afpfs-ng-0.8.1/lib/proto_session.c.pointer 2008-02-18 04:46:19.000000000 +0100 ++++ afpfs-ng-0.8.1/lib/proto_session.c 2011-06-14 17:02:15.000000000 +0200 +@@ -39,7 +39,7 @@ int afp_getsessiontoken(struct afp_serve + switch (type) { + case kLoginWithTimeAndID: + case kReconnWithTimeAndID: { +- uint32_t *p = (void *) (((unsigned int) request)+ ++ uint32_t *p = (void *) (((unsigned long) request)+ + sizeof(*request)); + + offset=sizeof(timestamp); +@@ -63,7 +63,7 @@ int afp_getsessiontoken(struct afp_serve + goto error; + } + +- data=(void *) (((unsigned int) request)+sizeof(*request)+offset); ++ data=(void *) (((unsigned long) request)+sizeof(*request)+offset); + request->idlength=htonl(datalen); + request->pad=0; + request->type=htons(type); +@@ -127,7 +127,7 @@ int afp_disconnectoldsession(struct afp_ + if ((request=malloc(sizeof(*request) + AFP_TOKEN_MAX_LEN))==NULL) + return -1; + +- token_data = request + sizeof(*request); ++ token_data = (char *)request + sizeof(*request); + + request->type=htons(type); + +diff -up afpfs-ng-0.8.1/lib/uams.c.pointer afpfs-ng-0.8.1/lib/uams.c +--- afpfs-ng-0.8.1/lib/uams.c.pointer 2008-01-04 04:52:44.000000000 +0100 ++++ afpfs-ng-0.8.1/lib/uams.c 2011-06-14 17:02:15.000000000 +0200 +@@ -180,7 +180,7 @@ static int cleartxt_login(struct afp_ser + goto cleartxt_fail; + + p += copy_to_pascal(p, username) + 1; +- if ((int)p & 0x1) ++ if ((long)p & 0x1) + len--; + else + p++; +@@ -230,7 +230,7 @@ static int cleartxt_passwd(struct afp_se + goto cleartxt_fail; + + p += copy_to_pascal(p, username) + 1; +- if ((int)p & 0x1) ++ if ((long)p & 0x1) + len--; + else + p++; +@@ -580,7 +580,7 @@ static int dhx_login(struct afp_server * + if (ai == NULL) + goto dhx_noctx_fail; + d += copy_to_pascal(ai, username) + 1; +- if (((int)d) % 2) ++ if (((long)d) % 2) + d++; + else + ai_len--; +diff -up afpfs-ng-0.8.1/lib/utils.c.pointer afpfs-ng-0.8.1/lib/utils.c +--- afpfs-ng-0.8.1/lib/utils.c.pointer 2008-02-18 04:53:37.000000000 +0100 ++++ afpfs-ng-0.8.1/lib/utils.c 2011-06-14 17:02:15.000000000 +0200 +@@ -196,7 +196,7 @@ int invalid_filename(struct afp_server * + maxlen=255; + + +- p=filename+1; ++ p=(char *)filename+1; + while ((q=strchr(p,'/'))) { + if (q>p+maxlen) + return 1; diff --git a/community/afpfs-ng/10-fix-errno.patch b/community/afpfs-ng/10-fix-errno.patch new file mode 100644 index 000000000..ff7ce44bd --- /dev/null +++ b/community/afpfs-ng/10-fix-errno.patch @@ -0,0 +1,23 @@ +--- afpfs-ng-0.8.1/lib/afp.c 2011-09-04 19:42:42.000000000 +0200 ++++ afpfs-ng-0.8.1/lib/afp.c 2011-09-04 19:39:44.000000000 +0200 +@@ -19,7 +19,6 @@ + #include <sys/time.h> + #include <sys/types.h> + #include <sys/socket.h> +-#include <errno.h> + + #include <afpfs-ng/afp_protocol.h> + #include <afpfs-ng/libafpclient.h> +--- afpfs-ng-0.8.1/lib/afp_url.c 2011-09-04 19:42:42.000000000 +0200 ++++ afpfs-ng-0.8.1/lib/afp_url.c 2011-09-04 19:40:27.000000000 +0200 +@@ -21,7 +21,9 @@ + + static int check_port(char * port) + { +- long long ret = strtol(port,NULL,10); ++ long long ret = 0; ++ errno = 0; ++ ret = strtol(port,NULL,10); + if ((ret<0) || (ret>32767)) return -1; + if (errno) { + printf("port error\n"); diff --git a/community/afpfs-ng/20-build-error-fixes.patch b/community/afpfs-ng/20-build-error-fixes.patch new file mode 100644 index 000000000..303e2646c --- /dev/null +++ b/community/afpfs-ng/20-build-error-fixes.patch @@ -0,0 +1,125 @@ +Description: Fix build errors. +Origin: http://anonscm.debian.org/gitweb/?p=collab-maint/afpfs-ng.git;a=blob;f=debian/patches/build-error-fixes.patch + +--- a/lib/afp_url.c ++++ b/lib/afp_url.c +@@ -233,7 +233,7 @@ + } + } + +- snprintf(url->servername,strlen(p)+1,p); ++ strcpy(url->servername,p); + if (check_servername(url->servername)) { + if (verbose) printf("This isn't a valid servername\n"); + return -1; +@@ -263,7 +263,7 @@ + if ((q=escape_strrchr(p,':',":"))) { + *q='\0'; + q++; +- snprintf(url->password,strlen(q)+1,q); ++ strcpy(url->password,q); + if (check_password(url->password)) { + if (verbose) printf("This isn't a valid passwd\n"); + return -1; +@@ -276,7 +276,7 @@ + if ((q=strstr(p,";AUTH="))) { + *q='\0'; + q+=6; +- snprintf(url->uamname,strlen(q)+1,q); ++ strcpy(url->uamname,q); + if (check_uamname(url->uamname)) { + if (verbose) printf("This isn't a valid uamname\n"); + return -1; +@@ -284,7 +284,7 @@ + } + + if (strlen(p)>0) { +- snprintf(url->username,strlen(p)+1,p); ++ strcpy(url->username,p); + if (check_username(url->username)) { + if (verbose) printf("This isn't a valid username\n"); + return -1;; +@@ -304,12 +304,12 @@ + *q='\0'; + q++; + } +- snprintf(url->volumename,strlen(p)+1,p); ++ strcpy(url->volumename,p); + + + if (q) { + url->path[0]='/'; +- snprintf(url->path+1,strlen(q)+1,q); ++ strcpy(url->path+1,q); + } + + done: +--- a/fuse/commands.c ++++ b/fuse/commands.c +@@ -163,8 +163,7 @@ + + if (c) { + len = strlen(c->client_string); +- snprintf(c->client_string+len, +- MAX_CLIENT_RESPONSE-len, ++ strcpy(c->client_string+len, + message); + } else { + +@@ -468,7 +467,7 @@ + volume->mapping=req->map; + afp_detect_mapping(volume); + +- snprintf(volume->mountpoint,255,req->mountpoint); ++ strcpy(volume->mountpoint,req->mountpoint); + + /* Create the new thread and block until we get an answer back */ + { +--- a/fuse/client.c ++++ b/fuse/client.c +@@ -547,7 +547,7 @@ + done: + memset(toprint,0,MAX_CLIENT_RESPONSE+200); + snprintf(toprint,MAX_CLIENT_RESPONSE+200,"%s",incoming_buffer+sizeof(*answer)); +- printf(toprint); ++ printf("%s",toprint); + return ((struct afp_server_response *) incoming_buffer)->result; + + return 0; +--- a/cmdline/cmdline_afp.c ++++ b/cmdline/cmdline_afp.c +@@ -828,11 +828,11 @@ + char text[40960]; + + afp_status_header(text,&len); +- printf(text); ++ printf("%s",text); + + len=40960; + afp_status_server(server,text,&len); +- printf(text); ++ printf("%s",text); + return 0; + } + +--- a/cmdline/cmdline_testafp.c ++++ b/cmdline/cmdline_testafp.c +@@ -26,12 +26,12 @@ + struct afp_url valid_url; + afp_default_url(&valid_url); + valid_url.protocol=protocol; +- sprintf(valid_url.servername,servername); +- sprintf(valid_url.volumename,volumename); +- sprintf(valid_url.path,path); +- sprintf(valid_url.username,username); +- sprintf(valid_url.password,password); +- sprintf(valid_url.uamname,uamname); ++ strcpy(valid_url.servername,servername); ++ strcpy(valid_url.volumename,volumename); ++ strcpy(valid_url.path,path); ++ strcpy(valid_url.username,username); ++ strcpy(valid_url.password,password); ++ strcpy(valid_url.uamname,uamname); + valid_url.port=port; + + if (afp_url_validate(url_string,&valid_url)) diff --git a/community/afpfs-ng/21-header-path-fix.patch b/community/afpfs-ng/21-header-path-fix.patch new file mode 100644 index 000000000..fe79b1f59 --- /dev/null +++ b/community/afpfs-ng/21-header-path-fix.patch @@ -0,0 +1,16 @@ +Description: Ensure internal headers are picked instead of system headers. +Origin: http://anonscm.debian.org/gitweb/?p=collab-maint/afpfs-ng.git;a=blob;f=debian/patches/header-path-fix.patch + +--- a/include/afpfs-ng/afp.h ++++ b/include/afpfs-ng/afp.h +@@ -7,8 +7,8 @@ + #include <netdb.h> + #include <sys/statvfs.h> + #include <pwd.h> +-#include <afpfs-ng/afp_protocol.h> +-#include <afpfs-ng/libafpclient.h> ++#include "afp_protocol.h" ++#include "libafpclient.h" + #include <sys/types.h> + #include <sys/stat.h> + #include <unistd.h> diff --git a/community/afpfs-ng/30-include-fixes.patch b/community/afpfs-ng/30-include-fixes.patch new file mode 100644 index 000000000..de4f88392 --- /dev/null +++ b/community/afpfs-ng/30-include-fixes.patch @@ -0,0 +1,44 @@ +--- a/include/afpfs-ng/dsi.h 2012-02-23 10:02:07.062734160 +0100 ++++ b/include/afpfs-ng/dsi.h 2012-02-23 10:09:46.297111254 +0100 +@@ -2,7 +2,7 @@ + #ifndef __DSI_H_ + #define __DSI_H_ + +-#include "afpfs-ng/afp.h" ++#include "afp.h" + + struct dsi_request + { +--- a/include/afpfs-ng/map_def.h 2012-02-23 10:02:07.062734160 +0100 ++++ b/include/afpfs-ng/map_def.h 2012-02-23 10:11:32.769953053 +0100 +@@ -1,7 +1,7 @@ + #ifndef __MAP_H_ + #define __MAP_H_ + +-#include "afpfs-ng/afp.h" ++#include "afp.h" + + #define AFP_MAPPING_UNKNOWN 0 + #define AFP_MAPPING_COMMON 1 +--- a/include/afpfs-ng/midlevel.h 2012-02-23 10:02:07.062734160 +0100 ++++ b/include/afpfs-ng/midlevel.h 2012-02-23 10:12:40.519943675 +0100 +@@ -2,7 +2,7 @@ + #define __MIDLEVEL_H_ + + #include <utime.h> +-#include "afpfs-ng/afp.h" ++#include "afp.h" + + int ml_open(struct afp_volume * volume, const char *path, int flags, + struct afp_file_info **newfp); +--- a/include/afpfs-ng/utils.h 2012-02-23 10:14:42.212332892 +0100 ++++ b/include/afpfs-ng/utils.h 2012-02-23 10:14:51.116069525 +0100 +@@ -2,7 +2,7 @@ + #define __UTILS_H_ + #include <stdio.h> + +-#include "afpfs-ng/afp.h" ++#include "afp.h" + + #if BYTE_ORDER == BIG_ENDIAN + #define hton64(x) (x) diff --git a/community/afpfs-ng/PKGBUILD b/community/afpfs-ng/PKGBUILD new file mode 100644 index 000000000..f8dc2d6fc --- /dev/null +++ b/community/afpfs-ng/PKGBUILD @@ -0,0 +1,66 @@ +# $Id: PKGBUILD 68567 2012-03-28 10:22:57Z idevolder $ +# Maintainer: BlackIkeEagle <ike DOT devolder AT gmail DOT com> +# Contributor: slubman <slubman.dndd@laposte.net> + +pkgname=afpfs-ng +pkgver=0.8.1 +pkgrel=5 +pkgdesc="A client for the Apple Filing Protocol (AFP)" +url="http://alexthepuffin.googlepages.com/" +license=('GPL') +depends=('gmp' 'fuse' 'libgcrypt') +arch=('i686' 'x86_64') +options=(!libtool) +source=( + "http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.bz2" + 'fix_afpfs-ng_includes.patch' + '01-gcrypt.patch' + '02-pointer.patch' + '10-fix-errno.patch' + '20-build-error-fixes.patch' + '21-header-path-fix.patch' + '30-include-fixes.patch' +) +sha256sums=( + '688560de1cde57ab8d9e0ef7dc6436dbf0267fe8884f9014e50ff92b297b01a8' + '627d94ab3c1cbc002b18839f514c6fa980b0a25dfc21e8761b389fcd39f32755' + '18dc77b064fc02c229e0cfa071a7e31cde6d0243671ebde2f561ebdf09dc38bb' + '8537b086c496e776be2a6757325717cb15dee6dcf2aedccebed6b4b2332d3dc1' + '0e1c0c0e3a9ff6e55ccbbbc1b4de630c874ff058e2ea94360b7d90e650d04811' + '393662da1bcd5d3aba180a2add37d9006e0a487c3bb7bf157a15aa492f4d6a87' + 'f551ae9debe8ce2c4ed1d7a8bce497801ace995473876a5fefa0443353232477' + '71b8f52923cef39f0cccb8fdff610575958fd5dbed66e5aa4413ae6aceeec656' +) + +build() { + cd "$pkgname-$pkgver" + # apply patches + msg2 'fix_afpfs-ng_includes.patch' + patch -Np1 -i "$srcdir/fix_afpfs-ng_includes.patch" + msg2 '01-gcrypt.patch' + patch -Np1 -i "$srcdir/01-gcrypt.patch" + msg2 '02-pointer.patch' + patch -Np1 -i "$srcdir/02-pointer.patch" + msg2 '10-fix-errno.patch' + patch -Np1 -i "$srcdir/10-fix-errno.patch" + msg2 '20-build-error-fixes.patch' + patch -Np1 -i "$srcdir/20-build-error-fixes.patch" + msg2 '21-header-path-fix.patch' + patch -Np1 -i "$srcdir/21-header-path-fix.patch" + msg2 '30-include-fixes.patch' + patch -Np1 -i "$srcdir/30-include-fixes.patch" + + ./configure --prefix=/usr + make +} + +package() { + cd "$pkgname-$pkgver" + make DESTDIR="$pkgdir" install + + # install headers + cd include + for header in afpfs-ng/*.h; do + install -Dm644 "$header" "$pkgdir/usr/include/$header" + done +} diff --git a/community/afpfs-ng/fix_afpfs-ng_includes.patch b/community/afpfs-ng/fix_afpfs-ng_includes.patch new file mode 100644 index 000000000..f507a485e --- /dev/null +++ b/community/afpfs-ng/fix_afpfs-ng_includes.patch @@ -0,0 +1,3082 @@ +diff -Naur afpfs-ng-0.8.1/cmdline/cmdline_afp.c afpfs-ng-0.8.1.patch/cmdline/cmdline_afp.c +--- afpfs-ng-0.8.1/cmdline/cmdline_afp.c 2008-02-19 02:54:19.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/cmdline/cmdline_afp.c 2011-09-10 12:13:50.102124369 +0200 +@@ -3,9 +3,9 @@ + + */ + +-#include "afp.h" +-#include "midlevel.h" +-#include "map_def.h" ++#include "afpfs-ng/afp.h" ++#include "afpfs-ng/midlevel.h" ++#include "afpfs-ng/map_def.h" + + #include <string.h> + #include <stdio.h> +diff -Naur afpfs-ng-0.8.1/cmdline/cmdline_testafp.c afpfs-ng-0.8.1.patch/cmdline/cmdline_testafp.c +--- afpfs-ng-0.8.1/cmdline/cmdline_testafp.c 2008-03-04 21:16:50.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/cmdline/cmdline_testafp.c 2011-09-10 12:13:50.102124369 +0200 +@@ -3,8 +3,8 @@ + + */ + +-#include "afp.h" +-#include "midlevel.h" ++#include "afpfs-ng/afp.h" ++#include "afpfs-ng/midlevel.h" + + #include "cmdline_main.h" + +diff -Naur afpfs-ng-0.8.1/cmdline/getstatus.c afpfs-ng-0.8.1.patch/cmdline/getstatus.c +--- afpfs-ng-0.8.1/cmdline/getstatus.c 2008-02-18 04:28:09.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/cmdline/getstatus.c 2011-09-10 12:13:50.109124463 +0200 +@@ -2,7 +2,7 @@ + #include <string.h> + #include <pthread.h> + +-#include "afp.h" ++#include "afpfs-ng/afp.h" + + static int getstatus(char * address_string, unsigned int port) + { +diff -Naur afpfs-ng-0.8.1/configure.ac afpfs-ng-0.8.1.patch/configure.ac +--- afpfs-ng-0.8.1/configure.ac 2008-03-08 17:23:12.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/configure.ac 2011-09-10 12:13:50.109124463 +0200 +@@ -11,6 +11,7 @@ + AC_PROG_CC + AC_PROG_INSTALL + AC_PROG_LIBTOOL ++AM_PROG_CC_C_O + + # Checks for libraries. + # FIXME: Replace `main' with a function in `-lncurses': +@@ -105,7 +106,7 @@ + + + +-AC_CONFIG_FILES([lib/Makefile fuse/Makefile cmdline/Makefile Makefile docs/Makefile]) ++AC_CONFIG_FILES([lib/Makefile fuse/Makefile cmdline/Makefile Makefile include/Makefile include/afpfs-ng/Makefile docs/Makefile]) + + AC_OUTPUT + +diff -Naur afpfs-ng-0.8.1/fuse/client.c afpfs-ng-0.8.1.patch/fuse/client.c +--- afpfs-ng-0.8.1/fuse/client.c 2008-03-08 03:44:16.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/fuse/client.c 2011-09-10 12:13:50.110124477 +0200 +@@ -12,11 +12,11 @@ + #include <grp.h> + + #include "config.h" +-#include <afp.h> ++#include <afpfs-ng/afp.h> + #include "afp_server.h" +-#include "uams_def.h" +-#include "map_def.h" +-#include "libafpclient.h" ++#include "afpfs-ng/uams_def.h" ++#include "afpfs-ng/map_def.h" ++#include "afpfs-ng/libafpclient.h" + + #define default_uam "Cleartxt Passwrd" + +diff -Naur afpfs-ng-0.8.1/fuse/commands.c afpfs-ng-0.8.1.patch/fuse/commands.c +--- afpfs-ng-0.8.1/fuse/commands.c 2008-03-08 17:06:25.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/fuse/commands.c 2011-09-10 12:13:50.110124477 +0200 +@@ -19,15 +19,15 @@ + #include <getopt.h> + #include <signal.h> + +-#include "afp.h" +-#include "dsi.h" ++#include "afpfs-ng/afp.h" ++#include "afpfs-ng/dsi.h" + #include "afp_server.h" +-#include "utils.h" ++#include "afpfs-ng/utils.h" + #include "daemon.h" +-#include "uams_def.h" +-#include "codepage.h" +-#include "libafpclient.h" +-#include "map_def.h" ++#include "afpfs-ng/uams_def.h" ++#include "afpfs-ng/codepage.h" ++#include "afpfs-ng/libafpclient.h" ++#include "afpfs-ng/map_def.h" + #include "fuse_int.h" + #include "fuse_error.h" + #include "fuse_internal.h" +diff -Naur afpfs-ng-0.8.1/fuse/daemon.c afpfs-ng-0.8.1.patch/fuse/daemon.c +--- afpfs-ng-0.8.1/fuse/daemon.c 2008-03-04 18:26:05.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/fuse/daemon.c 2011-09-10 12:13:50.110124477 +0200 +@@ -23,11 +23,11 @@ + #include <signal.h> + #include <sys/socket.h> + +-#include "afp.h" ++#include "afpfs-ng/afp.h" + +-#include "dsi.h" ++#include "afpfs-ng/dsi.h" + #include "afp_server.h" +-#include "utils.h" ++#include "afpfs-ng/utils.h" + #include "daemon.h" + #include "commands.h" + +diff -Naur afpfs-ng-0.8.1/fuse/fuse_error.c afpfs-ng-0.8.1.patch/fuse/fuse_error.c +--- afpfs-ng-0.8.1/fuse/fuse_error.c 2008-01-18 05:40:10.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/fuse/fuse_error.c 2011-09-10 12:13:50.111124491 +0200 +@@ -4,7 +4,7 @@ + #include <unistd.h> + #include <string.h> + #include <stdio.h> +-#include "libafpclient.h" ++#include "afpfs-ng/libafpclient.h" + #include "fuse_internal.h" + + #define TMP_FILE "/tmp/fuse_stderr" +diff -Naur afpfs-ng-0.8.1/fuse/fuse_int.c afpfs-ng-0.8.1.patch/fuse/fuse_int.c +--- afpfs-ng-0.8.1/fuse/fuse_int.c 2008-03-02 06:06:24.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/fuse/fuse_int.c 2011-09-10 12:13:50.111124491 +0200 +@@ -18,7 +18,7 @@ + #define FUSE_USE_VERSION 25 + + +-#include "afp.h" ++#include "afpfs-ng/afp.h" + + #include <fuse.h> + #include <stdio.h> +@@ -39,10 +39,10 @@ + #include <pwd.h> + #include <stdarg.h> + +-#include "dsi.h" +-#include "afp_protocol.h" +-#include "codepage.h" +-#include "midlevel.h" ++#include "afpfs-ng/dsi.h" ++#include "afpfs-ng/afp_protocol.h" ++#include "afpfs-ng/codepage.h" ++#include "afpfs-ng/midlevel.h" + #include "fuse_error.h" + + /* Uncomment the following line to enable full debugging: */ +diff -Naur afpfs-ng-0.8.1/include/afpfs-ng/afp.h afpfs-ng-0.8.1.patch/include/afpfs-ng/afp.h +--- afpfs-ng-0.8.1/include/afpfs-ng/afp.h 1970-01-01 01:00:00.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/include/afpfs-ng/afp.h 2011-09-10 12:13:50.112124505 +0200 +@@ -0,0 +1,533 @@ ++ ++#ifndef _AFP_H_ ++#define _AFP_H_ ++ ++#include <arpa/inet.h> ++#include <pthread.h> ++#include <netdb.h> ++#include <sys/statvfs.h> ++#include <pwd.h> ++#include <afpfs-ng/afp_protocol.h> ++#include <afpfs-ng/libafpclient.h> ++#include <sys/types.h> ++#include <sys/stat.h> ++#include <unistd.h> ++#include <netinet/in.h> ++ ++ ++#define AFPFS_VERSION "0.8.1" ++ ++/* This is the maximum AFP version this library supports */ ++#define AFP_MAX_SUPPORTED_VERSION 32 ++ ++/* afp_url is used to pass locations around */ ++struct afp_url { ++ enum {TCPIP,AT} protocol; ++ char username[AFP_MAX_USERNAME_LEN]; ++ char uamname[50]; ++ char password[AFP_MAX_PASSWORD_LEN]; ++ char servername[AFP_SERVER_NAME_UTF8_LEN]; ++ int port; ++ char volumename[AFP_VOLUME_NAME_UTF8_LEN]; ++ char path[AFP_MAX_PATH]; ++ ++ int requested_version; ++ char zone[AFP_ZONE_LEN]; /* Only used for Appletalk */ ++ char volpassword[9];; ++}; ++ ++struct afp_token { ++ unsigned int length; ++ char data[AFP_TOKEN_MAX_LEN]; ++}; ++ ++#define SERVER_MAX_VERSIONS 10 ++#define SERVER_MAX_UAMS 10 ++ ++struct afp_rx_buffer { ++ unsigned int size; ++ unsigned int maxsize; ++ char * data; ++ int errorcode; ++}; ++ ++ ++struct afp_file_info { ++ unsigned short attributes; ++ unsigned int did; ++ unsigned int creation_date; ++ unsigned int modification_date; ++ unsigned int backup_date; ++ unsigned int fileid; ++ unsigned short offspring; ++ char sync; ++ char finderinfo[32]; ++ char name[AFP_MAX_PATH]; ++ char basename[AFP_MAX_PATH]; ++ char translated_name[AFP_MAX_PATH]; ++ struct afp_unixprivs unixprivs; ++ unsigned int accessrights; ++ struct afp_file_info * next; ++ struct afp_file_info * largelist_next; ++ unsigned char isdir; ++ unsigned long long size; ++ unsigned short resourcesize; ++ unsigned int resource; ++ unsigned short forkid; ++ struct afp_icon * icon; ++ int eof; ++}; ++ ++ ++#define VOLUME_EXTRA_FLAGS_VOL_CHMOD_KNOWN 0x1 ++#define VOLUME_EXTRA_FLAGS_VOL_CHMOD_BROKEN 0x2 ++#define VOLUME_EXTRA_FLAGS_SHOW_APPLEDOUBLE 0x4 ++#define VOLUME_EXTRA_FLAGS_VOL_SUPPORTS_UNIX 0x8 ++#define VOLUME_EXTRA_FLAGS_NO_LOCKING 0x10 ++#define VOLUME_EXTRA_FLAGS_IGNORE_UNIXPRIVS 0x20 ++#define VOLUME_EXTRA_FLAGS_READONLY 0x40 ++ ++#define AFP_VOLUME_UNMOUNTED 0 ++#define AFP_VOLUME_MOUNTED 1 ++#define AFP_VOLUME_UNMOUNTING 2 ++ ++struct afp_volume { ++ unsigned short volid; ++ char flags; /* This is from afpGetSrvrParms */ ++ unsigned short attributes; /* This is from VolOpen */ ++ unsigned short signature; /* This is fixed or variable */ ++ unsigned int creation_date; ++ unsigned int modification_date; ++ unsigned int backup_date; ++ struct statvfs stat; ++ unsigned char mounted; ++ char mountpoint[255]; ++ struct afp_server * server; ++ char volume_name[AFP_VOLUME_NAME_LEN]; ++ char volume_name_printable[AFP_VOLUME_NAME_UTF8_LEN]; ++ unsigned short dtrefnum; ++ char volpassword[AFP_VOLPASS_LEN]; ++ unsigned int extra_flags; /* This is an afpfs-ng specific field */ ++ ++ /* Our directory ID cache */ ++ struct did_cache_entry * did_cache_base; ++ pthread_mutex_t did_cache_mutex; ++ ++ /* Our journal of open forks */ ++ struct afp_file_info * open_forks; ++ pthread_mutex_t open_forks_mutex; ++ ++ /* Used to trigger startup */ ++ pthread_cond_t startup_condition_cond; ++ ++ struct { ++ uint64_t hits; ++ uint64_t misses; ++ uint64_t expired; ++ uint64_t force_removed; ++ } did_cache_stats; ++ ++ void * priv; /* This is a private structure for fuse/cmdline, etc */ ++ pthread_t thread; /* This is the per-volume thread */ ++ ++ int mapping; ++ ++}; ++ ++#define SERVER_STATE_CONNECTED 1 ++#define SERVER_STATE_DISCONNECTED 2 ++ ++enum server_type{ ++ AFPFS_SERVER_TYPE_UNKNOWN, ++ AFPFS_SERVER_TYPE_NETATALK, ++ AFPFS_SERVER_TYPE_AIRPORT, ++ AFPFS_SERVER_TYPE_MACINTOSH, ++}; ++ ++#define is_netatalk(x) ( (x)->machine_type == AFPFS_SERVER_TYPE_NETATALK ) ++#define is_airport(x) ( (x)->machine_type == AFPFS_SERVER_TYPE_AIRPORT ) ++#define is_macintosh(x) ( (x)->machine_type == AFPFS_SERVER_TYPE_MACINTOSH ) ++ ++ ++ ++struct afp_versions { ++ char *av_name; ++ int av_number; ++}; ++extern struct afp_versions afp_versions[]; ++ ++struct afp_server { ++ ++ /* Our buffer sizes */ ++ unsigned int tx_quantum; ++ unsigned int rx_quantum; ++ ++ unsigned int tx_delay; ++ ++ /* Connection information */ ++ struct sockaddr_in address; ++ int fd; ++ ++ /* Some stats, for information only */ ++ struct { ++ uint64_t runt_packets; ++ uint64_t incoming_dsi; ++ uint64_t rx_bytes; ++ uint64_t tx_bytes; ++ uint64_t requests_pending; ++ } stats; ++ ++ /* General information */ ++ char server_name[AFP_SERVER_NAME_LEN]; ++ char server_name_utf8[AFP_SERVER_NAME_UTF8_LEN]; ++ char server_name_printable[AFP_SERVER_NAME_UTF8_LEN]; ++ ++ char machine_type[17]; ++ char icon[256]; ++ char signature[16]; ++ unsigned short flags; ++ int connect_state; ++ enum server_type server_type; ++ ++ /* This is the time we connected */ ++ time_t connect_time; ++ ++ /* UAMs */ ++ unsigned int supported_uams; ++ unsigned int using_uam; ++ ++ /* Authentication */ ++ char username[AFP_MAX_USERNAME_LEN]; ++ char password[AFP_MAX_PASSWORD_LEN]; ++ ++ /* Session */ ++ struct afp_token token; ++ char need_resume; ++ ++ /* Versions */ ++ unsigned char requested_version; ++ unsigned char versions[SERVER_MAX_VERSIONS]; ++ struct afp_versions *using_version; ++ ++ /* Volumes */ ++ unsigned char num_volumes; ++ struct afp_volume * volumes; ++ ++ void * dsi; ++ unsigned int exit_flag; ++ ++ /* Our DSI request queue */ ++ pthread_mutex_t requestid_mutex; ++ pthread_mutex_t request_queue_mutex; ++ unsigned short lastrequestid; ++ unsigned short expectedrequestid; ++ struct dsi_request * command_requests; ++ ++ ++ char loginmesg[200]; ++ char servermesg[200]; ++ char path_encoding; ++ ++ /* This is the data for the incoming buffer */ ++ char * incoming_buffer; ++ int data_read; ++ int bufsize; ++ ++ /* And this is for the outgoing queue */ ++ pthread_mutex_t send_mutex; ++ ++ /* This is for user mapping */ ++ struct passwd passwd; ++ unsigned int server_uid, server_gid; ++ int server_gid_valid; ++ ++ struct afp_server *next; ++ ++ /* These are for DSI attention packets */ ++ unsigned int attention_quantum; ++ unsigned int attention_len; ++ char * attention_buffer; ++ ++}; ++ ++struct afp_extattr_info { ++ unsigned int maxsize; ++ unsigned int size; ++ char data[1024]; ++}; ++struct afp_comment { ++ unsigned int maxsize; ++ unsigned int size; ++ char *data; ++}; ++ ++struct afp_icon { ++ unsigned int maxsize; ++ unsigned int size; ++ char *data; ++}; ++ ++#define AFP_DEFAULT_ATTENTION_QUANTUM 1024 ++ ++void afp_unixpriv_to_stat(struct afp_file_info *fp, ++ struct stat *stat); ++ ++int init_uams(void) ; ++ ++unsigned int find_uam_by_name(const char * name); ++char * uam_bitmap_to_string(unsigned int bitmap); ++ ++ ++char * get_uam_names_list(void); ++ ++unsigned int default_uams_mask(void); ++ ++struct afp_volume * find_volume_by_name(struct afp_server * server, ++ const char * volname); ++ ++struct afp_connection_request { ++ unsigned int uam_mask; ++ struct afp_url url; ++}; ++ ++void afp_default_url(struct afp_url *url); ++int afp_parse_url(struct afp_url * url, const char * toparse, int verbose); ++void afp_print_url(struct afp_url * url); ++int afp_url_validate(char * url_string, struct afp_url * valid_url); ++ ++int afp_list_volnames(struct afp_server * server, char * names, int max); ++ ++/* User mapping */ ++int afp_detect_mapping(struct afp_volume * volume); ++ ++/* These are some functions that help with simple status text generation */ ++ ++int afp_status_header(char * text, int * len); ++int afp_status_server(struct afp_server * s,char * text, int * len); ++ ++ ++struct afp_server * afp_server_full_connect(void * priv, struct afp_connection_request * req); ++ ++void * just_end_it_now(void *other); ++void add_fd_and_signal(int fd); ++void loop_disconnect(struct afp_server *s); ++void afp_wait_for_started_loop(void); ++ ++ ++struct afp_versions * pick_version(unsigned char *versions, ++ unsigned char requested) ; ++int pick_uam(unsigned int u1, unsigned int u2); ++ ++int afp_server_login(struct afp_server *server, ++ char * mesg, unsigned int *l, unsigned int max); ++ ++ ++int afp_dologin(struct afp_server *server, ++ unsigned int uam, char * username, char * passwd); ++ ++void afp_free_server(struct afp_server **server); ++ ++struct afp_server * afp_server_init(struct sockaddr_in * address); ++int afp_get_address(void * priv, const char * hostname, unsigned int port, ++ struct sockaddr_in * address); ++ ++ ++int afp_main_loop(int command_fd); ++int afp_main_quick_startup(pthread_t * thread); ++ ++int afp_server_destroy(struct afp_server *s) ; ++int afp_server_reconnect(struct afp_server * s, char * mesg, ++ unsigned int *l, unsigned int max); ++int afp_server_connect(struct afp_server *s, int full); ++ ++struct afp_server * afp_server_complete_connection( ++ void * priv, ++ struct afp_server * server, ++ struct sockaddr_in * address, unsigned char * versions, ++ unsigned int uams, char * username, char * password, ++ unsigned int requested_version, unsigned int uam_mask); ++ ++int afp_connect_volume(struct afp_volume * volume, struct afp_server * server, ++ char * mesg, unsigned int * l, unsigned int max); ++int something_is_mounted(struct afp_server * server); ++ ++int add_cache_entry(struct afp_file_info * file) ; ++struct afp_file_info * get_cache_by_name(char * name); ++struct afp_server * find_server_by_address(struct sockaddr_in * address); ++struct afp_server * find_server_by_signature(char * signature); ++struct afp_server * find_server_by_name(char * name); ++int server_still_valid(struct afp_server * server); ++ ++ ++struct afp_server * get_server_base(void); ++int afp_server_remove(struct afp_server * server); ++ ++int afp_unmount_volume(struct afp_volume * volume); ++int afp_unmount_all_volumes(struct afp_server * server); ++ ++#define volume_is_readonly(x) (((x)->attributes&kReadOnly) || \ ++ ((x)->extra_flags & VOLUME_EXTRA_FLAGS_READONLY)) ++ ++int afp_opendt(struct afp_volume *volume, unsigned short * refnum); ++ ++int afp_closedt(struct afp_server * server, unsigned short * refnum); ++ ++int afp_getcomment(struct afp_volume *volume, unsigned int did, ++ const char * pathname, struct afp_comment * comment); ++ ++int afp_addcomment(struct afp_volume *volume, unsigned int did, ++ const char * pathname, char * comment,uint64_t *size); ++ ++int afp_geticon(struct afp_volume * volume, unsigned int filecreator, ++ unsigned int filetype, unsigned char icontype, ++ unsigned short length, struct afp_icon * icon); ++ ++/* Things you want to do to a server */ ++ ++int afp_getsrvrmsg(struct afp_server *server, unsigned short messagetype,unsigned char utf8, unsigned char block, char * mesg); ++ ++int afp_login(struct afp_server *server, char * uaname, ++ char * userauthinfo, unsigned int userauthinfo_len, ++ struct afp_rx_buffer *rx); ++ ++int afp_changepassword(struct afp_server *server, char * uaname, ++ char * userauthinfo, unsigned int userauthinfo_len, ++ struct afp_rx_buffer *rx); ++ ++int afp_logincont(struct afp_server *server, unsigned short id, ++ char * userauthinfo, unsigned int userauthinfo_len, ++ struct afp_rx_buffer *rx); ++ ++int afp_getsessiontoken(struct afp_server * server, int type, ++ unsigned int timestamp, struct afp_token *outgoing_token, ++ struct afp_token * incoming_token); ++ ++int afp_getsrvrparms(struct afp_server *server); ++ ++int afp_logout(struct afp_server *server,unsigned char wait); ++ ++int afp_mapname(struct afp_server * server, unsigned char subfunction, ++ char * name, unsigned int * id); ++ ++int afp_mapid(struct afp_server * server, unsigned char subfunction, ++ unsigned int id, char *name); ++ ++int afp_getuserinfo(struct afp_server * server, int thisuser, ++ unsigned int userid, unsigned short bitmap, ++ unsigned int *newuid, unsigned int *newgid); ++ ++int afp_zzzzz(struct afp_server *server); ++ ++int afp_volopen(struct afp_volume * volume, ++ unsigned short bitmap, char * password); ++ ++int afp_flush(struct afp_volume * volume); ++ ++int afp_getfiledirparms(struct afp_volume *volume, unsigned int did, ++ unsigned int filebitmap, unsigned int dirbitmap, const char * pathname, ++ struct afp_file_info *fp); ++ ++int afp_enumerate(struct afp_volume * volume, ++ unsigned int dirid, ++ unsigned int filebitmap, unsigned int dirbitmap, ++ unsigned short reqcount, ++ unsigned short startindex, ++ char * path, ++ struct afp_file_info ** file_p); ++ ++int afp_enumerateext2(struct afp_volume * volume, ++ unsigned int dirid, ++ unsigned int filebitmap, unsigned int dirbitmap, ++ unsigned short reqcount, ++ unsigned long startindex, ++ char * path, ++ struct afp_file_info ** file_p); ++ ++int afp_openfork(struct afp_volume * volume, ++ unsigned char forktype, ++ unsigned int dirid, ++ unsigned short accessmode, ++ char * filename, ++ struct afp_file_info *fp); ++ ++int afp_read(struct afp_volume * volume, unsigned short forkid, ++ uint32_t offset, ++ uint32_t count, struct afp_rx_buffer * rx); ++ ++int afp_readext(struct afp_volume * volume, unsigned short forkid, ++ uint64_t offset, ++ uint64_t count, struct afp_rx_buffer * rx); ++ ++int afp_getvolparms(struct afp_volume * volume, unsigned short bitmap); ++ ++ ++int afp_createdir(struct afp_volume * volume, unsigned int dirid, const char * pathname, unsigned int *did_p); ++ ++int afp_delete(struct afp_volume * volume, ++ unsigned int dirid, char * pathname); ++ ++ ++int afp_createfile(struct afp_volume * volume, unsigned char flag, ++ unsigned int did, char * pathname); ++ ++int afp_write(struct afp_volume * volume, unsigned short forkid, ++ uint32_t offset, uint32_t reqcount, ++ char * data, uint32_t * written); ++ ++int afp_writeext(struct afp_volume * volume, unsigned short forkid, ++ uint64_t offset, uint64_t reqcount, ++ char * data, uint64_t * written); ++ ++int afp_flushfork(struct afp_volume * volume, unsigned short forkid); ++ ++int afp_closefork(struct afp_volume * volume, unsigned short forkid); ++int afp_setfileparms(struct afp_volume * volume, ++ unsigned int dirid, const char * pathname, unsigned short bitmap, ++ struct afp_file_info *fp); ++int afp_setfiledirparms(struct afp_volume * volume, ++ unsigned int dirid, const char * pathname, unsigned short bitmap, ++ struct afp_file_info *fp); ++ ++int afp_setdirparms(struct afp_volume * volume, ++ unsigned int dirid, const char * pathname, unsigned short bitmap, ++ struct afp_file_info *fp); ++ ++int afp_volclose(struct afp_volume * volume); ++ ++ ++int afp_setforkparms(struct afp_volume *volume, ++ unsigned short forkid, unsigned short bitmap, unsigned long len); ++ ++int afp_byterangelock(struct afp_volume * volume, ++ unsigned char flag, ++ unsigned short forkid, ++ uint32_t offset, ++ uint32_t len, uint32_t *generated_offset); ++ ++int afp_byterangelockext(struct afp_volume * volume, ++ unsigned char flag, ++ unsigned short forkid, ++ uint64_t offset, ++ uint64_t len, uint64_t *generated_offset); ++ ++int afp_moveandrename(struct afp_volume *volume, ++ unsigned int src_did, ++ unsigned int dst_did, ++ char * src_path, char * dst_path, char *new_name); ++ ++int afp_rename(struct afp_volume * volume, ++ unsigned int dirid, ++ char * path_from, char * path_to); ++ ++int afp_listextattr(struct afp_volume * volume, ++ unsigned int dirid, unsigned short bitmap, ++ char * pathname, struct afp_extattr_info * info); ++ ++/* This is a currently undocumented command */ ++int afp_newcommand76(struct afp_volume * volume, unsigned int dlen, char * data); ++ ++/* For debugging */ ++char * afp_get_command_name(char code); ++ ++ ++#endif +diff -Naur afpfs-ng-0.8.1/include/afpfs-ng/afp_protocol.h afpfs-ng-0.8.1.patch/include/afpfs-ng/afp_protocol.h +--- afpfs-ng-0.8.1/include/afpfs-ng/afp_protocol.h 1970-01-01 01:00:00.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/include/afpfs-ng/afp_protocol.h 2011-09-10 12:13:50.112124505 +0200 +@@ -0,0 +1,361 @@ ++ ++#ifndef _AFP_PROTOCOL_H_ ++#define _AFP_PROTOCOL_H_ ++ ++#include <sys/types.h> ++#include <stddef.h> ++#include <unistd.h> ++#include <stdint.h> ++ ++/* This file defines constants for the Apple File Protocol. ++ All page references are from "Apple Filing Protocol Programming" version 3.2. ++ except where noted. ++*/ ++ ++#define AFP_SERVER_NAME_LEN 33 ++#define AFP_SERVER_NAME_UTF8_LEN 255 ++#define AFP_VOLUME_NAME_LEN 33 ++#define AFP_VOLUME_NAME_UTF8_LEN 33 ++#define AFP_SIGNATURE_LEN 16 ++#define AFP_MACHINETYPE_LEN 33 ++#define AFP_LOGINMESG_LEN 200 ++#define AFP_VOLPASS_LEN 8 ++#define AFP_HOSTNAME_LEN 255 ++/* This is actually just a guess, and only used for appletalk */ ++#define AFP_ZONE_LEN 255 ++ ++#define AFP_SERVER_ICON_LEN 256 ++ ++ ++#define AFP_MAX_USERNAME_LEN 127 ++#define AFP_MAX_PASSWORD_LEN 127 ++ ++ ++/* This is the maximum length of any UAM string */ ++#define AFP_UAM_LENGTH 24 ++ ++/* This is the maximum length of any path description */ ++#define AFP_MAX_PATH 768 ++ ++#define AFP_VOL_FLAT 1 ++#define AFP_VOL_FIXED 2 ++#define AFP_VOL_VARIABLE 3 ++ ++/* The root directory ID, p.26 */ ++ ++#define AFP_ROOT_DID 2 ++ ++/* Path type constants, p.249 */ ++ ++enum { ++kFPShortName = 1, ++kFPLongName = 2, ++kFPUTF8Name = 3 ++}; ++ ++/* fork types */ ++ ++#define AFP_FORKTYPE_DATA 0x0 ++#define AFP_FORKTYPE_RESOURCE 0x80 ++ ++/* openfork access modes, from p.196 */ ++ ++#define AFP_OPENFORK_ALLOWREAD 1 ++#define AFP_OPENFORK_ALLOWWRITE 2 ++#define AFP_OPENFORK_DENYREAD 0x10 ++#define AFP_OPENFORK_DENYWRITE 0x20 ++ ++/* Message type for getsrvmesg, p. 169*/ ++ ++typedef enum { ++ AFPMESG_LOGIN = 0, ++ AFPMESG_SERVER = 1 ++} afpmessage_t; ++ ++/* Message bitmap for getsrvrmsg */ ++ ++#define AFP_GETSRVRMSG_UTF8 0x2 ++#define AFP_GETSRVRMSG_GETMSG 0x1 ++ ++ ++/* Maximum Version length, p.17 */ ++#define AFP_MAX_VERSION_LENGTH 16 ++ ++/* Maximum length of a token, this is undocumented */ ++#define AFP_TOKEN_MAX_LEN 256 ++ ++/* The maximum size of a file for AFP 2 */ ++#define AFP_MAX_AFP2_FILESIZE (4294967296) ++ ++/* Unix privs, p.240 */ ++ ++struct afp_unixprivs { ++ uint32_t uid __attribute__((__packed__)); ++ uint32_t gid __attribute__((__packed__)); ++ uint32_t permissions __attribute__((__packed__)); ++ uint32_t ua_permissions __attribute__((__packed__)); ++ ++}; ++ ++ ++/* AFP Volume attributes bitmap, p.241 */ ++ ++enum { ++ kReadOnly = 0x01, ++ kHasVolumePassword = 0x02, ++ kSupportsFileIDs = 0x04, ++ kSupportsCatSearch = 0x08, ++ kSupportsBlankAccessPrivs = 0x10, ++ kSupportsUnixPrivs = 0x20, ++ kSupportsUTF8Names = 0x40, ++ kNoNetworkUserIDs = 0x80, ++ kDefaultPrivsFromParent = 0x100, ++ kNoExchangeFiles = 0x200, ++ kSupportsExtAttrs = 0x400, ++ kSupportsACLs=0x800 ++}; ++ ++/* AFP file creation constantes, p.250 */ ++enum { ++kFPSoftCreate = 0, ++kFPHardCreate = 0x80 ++}; ++ ++/* AFP Directory attributes, taken from the protocol guide p.236 */ ++ ++enum { ++ kFPAttributeBit = 0x1, ++ kFPParentDirIDBit = 0x2, ++ kFPCreateDateBit = 0x4, ++ kFPModDateBit = 0x8, ++ kFPBackupDateBit = 0x10, ++ kFPFinderInfoBit = 0x20, ++ kFPLongNameBit = 0x40, ++ kFPShortNameBit = 0x80, ++ kFPNodeIDBit = 0x100, ++ kFPOffspringCountBit = 0x0200, ++ kFPOwnerIDBit = 0x0400, ++ kFPGroupIDBit = 0x0800, ++ kFPAccessRightsBit = 0x1000, ++ kFPProDOSInfoBit = 0x2000, // AFP version 2.2 and earlier ++ kFPUTF8NameBit = 0x2000, // AFP version 3.0 and later ++ kFPUnixPrivsBit = 0x8000 // AFP version 3.0 and later ++}; ++ ++/* AFP File bitmap, p.238. These are the ones not in the AFP Directory ++ attributes map. */ ++ ++enum { ++ kFPDataForkLenBit = 0x0200, ++ kFPRsrcForkLenBit = 0x0400, ++ kFPExtDataForkLenBit = 0x0800, // AFP version 3.0 and later ++ kFPLaunchLimitBit = 0x1000, ++ kFPExtRsrcForkLenBit = 0x4000, // AFP version 3.0 and later ++}; ++ ++/* AFP Extended Attributes Bitmap, p.238 */ ++ ++enum { ++ kXAttrNoFollow = 0x1, ++ kXAttrCreate = 0x2, ++ kXAttrREplace=0x4 ++}; ++ ++ ++/* AFP function codes */ ++enum AFPFunction ++{ ++ afpByteRangeLock = 1, afpCloseVol, afpCloseDir, afpCloseFork, ++ afpCopyFile, afpCreateDir, afpCreateFile, ++ afpDelete, afpEnumerate, afpFlush, afpFlushFork, ++ afpGetForkParms = 14, afpGetSrvrInfo, afpGetSrvrParms, ++ afpGetVolParms, afpLogin, afpLoginCont, afpLogout, afpMapID, ++ afpMapName, afpMoveAndRename, afpOpenVol, afpOpenDir, afpOpenFork, ++ afpRead, afpRename, afpSetDirParms, afpSetFileParms, ++ afpSetForkParms, afpSetVolParms, afpWrite, afpGetFileDirParms, ++ afpSetFileDirParms, afpChangePassword, ++ afpGetUserInfo=37,afpGetSrvrMsg = 38, ++ afpOpenDT=48, ++ afpCloseDT=49, ++ afpGetIcon=51, afpGetIconInfo=52, ++ afpAddComment=56, afpRemoveComment=57, afpGetComment=58, ++ afpByteRangeLockExt=59, afpReadExt, afpWriteExt, ++ afpGetAuthMethods=62, ++ afp_LoginExt=63, ++ afpGetSessionToken=64, ++ afpDisconnectOldSession=65, ++ afpEnumerateExt=66, ++ afpCatSearchExt = 67, ++ afpEnumerateExt2 = 68, afpGetExtAttr, afpSetExtAttr, ++ afpRemoveExtAttr , afpListExtAttrs, ++ afpZzzzz = 122, ++ afpAddIcon=192, ++}; ++ ++/* AFP Volume bitmap. Take from 242 of the protocol guide. */ ++enum { ++ kFPBadVolPre222Bitmap = 0xFe00, ++ kFPBadVolBitmap = 0xF000, ++ kFPVolAttributeBit = 0x1, ++ kFPVolSignatureBit = 0x2, ++ kFPVolCreateDateBit = 0x4, ++ kFPVolModDateBit = 0x8, ++ kFPVolBackupDateBit = 0x10, ++ kFPVolIDBit = 0x20, ++ kFPVolBytesFreeBit = 0x40, ++ kFPVolBytesTotalBit = 0x80, ++ kFPVolNameBit = 0x100, ++ kFPVolExtBytesFreeBit = 0x200, ++ kFPVolExtBytesTotalBit = 0x400, ++ kFPVolBlockSizeBit = 0x800 ++}; ++ ++/* AFP Attention Codes -- 4 bits */ ++#define AFPATTN_SHUTDOWN (1 << 15) /* shutdown/disconnect */ ++#define AFPATTN_CRASH (1 << 14) /* server crashed */ ++#define AFPATTN_MESG (1 << 13) /* server has message */ ++#define AFPATTN_NORECONNECT (1 << 12) /* don't reconnect */ ++/* server notification */ ++#define AFPATTN_NOTIFY (AFPATTN_MESG | AFPATTN_NORECONNECT) ++ ++/* extended bitmap -- 12 bits. volchanged is only useful w/ a server ++ * notification, and time is only useful for shutdown. */ ++#define AFPATTN_VOLCHANGED (1 << 0) /* volume has changed */ ++#define AFPATTN_TIME(x) ((x) & 0xfff) /* time in minutes */ ++ ++#define kFPNoErr 0 ++ ++/* AFP result codes, p252 */ ++#define kASPSessClosed -1072 ++#define kFPAccessDenied -5000 ++#define kFPAuthContinue -5001 ++#define kFPBadUAM -5002 ++#define kFPBadVersNum -5003 ++#define kFPBitmapErr -5004 ++#define kFPCantMove -5005 ++#define kFPDenyConflict -5006 ++#define kFPDirNotEmpty -5007 ++#define kFPDiskFull -5008 ++#define kFPEOFErr -5009 ++#define kFPFileBusy -5010 ++#define kFPFlatVol -5011 ++#define kFPItemNotFound -5012 ++#define kFPLockErr -5013 ++#define kFPMiscErr -5014 ++#define kFPNoMoreLocks -5015 ++#define kFPNoServer -5016 ++#define kFPObjectExists -5017 ++#define kFPObjectNotFound -5018 ++#define kFPParamErr -5019 ++#define kFPRangeNotLocked -5020 ++#define kFPRangeOverlap -5021 ++#define kFPSessClosed -5022 ++#define kFPUserNotAuth -5023 ++#define kFPCallNotSupported -5024 ++#define kFPObjectTypeErr -5025 ++#define kFPTooManyFilesOpen -5026 ++#define kFPServerGoingDown -5027 ++#define kFPCantRename -5028 ++#define kFPDirNotFound -5029 ++#define kFPIconTypeError -5030 ++#define kFPVolLocked -5031 ++#define kFPObjectLocked -5032 ++#define kFPContainsSharedErr -5033 ++#define kFPIDNotFound -5034 ++#define kFPIDExists -5035 ++#define kFPDiffVolErr -5036 ++#define kFPCatalogChanged -5037 ++#define kFPSameObjectErr -5038 ++#define kFPBadIDErr -5039 ++#define kFPPwdSameErr -5040 ++#define kFPPwdTooShortErr -5041 ++#define kFPPwdExpiredErr -5042 ++#define kFPInsideSharedErr -5043 ++#define kFPInsideTrashErr -5044 ++#define kFPPwdNeedsChangeErr -5045 ++#define kFPPwdPolicyErr -5046 ++#define kFPDiskQuotaExceeded –5047 ++ ++ ++ ++/* These flags determine to lock or unlock in ByteRangeLock(Ext) */ ++ ++enum { ++ByteRangeLock_Lock = 0, ++ByteRangeLock_Unlock = 1 ++}; ++ ++/* These flags are used in volopen and getsrvrparm replies, p.171 */ ++ ++#define HasConfigInfo 0x1 ++#define HasPassword 0x80 ++ ++/* These are the subfunction for kFPMapID, as per p.248 */ ++ ++enum { ++kUserIDToName = 1, ++kGroupIDToName = 2, ++kUserIDToUTF8Name = 3, ++kGroupIDToUTF8Name = 4, ++kUserUUIDToUTF8Name = 5, ++kGroupUUIDToUTF8Name = 6 ++}; ++ ++ ++/* These are the subfunction flags described in the FPMapName command, p.286. ++ Note that this is different than what's described on p. 186. */ ++ ++enum { ++kNameToUserID = 1, ++kNameToGroupID = 2, ++kUTF8NameToUserID = 3, ++kUTF8NameToGroupID = 4, ++kUTF8NameToUserUUID = 5, ++kUTF8NameToGroupUUID = 6 ++}; ++ ++/* These are bits for FPGetUserInfo, p.173. */ ++#define kFPGetUserInfo_USER_ID 1 ++#define kFPGetUserInfo_PRI_GROUPID 2 ++ ++/* Flags for the replies of GetSrvrInfo and DSI GetStatus, p.240 */ ++ ++enum { ++ kSupportsCopyfile = 0x01, ++ kSupportsChgPwd = 0x02, ++ kDontAllowSavePwd = 0x04, ++ kSupportsSrvrMsg = 0x08, ++ kSrvrSig = 0x10, ++ kSupportsTCP = 0x20, ++ kSupportsSrvrNotify = 0x40, ++ kSupportsReconnect = 0x80, ++ kSupportsDirServices = 0x100, ++ kSupportsUTF8SrvrName = 0x200, ++ kSupportsUUIDs = 0x400, ++ kSupportsSuperClient = 0x8000 ++}; ++ ++ ++/* p.247 */ ++ ++enum { ++ kLoginWithoutID = 0, ++ kLoginWithID = 1, ++ kReconnWithID = 2, ++ kLoginWithTimeAndID = 3, ++ kReconnWithTimeAndID = 4, ++ kRecon1Login = 5, ++ kRecon1ReconnectLogin = 6, ++ kRecon1Refresh = 7, kGetKerberosSessionKey = 8 ++}; ++ ++ ++#define AFP_CHMOD_ALLOWED_BITS_22 \ ++ (S_IRUSR |S_IWUSR | S_IRGRP | S_IWGRP |S_IROTH | S_IWOTH | S_IFREG ) ++ ++ ++#endif ++ ++ ++ ++ +diff -Naur afpfs-ng-0.8.1/include/afpfs-ng/codepage.h afpfs-ng-0.8.1.patch/include/afpfs-ng/codepage.h +--- afpfs-ng-0.8.1/include/afpfs-ng/codepage.h 1970-01-01 01:00:00.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/include/afpfs-ng/codepage.h 2011-09-10 12:13:50.113124518 +0200 +@@ -0,0 +1,11 @@ ++#ifndef __CODE_PAGE_H_ ++#define __CODE_PAGE_H_ ++int convert_utf8dec_to_utf8pre(const char *src, int src_len, ++ char * dest, int dest_len); ++int convert_utf8pre_to_utf8dec(const char * src, int src_len, ++ char * dest, int dest_len); ++int convert_path_to_unix(char encoding, char * dest, ++ char * src, int dest_len); ++int convert_path_to_afp(char encoding, char * dest, ++ char * src, int dest_len); ++#endif +diff -Naur afpfs-ng-0.8.1/include/afpfs-ng/dsi.h afpfs-ng-0.8.1.patch/include/afpfs-ng/dsi.h +--- afpfs-ng-0.8.1/include/afpfs-ng/dsi.h 1970-01-01 01:00:00.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/include/afpfs-ng/dsi.h 2011-09-10 12:13:50.115124544 +0200 +@@ -0,0 +1,33 @@ ++ ++#ifndef __DSI_H_ ++#define __DSI_H_ ++ ++#include "afpfs-ng/afp.h" ++ ++struct dsi_request ++{ ++ unsigned short requestid; ++ unsigned char subcommand; ++ void * other; ++ unsigned char wait; ++ pthread_cond_t condition_cond; ++ struct dsi_request * next; ++ int return_code; ++}; ++ ++int dsi_receive(struct afp_server * server, void * data, int size); ++int dsi_getstatus(struct afp_server * server); ++ ++int dsi_opensession(struct afp_server *server); ++ ++int dsi_send(struct afp_server *server, char * msg, int size,int wait,unsigned char subcommand, void ** other); ++struct dsi_session * dsi_create(struct afp_server *server); ++int dsi_restart(struct afp_server *server); ++int dsi_recv(struct afp_server * server); ++ ++#define DSI_BLOCK_TIMEOUT -1 ++#define DSI_DONT_WAIT 0 ++#define DSI_DEFAULT_TIMEOUT 5 ++ ++ ++#endif +diff -Naur afpfs-ng-0.8.1/include/afpfs-ng/libafpclient.h afpfs-ng-0.8.1.patch/include/afpfs-ng/libafpclient.h +--- afpfs-ng-0.8.1/include/afpfs-ng/libafpclient.h 1970-01-01 01:00:00.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/include/afpfs-ng/libafpclient.h 2011-09-10 12:13:50.115124544 +0200 +@@ -0,0 +1,50 @@ ++ ++#ifndef __CLIENT_H_ ++#define __CLIENT_H_ ++ ++#include <unistd.h> ++#include <syslog.h> ++ ++#define MAX_CLIENT_RESPONSE 2048 ++ ++ ++enum loglevels { ++ AFPFSD, ++}; ++ ++struct afp_server; ++struct afp_volume; ++ ++struct libafpclient { ++ int (*unmount_volume) (struct afp_volume * volume); ++ void (*log_for_client)(void * priv, ++ enum loglevels loglevel, int logtype, const char *message); ++ void (*forced_ending_hook)(void); ++ int (*scan_extra_fds)(int command_fd,fd_set *set, int * max_fd); ++ void (*loop_started)(void); ++} ; ++ ++extern struct libafpclient * libafpclient; ++ ++void libafpclient_register(struct libafpclient * tmpclient); ++ ++ ++void signal_main_thread(void); ++ ++/* These are logging functions */ ++ ++#define MAXLOGSIZE 2048 ++ ++#define LOG_METHOD_SYSLOG 1 ++#define LOG_METHOD_STDOUT 2 ++ ++void set_log_method(int m); ++ ++ ++void log_for_client(void * priv, ++ enum loglevels loglevel, int logtype, char * message,...); ++ ++void stdout_log_for_client(void * priv, ++ enum loglevels loglevel, int logtype, const char *message); ++ ++#endif +diff -Naur afpfs-ng-0.8.1/include/afpfs-ng/Makefile.am afpfs-ng-0.8.1.patch/include/afpfs-ng/Makefile.am +--- afpfs-ng-0.8.1/include/afpfs-ng/Makefile.am 1970-01-01 01:00:00.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/include/afpfs-ng/Makefile.am 2011-09-10 12:13:50.115124544 +0200 +@@ -0,0 +1,6 @@ ++## Process this file with automake to produce Makefile.in ++ ++afpfsincludedir = $(includedir)/afpfs-ng ++ ++afpfsinclude_HEADERS = afp.h afp_protocol.h libafpclient.h ++nodist_afpfsinclude_HEADERS = codepage.h dsi.h map_def.h midlevel.h uams_def.h utils.h +diff -Naur afpfs-ng-0.8.1/include/afpfs-ng/map_def.h afpfs-ng-0.8.1.patch/include/afpfs-ng/map_def.h +--- afpfs-ng-0.8.1/include/afpfs-ng/map_def.h 1970-01-01 01:00:00.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/include/afpfs-ng/map_def.h 2011-09-10 12:13:50.116124557 +0200 +@@ -0,0 +1,15 @@ ++#ifndef __MAP_H_ ++#define __MAP_H_ ++ ++#include "afpfs-ng/afp.h" ++ ++#define AFP_MAPPING_UNKNOWN 0 ++#define AFP_MAPPING_COMMON 1 ++#define AFP_MAPPING_LOGINIDS 2 ++#define AFP_MAPPING_NAME 3 ++ ++unsigned int map_string_to_num(char * name); ++char * get_mapping_name(struct afp_volume * volume); ++ ++ ++#endif +diff -Naur afpfs-ng-0.8.1/include/afpfs-ng/midlevel.h afpfs-ng-0.8.1.patch/include/afpfs-ng/midlevel.h +--- afpfs-ng-0.8.1/include/afpfs-ng/midlevel.h 1970-01-01 01:00:00.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/include/afpfs-ng/midlevel.h 2011-09-10 12:13:50.116124557 +0200 +@@ -0,0 +1,64 @@ ++#ifndef __MIDLEVEL_H_ ++#define __MIDLEVEL_H_ ++ ++#include <utime.h> ++#include "afpfs-ng/afp.h" ++ ++int ml_open(struct afp_volume * volume, const char *path, int flags, ++ struct afp_file_info **newfp); ++ ++int ml_creat(struct afp_volume * volume, const char *path,mode_t mode); ++ ++int ml_readdir(struct afp_volume * volume, ++ const char *path, ++ struct afp_file_info **base); ++ ++int ml_read(struct afp_volume * volume, const char *path, ++ char *buf, size_t size, off_t offset, ++ struct afp_file_info *fp, int * eof); ++ ++int ml_chmod(struct afp_volume * vol, const char * path, mode_t mode); ++ ++int ml_unlink(struct afp_volume * vol, const char *path); ++ ++int ml_mkdir(struct afp_volume * vol, const char * path, mode_t mode); ++ ++int ml_close(struct afp_volume * volume, const char * path, ++ struct afp_file_info * fp); ++ ++int ml_getattr(struct afp_volume * volume, const char *path, ++ struct stat *stbuf); ++ ++int ml_write(struct afp_volume * volume, const char * path, ++ const char *data, size_t size, off_t offset, ++ struct afp_file_info * fp, uid_t uid, ++ gid_t gid); ++ ++int ml_readlink(struct afp_volume * vol, const char * path, ++ char *buf, size_t size); ++ ++int ml_rmdir(struct afp_volume * vol, const char *path); ++ ++int ml_chown(struct afp_volume * vol, const char * path, ++ uid_t uid, gid_t gid); ++ ++int ml_truncate(struct afp_volume * vol, const char * path, off_t offset); ++ ++int ml_utime(struct afp_volume * vol, const char * path, ++ struct utimbuf * timebuf); ++ ++int ml_symlink(struct afp_volume *vol, const char * path1, const char * path2); ++ ++int ml_rename(struct afp_volume * vol, ++ const char * path_from, const char * path_to); ++ ++int ml_statfs(struct afp_volume * vol, const char *path, struct statvfs *stat); ++ ++void afp_ml_filebase_free(struct afp_file_info **filebase); ++ ++int ml_passwd(struct afp_server *server, ++ char * username, char * oldpasswd, char * newpasswd); ++ ++ ++ ++#endif +diff -Naur afpfs-ng-0.8.1/include/afpfs-ng/uams_def.h afpfs-ng-0.8.1.patch/include/afpfs-ng/uams_def.h +--- afpfs-ng-0.8.1/include/afpfs-ng/uams_def.h 1970-01-01 01:00:00.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/include/afpfs-ng/uams_def.h 2011-09-10 12:13:50.116124557 +0200 +@@ -0,0 +1,16 @@ ++#ifndef __UAM_DEFS_H_ ++#define __UAM_DEFS_H_ ++ ++#define UAM_NOUSERAUTHENT 0x1 ++#define UAM_CLEARTXTPASSWRD 0x2 ++#define UAM_RANDNUMEXCHANGE 0x4 ++#define UAM_2WAYRANDNUM 0x8 ++#define UAM_DHCAST128 0x10 ++#define UAM_CLIENTKRB 0x20 ++#define UAM_DHX2 0x40 ++#define UAM_RECON1 0x80 ++ ++int uam_string_to_bitmap(char * name); ++char * uam_bitmap_to_string(unsigned int bitmap); ++ ++#endif +diff -Naur afpfs-ng-0.8.1/include/afpfs-ng/utils.h afpfs-ng-0.8.1.patch/include/afpfs-ng/utils.h +--- afpfs-ng-0.8.1/include/afpfs-ng/utils.h 1970-01-01 01:00:00.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/include/afpfs-ng/utils.h 2011-09-10 12:13:50.116124557 +0200 +@@ -0,0 +1,43 @@ ++#ifndef __UTILS_H_ ++#define __UTILS_H_ ++#include <stdio.h> ++ ++#include "afpfs-ng/afp.h" ++ ++#if BYTE_ORDER == BIG_ENDIAN ++#define hton64(x) (x) ++#define ntoh64(x) (x) ++#else /* BYTE_ORDER == BIG_ENDIAN */ ++#define hton64(x) ((u_int64_t) (htonl(((x) >> 32) & 0xffffffffLL)) | \ ++ (u_int64_t) ((htonl(x) & 0xffffffffLL) << 32)) ++#define ntoh64(x) (hton64(x)) ++#endif /* BYTE_ORDER == BIG_ENDIAN */ ++ ++#define min(a,b) (((a)<(b)) ? (a) : (b)) ++#define max(a,b) (((a)>(b)) ? (a) : (b)) ++ ++ ++ ++unsigned char unixpath_to_afppath( ++ struct afp_server * server, ++ char * buf); ++ ++unsigned char sizeof_path_header(struct afp_server * server); ++ ++ ++ ++unsigned char copy_from_pascal(char *dest, char *pascal,unsigned int max_len) ; ++unsigned short copy_from_pascal_two(char *dest, char *pascal,unsigned int max_len); ++ ++unsigned char copy_to_pascal(char *dest, const char *src); ++unsigned short copy_to_pascal_two(char *dest, const char *src); ++ ++void copy_path(struct afp_server * server, char * dest, const char * pathname, unsigned char len); ++ ++ ++char * create_path(struct afp_server * server, char * pathname, unsigned short * len); ++ ++ ++int invalid_filename(struct afp_server * server, const char * filename); ++ ++#endif +diff -Naur afpfs-ng-0.8.1/include/afp.h afpfs-ng-0.8.1.patch/include/afp.h +--- afpfs-ng-0.8.1/include/afp.h 2008-03-08 17:08:18.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/include/afp.h 1970-01-01 01:00:00.000000000 +0100 +@@ -1,533 +0,0 @@ +- +-#ifndef _AFP_H_ +-#define _AFP_H_ +- +-#include <arpa/inet.h> +-#include <pthread.h> +-#include <netdb.h> +-#include <sys/statvfs.h> +-#include <pwd.h> +-#include <afp_protocol.h> +-#include <libafpclient.h> +-#include <sys/types.h> +-#include <sys/stat.h> +-#include <unistd.h> +-#include <netinet/in.h> +- +- +-#define AFPFS_VERSION "0.8.1" +- +-/* This is the maximum AFP version this library supports */ +-#define AFP_MAX_SUPPORTED_VERSION 32 +- +-/* afp_url is used to pass locations around */ +-struct afp_url { +- enum {TCPIP,AT} protocol; +- char username[AFP_MAX_USERNAME_LEN]; +- char uamname[50]; +- char password[AFP_MAX_PASSWORD_LEN]; +- char servername[AFP_SERVER_NAME_UTF8_LEN]; +- int port; +- char volumename[AFP_VOLUME_NAME_UTF8_LEN]; +- char path[AFP_MAX_PATH]; +- +- int requested_version; +- char zone[AFP_ZONE_LEN]; /* Only used for Appletalk */ +- char volpassword[9];; +-}; +- +-struct afp_token { +- unsigned int length; +- char data[AFP_TOKEN_MAX_LEN]; +-}; +- +-#define SERVER_MAX_VERSIONS 10 +-#define SERVER_MAX_UAMS 10 +- +-struct afp_rx_buffer { +- unsigned int size; +- unsigned int maxsize; +- char * data; +- int errorcode; +-}; +- +- +-struct afp_file_info { +- unsigned short attributes; +- unsigned int did; +- unsigned int creation_date; +- unsigned int modification_date; +- unsigned int backup_date; +- unsigned int fileid; +- unsigned short offspring; +- char sync; +- char finderinfo[32]; +- char name[AFP_MAX_PATH]; +- char basename[AFP_MAX_PATH]; +- char translated_name[AFP_MAX_PATH]; +- struct afp_unixprivs unixprivs; +- unsigned int accessrights; +- struct afp_file_info * next; +- struct afp_file_info * largelist_next; +- unsigned char isdir; +- unsigned long long size; +- unsigned short resourcesize; +- unsigned int resource; +- unsigned short forkid; +- struct afp_icon * icon; +- int eof; +-}; +- +- +-#define VOLUME_EXTRA_FLAGS_VOL_CHMOD_KNOWN 0x1 +-#define VOLUME_EXTRA_FLAGS_VOL_CHMOD_BROKEN 0x2 +-#define VOLUME_EXTRA_FLAGS_SHOW_APPLEDOUBLE 0x4 +-#define VOLUME_EXTRA_FLAGS_VOL_SUPPORTS_UNIX 0x8 +-#define VOLUME_EXTRA_FLAGS_NO_LOCKING 0x10 +-#define VOLUME_EXTRA_FLAGS_IGNORE_UNIXPRIVS 0x20 +-#define VOLUME_EXTRA_FLAGS_READONLY 0x40 +- +-#define AFP_VOLUME_UNMOUNTED 0 +-#define AFP_VOLUME_MOUNTED 1 +-#define AFP_VOLUME_UNMOUNTING 2 +- +-struct afp_volume { +- unsigned short volid; +- char flags; /* This is from afpGetSrvrParms */ +- unsigned short attributes; /* This is from VolOpen */ +- unsigned short signature; /* This is fixed or variable */ +- unsigned int creation_date; +- unsigned int modification_date; +- unsigned int backup_date; +- struct statvfs stat; +- unsigned char mounted; +- char mountpoint[255]; +- struct afp_server * server; +- char volume_name[AFP_VOLUME_NAME_LEN]; +- char volume_name_printable[AFP_VOLUME_NAME_UTF8_LEN]; +- unsigned short dtrefnum; +- char volpassword[AFP_VOLPASS_LEN]; +- unsigned int extra_flags; /* This is an afpfs-ng specific field */ +- +- /* Our directory ID cache */ +- struct did_cache_entry * did_cache_base; +- pthread_mutex_t did_cache_mutex; +- +- /* Our journal of open forks */ +- struct afp_file_info * open_forks; +- pthread_mutex_t open_forks_mutex; +- +- /* Used to trigger startup */ +- pthread_cond_t startup_condition_cond; +- +- struct { +- uint64_t hits; +- uint64_t misses; +- uint64_t expired; +- uint64_t force_removed; +- } did_cache_stats; +- +- void * priv; /* This is a private structure for fuse/cmdline, etc */ +- pthread_t thread; /* This is the per-volume thread */ +- +- int mapping; +- +-}; +- +-#define SERVER_STATE_CONNECTED 1 +-#define SERVER_STATE_DISCONNECTED 2 +- +-enum server_type{ +- AFPFS_SERVER_TYPE_UNKNOWN, +- AFPFS_SERVER_TYPE_NETATALK, +- AFPFS_SERVER_TYPE_AIRPORT, +- AFPFS_SERVER_TYPE_MACINTOSH, +-}; +- +-#define is_netatalk(x) ( (x)->machine_type == AFPFS_SERVER_TYPE_NETATALK ) +-#define is_airport(x) ( (x)->machine_type == AFPFS_SERVER_TYPE_AIRPORT ) +-#define is_macintosh(x) ( (x)->machine_type == AFPFS_SERVER_TYPE_MACINTOSH ) +- +- +- +-struct afp_versions { +- char *av_name; +- int av_number; +-}; +-extern struct afp_versions afp_versions[]; +- +-struct afp_server { +- +- /* Our buffer sizes */ +- unsigned int tx_quantum; +- unsigned int rx_quantum; +- +- unsigned int tx_delay; +- +- /* Connection information */ +- struct sockaddr_in address; +- int fd; +- +- /* Some stats, for information only */ +- struct { +- uint64_t runt_packets; +- uint64_t incoming_dsi; +- uint64_t rx_bytes; +- uint64_t tx_bytes; +- uint64_t requests_pending; +- } stats; +- +- /* General information */ +- char server_name[AFP_SERVER_NAME_LEN]; +- char server_name_utf8[AFP_SERVER_NAME_UTF8_LEN]; +- char server_name_printable[AFP_SERVER_NAME_UTF8_LEN]; +- +- char machine_type[17]; +- char icon[256]; +- char signature[16]; +- unsigned short flags; +- int connect_state; +- enum server_type server_type; +- +- /* This is the time we connected */ +- time_t connect_time; +- +- /* UAMs */ +- unsigned int supported_uams; +- unsigned int using_uam; +- +- /* Authentication */ +- char username[AFP_MAX_USERNAME_LEN]; +- char password[AFP_MAX_PASSWORD_LEN]; +- +- /* Session */ +- struct afp_token token; +- char need_resume; +- +- /* Versions */ +- unsigned char requested_version; +- unsigned char versions[SERVER_MAX_VERSIONS]; +- struct afp_versions *using_version; +- +- /* Volumes */ +- unsigned char num_volumes; +- struct afp_volume * volumes; +- +- void * dsi; +- unsigned int exit_flag; +- +- /* Our DSI request queue */ +- pthread_mutex_t requestid_mutex; +- pthread_mutex_t request_queue_mutex; +- unsigned short lastrequestid; +- unsigned short expectedrequestid; +- struct dsi_request * command_requests; +- +- +- char loginmesg[200]; +- char servermesg[200]; +- char path_encoding; +- +- /* This is the data for the incoming buffer */ +- char * incoming_buffer; +- int data_read; +- int bufsize; +- +- /* And this is for the outgoing queue */ +- pthread_mutex_t send_mutex; +- +- /* This is for user mapping */ +- struct passwd passwd; +- unsigned int server_uid, server_gid; +- int server_gid_valid; +- +- struct afp_server *next; +- +- /* These are for DSI attention packets */ +- unsigned int attention_quantum; +- unsigned int attention_len; +- char * attention_buffer; +- +-}; +- +-struct afp_extattr_info { +- unsigned int maxsize; +- unsigned int size; +- char data[1024]; +-}; +-struct afp_comment { +- unsigned int maxsize; +- unsigned int size; +- char *data; +-}; +- +-struct afp_icon { +- unsigned int maxsize; +- unsigned int size; +- char *data; +-}; +- +-#define AFP_DEFAULT_ATTENTION_QUANTUM 1024 +- +-void afp_unixpriv_to_stat(struct afp_file_info *fp, +- struct stat *stat); +- +-int init_uams(void) ; +- +-unsigned int find_uam_by_name(const char * name); +-char * uam_bitmap_to_string(unsigned int bitmap); +- +- +-char * get_uam_names_list(void); +- +-unsigned int default_uams_mask(void); +- +-struct afp_volume * find_volume_by_name(struct afp_server * server, +- const char * volname); +- +-struct afp_connection_request { +- unsigned int uam_mask; +- struct afp_url url; +-}; +- +-void afp_default_url(struct afp_url *url); +-int afp_parse_url(struct afp_url * url, const char * toparse, int verbose); +-void afp_print_url(struct afp_url * url); +-int afp_url_validate(char * url_string, struct afp_url * valid_url); +- +-int afp_list_volnames(struct afp_server * server, char * names, int max); +- +-/* User mapping */ +-int afp_detect_mapping(struct afp_volume * volume); +- +-/* These are some functions that help with simple status text generation */ +- +-int afp_status_header(char * text, int * len); +-int afp_status_server(struct afp_server * s,char * text, int * len); +- +- +-struct afp_server * afp_server_full_connect(void * priv, struct afp_connection_request * req); +- +-void * just_end_it_now(void *other); +-void add_fd_and_signal(int fd); +-void loop_disconnect(struct afp_server *s); +-void afp_wait_for_started_loop(void); +- +- +-struct afp_versions * pick_version(unsigned char *versions, +- unsigned char requested) ; +-int pick_uam(unsigned int u1, unsigned int u2); +- +-int afp_server_login(struct afp_server *server, +- char * mesg, unsigned int *l, unsigned int max); +- +- +-int afp_dologin(struct afp_server *server, +- unsigned int uam, char * username, char * passwd); +- +-void afp_free_server(struct afp_server **server); +- +-struct afp_server * afp_server_init(struct sockaddr_in * address); +-int afp_get_address(void * priv, const char * hostname, unsigned int port, +- struct sockaddr_in * address); +- +- +-int afp_main_loop(int command_fd); +-int afp_main_quick_startup(pthread_t * thread); +- +-int afp_server_destroy(struct afp_server *s) ; +-int afp_server_reconnect(struct afp_server * s, char * mesg, +- unsigned int *l, unsigned int max); +-int afp_server_connect(struct afp_server *s, int full); +- +-struct afp_server * afp_server_complete_connection( +- void * priv, +- struct afp_server * server, +- struct sockaddr_in * address, unsigned char * versions, +- unsigned int uams, char * username, char * password, +- unsigned int requested_version, unsigned int uam_mask); +- +-int afp_connect_volume(struct afp_volume * volume, struct afp_server * server, +- char * mesg, unsigned int * l, unsigned int max); +-int something_is_mounted(struct afp_server * server); +- +-int add_cache_entry(struct afp_file_info * file) ; +-struct afp_file_info * get_cache_by_name(char * name); +-struct afp_server * find_server_by_address(struct sockaddr_in * address); +-struct afp_server * find_server_by_signature(char * signature); +-struct afp_server * find_server_by_name(char * name); +-int server_still_valid(struct afp_server * server); +- +- +-struct afp_server * get_server_base(void); +-int afp_server_remove(struct afp_server * server); +- +-int afp_unmount_volume(struct afp_volume * volume); +-int afp_unmount_all_volumes(struct afp_server * server); +- +-#define volume_is_readonly(x) (((x)->attributes&kReadOnly) || \ +- ((x)->extra_flags & VOLUME_EXTRA_FLAGS_READONLY)) +- +-int afp_opendt(struct afp_volume *volume, unsigned short * refnum); +- +-int afp_closedt(struct afp_server * server, unsigned short * refnum); +- +-int afp_getcomment(struct afp_volume *volume, unsigned int did, +- const char * pathname, struct afp_comment * comment); +- +-int afp_addcomment(struct afp_volume *volume, unsigned int did, +- const char * pathname, char * comment,uint64_t *size); +- +-int afp_geticon(struct afp_volume * volume, unsigned int filecreator, +- unsigned int filetype, unsigned char icontype, +- unsigned short length, struct afp_icon * icon); +- +-/* Things you want to do to a server */ +- +-int afp_getsrvrmsg(struct afp_server *server, unsigned short messagetype,unsigned char utf8, unsigned char block, char * mesg); +- +-int afp_login(struct afp_server *server, char * uaname, +- char * userauthinfo, unsigned int userauthinfo_len, +- struct afp_rx_buffer *rx); +- +-int afp_changepassword(struct afp_server *server, char * uaname, +- char * userauthinfo, unsigned int userauthinfo_len, +- struct afp_rx_buffer *rx); +- +-int afp_logincont(struct afp_server *server, unsigned short id, +- char * userauthinfo, unsigned int userauthinfo_len, +- struct afp_rx_buffer *rx); +- +-int afp_getsessiontoken(struct afp_server * server, int type, +- unsigned int timestamp, struct afp_token *outgoing_token, +- struct afp_token * incoming_token); +- +-int afp_getsrvrparms(struct afp_server *server); +- +-int afp_logout(struct afp_server *server,unsigned char wait); +- +-int afp_mapname(struct afp_server * server, unsigned char subfunction, +- char * name, unsigned int * id); +- +-int afp_mapid(struct afp_server * server, unsigned char subfunction, +- unsigned int id, char *name); +- +-int afp_getuserinfo(struct afp_server * server, int thisuser, +- unsigned int userid, unsigned short bitmap, +- unsigned int *newuid, unsigned int *newgid); +- +-int afp_zzzzz(struct afp_server *server); +- +-int afp_volopen(struct afp_volume * volume, +- unsigned short bitmap, char * password); +- +-int afp_flush(struct afp_volume * volume); +- +-int afp_getfiledirparms(struct afp_volume *volume, unsigned int did, +- unsigned int filebitmap, unsigned int dirbitmap, const char * pathname, +- struct afp_file_info *fp); +- +-int afp_enumerate(struct afp_volume * volume, +- unsigned int dirid, +- unsigned int filebitmap, unsigned int dirbitmap, +- unsigned short reqcount, +- unsigned short startindex, +- char * path, +- struct afp_file_info ** file_p); +- +-int afp_enumerateext2(struct afp_volume * volume, +- unsigned int dirid, +- unsigned int filebitmap, unsigned int dirbitmap, +- unsigned short reqcount, +- unsigned long startindex, +- char * path, +- struct afp_file_info ** file_p); +- +-int afp_openfork(struct afp_volume * volume, +- unsigned char forktype, +- unsigned int dirid, +- unsigned short accessmode, +- char * filename, +- struct afp_file_info *fp); +- +-int afp_read(struct afp_volume * volume, unsigned short forkid, +- uint32_t offset, +- uint32_t count, struct afp_rx_buffer * rx); +- +-int afp_readext(struct afp_volume * volume, unsigned short forkid, +- uint64_t offset, +- uint64_t count, struct afp_rx_buffer * rx); +- +-int afp_getvolparms(struct afp_volume * volume, unsigned short bitmap); +- +- +-int afp_createdir(struct afp_volume * volume, unsigned int dirid, const char * pathname, unsigned int *did_p); +- +-int afp_delete(struct afp_volume * volume, +- unsigned int dirid, char * pathname); +- +- +-int afp_createfile(struct afp_volume * volume, unsigned char flag, +- unsigned int did, char * pathname); +- +-int afp_write(struct afp_volume * volume, unsigned short forkid, +- uint32_t offset, uint32_t reqcount, +- char * data, uint32_t * written); +- +-int afp_writeext(struct afp_volume * volume, unsigned short forkid, +- uint64_t offset, uint64_t reqcount, +- char * data, uint64_t * written); +- +-int afp_flushfork(struct afp_volume * volume, unsigned short forkid); +- +-int afp_closefork(struct afp_volume * volume, unsigned short forkid); +-int afp_setfileparms(struct afp_volume * volume, +- unsigned int dirid, const char * pathname, unsigned short bitmap, +- struct afp_file_info *fp); +-int afp_setfiledirparms(struct afp_volume * volume, +- unsigned int dirid, const char * pathname, unsigned short bitmap, +- struct afp_file_info *fp); +- +-int afp_setdirparms(struct afp_volume * volume, +- unsigned int dirid, const char * pathname, unsigned short bitmap, +- struct afp_file_info *fp); +- +-int afp_volclose(struct afp_volume * volume); +- +- +-int afp_setforkparms(struct afp_volume *volume, +- unsigned short forkid, unsigned short bitmap, unsigned long len); +- +-int afp_byterangelock(struct afp_volume * volume, +- unsigned char flag, +- unsigned short forkid, +- uint32_t offset, +- uint32_t len, uint32_t *generated_offset); +- +-int afp_byterangelockext(struct afp_volume * volume, +- unsigned char flag, +- unsigned short forkid, +- uint64_t offset, +- uint64_t len, uint64_t *generated_offset); +- +-int afp_moveandrename(struct afp_volume *volume, +- unsigned int src_did, +- unsigned int dst_did, +- char * src_path, char * dst_path, char *new_name); +- +-int afp_rename(struct afp_volume * volume, +- unsigned int dirid, +- char * path_from, char * path_to); +- +-int afp_listextattr(struct afp_volume * volume, +- unsigned int dirid, unsigned short bitmap, +- char * pathname, struct afp_extattr_info * info); +- +-/* This is a currently undocumented command */ +-int afp_newcommand76(struct afp_volume * volume, unsigned int dlen, char * data); +- +-/* For debugging */ +-char * afp_get_command_name(char code); +- +- +-#endif +diff -Naur afpfs-ng-0.8.1/include/afp_protocol.h afpfs-ng-0.8.1.patch/include/afp_protocol.h +--- afpfs-ng-0.8.1/include/afp_protocol.h 2008-02-18 04:33:43.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/include/afp_protocol.h 1970-01-01 01:00:00.000000000 +0100 +@@ -1,361 +0,0 @@ +- +-#ifndef _AFP_PROTOCOL_H_ +-#define _AFP_PROTOCOL_H_ +- +-#include <sys/types.h> +-#include <stddef.h> +-#include <unistd.h> +-#include <stdint.h> +- +-/* This file defines constants for the Apple File Protocol. +- All page references are from "Apple Filing Protocol Programming" version 3.2. +- except where noted. +-*/ +- +-#define AFP_SERVER_NAME_LEN 33 +-#define AFP_SERVER_NAME_UTF8_LEN 255 +-#define AFP_VOLUME_NAME_LEN 33 +-#define AFP_VOLUME_NAME_UTF8_LEN 33 +-#define AFP_SIGNATURE_LEN 16 +-#define AFP_MACHINETYPE_LEN 33 +-#define AFP_LOGINMESG_LEN 200 +-#define AFP_VOLPASS_LEN 8 +-#define AFP_HOSTNAME_LEN 255 +-/* This is actually just a guess, and only used for appletalk */ +-#define AFP_ZONE_LEN 255 +- +-#define AFP_SERVER_ICON_LEN 256 +- +- +-#define AFP_MAX_USERNAME_LEN 127 +-#define AFP_MAX_PASSWORD_LEN 127 +- +- +-/* This is the maximum length of any UAM string */ +-#define AFP_UAM_LENGTH 24 +- +-/* This is the maximum length of any path description */ +-#define AFP_MAX_PATH 768 +- +-#define AFP_VOL_FLAT 1 +-#define AFP_VOL_FIXED 2 +-#define AFP_VOL_VARIABLE 3 +- +-/* The root directory ID, p.26 */ +- +-#define AFP_ROOT_DID 2 +- +-/* Path type constants, p.249 */ +- +-enum { +-kFPShortName = 1, +-kFPLongName = 2, +-kFPUTF8Name = 3 +-}; +- +-/* fork types */ +- +-#define AFP_FORKTYPE_DATA 0x0 +-#define AFP_FORKTYPE_RESOURCE 0x80 +- +-/* openfork access modes, from p.196 */ +- +-#define AFP_OPENFORK_ALLOWREAD 1 +-#define AFP_OPENFORK_ALLOWWRITE 2 +-#define AFP_OPENFORK_DENYREAD 0x10 +-#define AFP_OPENFORK_DENYWRITE 0x20 +- +-/* Message type for getsrvmesg, p. 169*/ +- +-typedef enum { +- AFPMESG_LOGIN = 0, +- AFPMESG_SERVER = 1 +-} afpmessage_t; +- +-/* Message bitmap for getsrvrmsg */ +- +-#define AFP_GETSRVRMSG_UTF8 0x2 +-#define AFP_GETSRVRMSG_GETMSG 0x1 +- +- +-/* Maximum Version length, p.17 */ +-#define AFP_MAX_VERSION_LENGTH 16 +- +-/* Maximum length of a token, this is undocumented */ +-#define AFP_TOKEN_MAX_LEN 256 +- +-/* The maximum size of a file for AFP 2 */ +-#define AFP_MAX_AFP2_FILESIZE (4294967296) +- +-/* Unix privs, p.240 */ +- +-struct afp_unixprivs { +- uint32_t uid __attribute__((__packed__)); +- uint32_t gid __attribute__((__packed__)); +- uint32_t permissions __attribute__((__packed__)); +- uint32_t ua_permissions __attribute__((__packed__)); +- +-}; +- +- +-/* AFP Volume attributes bitmap, p.241 */ +- +-enum { +- kReadOnly = 0x01, +- kHasVolumePassword = 0x02, +- kSupportsFileIDs = 0x04, +- kSupportsCatSearch = 0x08, +- kSupportsBlankAccessPrivs = 0x10, +- kSupportsUnixPrivs = 0x20, +- kSupportsUTF8Names = 0x40, +- kNoNetworkUserIDs = 0x80, +- kDefaultPrivsFromParent = 0x100, +- kNoExchangeFiles = 0x200, +- kSupportsExtAttrs = 0x400, +- kSupportsACLs=0x800 +-}; +- +-/* AFP file creation constantes, p.250 */ +-enum { +-kFPSoftCreate = 0, +-kFPHardCreate = 0x80 +-}; +- +-/* AFP Directory attributes, taken from the protocol guide p.236 */ +- +-enum { +- kFPAttributeBit = 0x1, +- kFPParentDirIDBit = 0x2, +- kFPCreateDateBit = 0x4, +- kFPModDateBit = 0x8, +- kFPBackupDateBit = 0x10, +- kFPFinderInfoBit = 0x20, +- kFPLongNameBit = 0x40, +- kFPShortNameBit = 0x80, +- kFPNodeIDBit = 0x100, +- kFPOffspringCountBit = 0x0200, +- kFPOwnerIDBit = 0x0400, +- kFPGroupIDBit = 0x0800, +- kFPAccessRightsBit = 0x1000, +- kFPProDOSInfoBit = 0x2000, // AFP version 2.2 and earlier +- kFPUTF8NameBit = 0x2000, // AFP version 3.0 and later +- kFPUnixPrivsBit = 0x8000 // AFP version 3.0 and later +-}; +- +-/* AFP File bitmap, p.238. These are the ones not in the AFP Directory +- attributes map. */ +- +-enum { +- kFPDataForkLenBit = 0x0200, +- kFPRsrcForkLenBit = 0x0400, +- kFPExtDataForkLenBit = 0x0800, // AFP version 3.0 and later +- kFPLaunchLimitBit = 0x1000, +- kFPExtRsrcForkLenBit = 0x4000, // AFP version 3.0 and later +-}; +- +-/* AFP Extended Attributes Bitmap, p.238 */ +- +-enum { +- kXAttrNoFollow = 0x1, +- kXAttrCreate = 0x2, +- kXAttrREplace=0x4 +-}; +- +- +-/* AFP function codes */ +-enum AFPFunction +-{ +- afpByteRangeLock = 1, afpCloseVol, afpCloseDir, afpCloseFork, +- afpCopyFile, afpCreateDir, afpCreateFile, +- afpDelete, afpEnumerate, afpFlush, afpFlushFork, +- afpGetForkParms = 14, afpGetSrvrInfo, afpGetSrvrParms, +- afpGetVolParms, afpLogin, afpLoginCont, afpLogout, afpMapID, +- afpMapName, afpMoveAndRename, afpOpenVol, afpOpenDir, afpOpenFork, +- afpRead, afpRename, afpSetDirParms, afpSetFileParms, +- afpSetForkParms, afpSetVolParms, afpWrite, afpGetFileDirParms, +- afpSetFileDirParms, afpChangePassword, +- afpGetUserInfo=37,afpGetSrvrMsg = 38, +- afpOpenDT=48, +- afpCloseDT=49, +- afpGetIcon=51, afpGetIconInfo=52, +- afpAddComment=56, afpRemoveComment=57, afpGetComment=58, +- afpByteRangeLockExt=59, afpReadExt, afpWriteExt, +- afpGetAuthMethods=62, +- afp_LoginExt=63, +- afpGetSessionToken=64, +- afpDisconnectOldSession=65, +- afpEnumerateExt=66, +- afpCatSearchExt = 67, +- afpEnumerateExt2 = 68, afpGetExtAttr, afpSetExtAttr, +- afpRemoveExtAttr , afpListExtAttrs, +- afpZzzzz = 122, +- afpAddIcon=192, +-}; +- +-/* AFP Volume bitmap. Take from 242 of the protocol guide. */ +-enum { +- kFPBadVolPre222Bitmap = 0xFe00, +- kFPBadVolBitmap = 0xF000, +- kFPVolAttributeBit = 0x1, +- kFPVolSignatureBit = 0x2, +- kFPVolCreateDateBit = 0x4, +- kFPVolModDateBit = 0x8, +- kFPVolBackupDateBit = 0x10, +- kFPVolIDBit = 0x20, +- kFPVolBytesFreeBit = 0x40, +- kFPVolBytesTotalBit = 0x80, +- kFPVolNameBit = 0x100, +- kFPVolExtBytesFreeBit = 0x200, +- kFPVolExtBytesTotalBit = 0x400, +- kFPVolBlockSizeBit = 0x800 +-}; +- +-/* AFP Attention Codes -- 4 bits */ +-#define AFPATTN_SHUTDOWN (1 << 15) /* shutdown/disconnect */ +-#define AFPATTN_CRASH (1 << 14) /* server crashed */ +-#define AFPATTN_MESG (1 << 13) /* server has message */ +-#define AFPATTN_NORECONNECT (1 << 12) /* don't reconnect */ +-/* server notification */ +-#define AFPATTN_NOTIFY (AFPATTN_MESG | AFPATTN_NORECONNECT) +- +-/* extended bitmap -- 12 bits. volchanged is only useful w/ a server +- * notification, and time is only useful for shutdown. */ +-#define AFPATTN_VOLCHANGED (1 << 0) /* volume has changed */ +-#define AFPATTN_TIME(x) ((x) & 0xfff) /* time in minutes */ +- +-#define kFPNoErr 0 +- +-/* AFP result codes, p252 */ +-#define kASPSessClosed -1072 +-#define kFPAccessDenied -5000 +-#define kFPAuthContinue -5001 +-#define kFPBadUAM -5002 +-#define kFPBadVersNum -5003 +-#define kFPBitmapErr -5004 +-#define kFPCantMove -5005 +-#define kFPDenyConflict -5006 +-#define kFPDirNotEmpty -5007 +-#define kFPDiskFull -5008 +-#define kFPEOFErr -5009 +-#define kFPFileBusy -5010 +-#define kFPFlatVol -5011 +-#define kFPItemNotFound -5012 +-#define kFPLockErr -5013 +-#define kFPMiscErr -5014 +-#define kFPNoMoreLocks -5015 +-#define kFPNoServer -5016 +-#define kFPObjectExists -5017 +-#define kFPObjectNotFound -5018 +-#define kFPParamErr -5019 +-#define kFPRangeNotLocked -5020 +-#define kFPRangeOverlap -5021 +-#define kFPSessClosed -5022 +-#define kFPUserNotAuth -5023 +-#define kFPCallNotSupported -5024 +-#define kFPObjectTypeErr -5025 +-#define kFPTooManyFilesOpen -5026 +-#define kFPServerGoingDown -5027 +-#define kFPCantRename -5028 +-#define kFPDirNotFound -5029 +-#define kFPIconTypeError -5030 +-#define kFPVolLocked -5031 +-#define kFPObjectLocked -5032 +-#define kFPContainsSharedErr -5033 +-#define kFPIDNotFound -5034 +-#define kFPIDExists -5035 +-#define kFPDiffVolErr -5036 +-#define kFPCatalogChanged -5037 +-#define kFPSameObjectErr -5038 +-#define kFPBadIDErr -5039 +-#define kFPPwdSameErr -5040 +-#define kFPPwdTooShortErr -5041 +-#define kFPPwdExpiredErr -5042 +-#define kFPInsideSharedErr -5043 +-#define kFPInsideTrashErr -5044 +-#define kFPPwdNeedsChangeErr -5045 +-#define kFPPwdPolicyErr -5046 +-#define kFPDiskQuotaExceeded –5047 +- +- +- +-/* These flags determine to lock or unlock in ByteRangeLock(Ext) */ +- +-enum { +-ByteRangeLock_Lock = 0, +-ByteRangeLock_Unlock = 1 +-}; +- +-/* These flags are used in volopen and getsrvrparm replies, p.171 */ +- +-#define HasConfigInfo 0x1 +-#define HasPassword 0x80 +- +-/* These are the subfunction for kFPMapID, as per p.248 */ +- +-enum { +-kUserIDToName = 1, +-kGroupIDToName = 2, +-kUserIDToUTF8Name = 3, +-kGroupIDToUTF8Name = 4, +-kUserUUIDToUTF8Name = 5, +-kGroupUUIDToUTF8Name = 6 +-}; +- +- +-/* These are the subfunction flags described in the FPMapName command, p.286. +- Note that this is different than what's described on p. 186. */ +- +-enum { +-kNameToUserID = 1, +-kNameToGroupID = 2, +-kUTF8NameToUserID = 3, +-kUTF8NameToGroupID = 4, +-kUTF8NameToUserUUID = 5, +-kUTF8NameToGroupUUID = 6 +-}; +- +-/* These are bits for FPGetUserInfo, p.173. */ +-#define kFPGetUserInfo_USER_ID 1 +-#define kFPGetUserInfo_PRI_GROUPID 2 +- +-/* Flags for the replies of GetSrvrInfo and DSI GetStatus, p.240 */ +- +-enum { +- kSupportsCopyfile = 0x01, +- kSupportsChgPwd = 0x02, +- kDontAllowSavePwd = 0x04, +- kSupportsSrvrMsg = 0x08, +- kSrvrSig = 0x10, +- kSupportsTCP = 0x20, +- kSupportsSrvrNotify = 0x40, +- kSupportsReconnect = 0x80, +- kSupportsDirServices = 0x100, +- kSupportsUTF8SrvrName = 0x200, +- kSupportsUUIDs = 0x400, +- kSupportsSuperClient = 0x8000 +-}; +- +- +-/* p.247 */ +- +-enum { +- kLoginWithoutID = 0, +- kLoginWithID = 1, +- kReconnWithID = 2, +- kLoginWithTimeAndID = 3, +- kReconnWithTimeAndID = 4, +- kRecon1Login = 5, +- kRecon1ReconnectLogin = 6, +- kRecon1Refresh = 7, kGetKerberosSessionKey = 8 +-}; +- +- +-#define AFP_CHMOD_ALLOWED_BITS_22 \ +- (S_IRUSR |S_IWUSR | S_IRGRP | S_IWGRP |S_IROTH | S_IWOTH | S_IFREG ) +- +- +-#endif +- +- +- +- +diff -Naur afpfs-ng-0.8.1/include/codepage.h afpfs-ng-0.8.1.patch/include/codepage.h +--- afpfs-ng-0.8.1/include/codepage.h 2007-09-23 16:21:30.000000000 +0200 ++++ afpfs-ng-0.8.1.patch/include/codepage.h 1970-01-01 01:00:00.000000000 +0100 +@@ -1,11 +0,0 @@ +-#ifndef __CODE_PAGE_H_ +-#define __CODE_PAGE_H_ +-int convert_utf8dec_to_utf8pre(const char *src, int src_len, +- char * dest, int dest_len); +-int convert_utf8pre_to_utf8dec(const char * src, int src_len, +- char * dest, int dest_len); +-int convert_path_to_unix(char encoding, char * dest, +- char * src, int dest_len); +-int convert_path_to_afp(char encoding, char * dest, +- char * src, int dest_len); +-#endif +diff -Naur afpfs-ng-0.8.1/include/dsi.h afpfs-ng-0.8.1.patch/include/dsi.h +--- afpfs-ng-0.8.1/include/dsi.h 2008-02-18 04:33:24.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/include/dsi.h 1970-01-01 01:00:00.000000000 +0100 +@@ -1,33 +0,0 @@ +- +-#ifndef __DSI_H_ +-#define __DSI_H_ +- +-#include "afp.h" +- +-struct dsi_request +-{ +- unsigned short requestid; +- unsigned char subcommand; +- void * other; +- unsigned char wait; +- pthread_cond_t condition_cond; +- struct dsi_request * next; +- int return_code; +-}; +- +-int dsi_receive(struct afp_server * server, void * data, int size); +-int dsi_getstatus(struct afp_server * server); +- +-int dsi_opensession(struct afp_server *server); +- +-int dsi_send(struct afp_server *server, char * msg, int size,int wait,unsigned char subcommand, void ** other); +-struct dsi_session * dsi_create(struct afp_server *server); +-int dsi_restart(struct afp_server *server); +-int dsi_recv(struct afp_server * server); +- +-#define DSI_BLOCK_TIMEOUT -1 +-#define DSI_DONT_WAIT 0 +-#define DSI_DEFAULT_TIMEOUT 5 +- +- +-#endif +diff -Naur afpfs-ng-0.8.1/include/libafpclient.h afpfs-ng-0.8.1.patch/include/libafpclient.h +--- afpfs-ng-0.8.1/include/libafpclient.h 2008-01-30 05:37:59.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/include/libafpclient.h 1970-01-01 01:00:00.000000000 +0100 +@@ -1,50 +0,0 @@ +- +-#ifndef __CLIENT_H_ +-#define __CLIENT_H_ +- +-#include <unistd.h> +-#include <syslog.h> +- +-#define MAX_CLIENT_RESPONSE 2048 +- +- +-enum loglevels { +- AFPFSD, +-}; +- +-struct afp_server; +-struct afp_volume; +- +-struct libafpclient { +- int (*unmount_volume) (struct afp_volume * volume); +- void (*log_for_client)(void * priv, +- enum loglevels loglevel, int logtype, const char *message); +- void (*forced_ending_hook)(void); +- int (*scan_extra_fds)(int command_fd,fd_set *set, int * max_fd); +- void (*loop_started)(void); +-} ; +- +-extern struct libafpclient * libafpclient; +- +-void libafpclient_register(struct libafpclient * tmpclient); +- +- +-void signal_main_thread(void); +- +-/* These are logging functions */ +- +-#define MAXLOGSIZE 2048 +- +-#define LOG_METHOD_SYSLOG 1 +-#define LOG_METHOD_STDOUT 2 +- +-void set_log_method(int m); +- +- +-void log_for_client(void * priv, +- enum loglevels loglevel, int logtype, char * message,...); +- +-void stdout_log_for_client(void * priv, +- enum loglevels loglevel, int logtype, const char *message); +- +-#endif +diff -Naur afpfs-ng-0.8.1/include/Makefile.am afpfs-ng-0.8.1.patch/include/Makefile.am +--- afpfs-ng-0.8.1/include/Makefile.am 1970-01-01 01:00:00.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/include/Makefile.am 2011-09-10 12:13:50.126124692 +0200 +@@ -0,0 +1,3 @@ ++## Process this file with automake to produce Makefile.in ++ ++SUBDIRS = afpfs-ng +diff -Naur afpfs-ng-0.8.1/include/map_def.h afpfs-ng-0.8.1.patch/include/map_def.h +--- afpfs-ng-0.8.1/include/map_def.h 2008-01-17 05:55:46.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/include/map_def.h 1970-01-01 01:00:00.000000000 +0100 +@@ -1,15 +0,0 @@ +-#ifndef __MAP_H_ +-#define __MAP_H_ +- +-#include "afp.h" +- +-#define AFP_MAPPING_UNKNOWN 0 +-#define AFP_MAPPING_COMMON 1 +-#define AFP_MAPPING_LOGINIDS 2 +-#define AFP_MAPPING_NAME 3 +- +-unsigned int map_string_to_num(char * name); +-char * get_mapping_name(struct afp_volume * volume); +- +- +-#endif +diff -Naur afpfs-ng-0.8.1/include/midlevel.h afpfs-ng-0.8.1.patch/include/midlevel.h +--- afpfs-ng-0.8.1/include/midlevel.h 2007-12-24 20:39:25.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/include/midlevel.h 1970-01-01 01:00:00.000000000 +0100 +@@ -1,64 +0,0 @@ +-#ifndef __MIDLEVEL_H_ +-#define __MIDLEVEL_H_ +- +-#include <utime.h> +-#include "afp.h" +- +-int ml_open(struct afp_volume * volume, const char *path, int flags, +- struct afp_file_info **newfp); +- +-int ml_creat(struct afp_volume * volume, const char *path,mode_t mode); +- +-int ml_readdir(struct afp_volume * volume, +- const char *path, +- struct afp_file_info **base); +- +-int ml_read(struct afp_volume * volume, const char *path, +- char *buf, size_t size, off_t offset, +- struct afp_file_info *fp, int * eof); +- +-int ml_chmod(struct afp_volume * vol, const char * path, mode_t mode); +- +-int ml_unlink(struct afp_volume * vol, const char *path); +- +-int ml_mkdir(struct afp_volume * vol, const char * path, mode_t mode); +- +-int ml_close(struct afp_volume * volume, const char * path, +- struct afp_file_info * fp); +- +-int ml_getattr(struct afp_volume * volume, const char *path, +- struct stat *stbuf); +- +-int ml_write(struct afp_volume * volume, const char * path, +- const char *data, size_t size, off_t offset, +- struct afp_file_info * fp, uid_t uid, +- gid_t gid); +- +-int ml_readlink(struct afp_volume * vol, const char * path, +- char *buf, size_t size); +- +-int ml_rmdir(struct afp_volume * vol, const char *path); +- +-int ml_chown(struct afp_volume * vol, const char * path, +- uid_t uid, gid_t gid); +- +-int ml_truncate(struct afp_volume * vol, const char * path, off_t offset); +- +-int ml_utime(struct afp_volume * vol, const char * path, +- struct utimbuf * timebuf); +- +-int ml_symlink(struct afp_volume *vol, const char * path1, const char * path2); +- +-int ml_rename(struct afp_volume * vol, +- const char * path_from, const char * path_to); +- +-int ml_statfs(struct afp_volume * vol, const char *path, struct statvfs *stat); +- +-void afp_ml_filebase_free(struct afp_file_info **filebase); +- +-int ml_passwd(struct afp_server *server, +- char * username, char * oldpasswd, char * newpasswd); +- +- +- +-#endif +diff -Naur afpfs-ng-0.8.1/include/uams_def.h afpfs-ng-0.8.1.patch/include/uams_def.h +--- afpfs-ng-0.8.1/include/uams_def.h 2007-09-07 15:10:51.000000000 +0200 ++++ afpfs-ng-0.8.1.patch/include/uams_def.h 1970-01-01 01:00:00.000000000 +0100 +@@ -1,16 +0,0 @@ +-#ifndef __UAM_DEFS_H_ +-#define __UAM_DEFS_H_ +- +-#define UAM_NOUSERAUTHENT 0x1 +-#define UAM_CLEARTXTPASSWRD 0x2 +-#define UAM_RANDNUMEXCHANGE 0x4 +-#define UAM_2WAYRANDNUM 0x8 +-#define UAM_DHCAST128 0x10 +-#define UAM_CLIENTKRB 0x20 +-#define UAM_DHX2 0x40 +-#define UAM_RECON1 0x80 +- +-int uam_string_to_bitmap(char * name); +-char * uam_bitmap_to_string(unsigned int bitmap); +- +-#endif +diff -Naur afpfs-ng-0.8.1/include/utils.h afpfs-ng-0.8.1.patch/include/utils.h +--- afpfs-ng-0.8.1/include/utils.h 2008-02-18 04:33:58.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/include/utils.h 1970-01-01 01:00:00.000000000 +0100 +@@ -1,43 +0,0 @@ +-#ifndef __UTILS_H_ +-#define __UTILS_H_ +-#include <stdio.h> +- +-#include "afp.h" +- +-#if BYTE_ORDER == BIG_ENDIAN +-#define hton64(x) (x) +-#define ntoh64(x) (x) +-#else /* BYTE_ORDER == BIG_ENDIAN */ +-#define hton64(x) ((u_int64_t) (htonl(((x) >> 32) & 0xffffffffLL)) | \ +- (u_int64_t) ((htonl(x) & 0xffffffffLL) << 32)) +-#define ntoh64(x) (hton64(x)) +-#endif /* BYTE_ORDER == BIG_ENDIAN */ +- +-#define min(a,b) (((a)<(b)) ? (a) : (b)) +-#define max(a,b) (((a)>(b)) ? (a) : (b)) +- +- +- +-unsigned char unixpath_to_afppath( +- struct afp_server * server, +- char * buf); +- +-unsigned char sizeof_path_header(struct afp_server * server); +- +- +- +-unsigned char copy_from_pascal(char *dest, char *pascal,unsigned int max_len) ; +-unsigned short copy_from_pascal_two(char *dest, char *pascal,unsigned int max_len); +- +-unsigned char copy_to_pascal(char *dest, const char *src); +-unsigned short copy_to_pascal_two(char *dest, const char *src); +- +-void copy_path(struct afp_server * server, char * dest, const char * pathname, unsigned char len); +- +- +-char * create_path(struct afp_server * server, char * pathname, unsigned short * len); +- +- +-int invalid_filename(struct afp_server * server, const char * filename); +- +-#endif +diff -Naur afpfs-ng-0.8.1/lib/afp.c afpfs-ng-0.8.1.patch/lib/afp.c +--- afpfs-ng-0.8.1/lib/afp.c 2008-03-08 03:44:16.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/lib/afp.c 2011-09-10 12:13:50.131124759 +0200 +@@ -9,7 +9,7 @@ + + + +-#include "afp.h" ++#include "afpfs-ng/afp.h" + #include <config.h> + + #include <stdio.h> +@@ -21,17 +21,17 @@ + #include <sys/socket.h> + #include <errno.h> + +-#include "afp_protocol.h" +-#include "libafpclient.h" ++#include "afpfs-ng/afp_protocol.h" ++#include "afpfs-ng/libafpclient.h" + #include "server.h" +-#include "dsi.h" ++#include "afpfs-ng/dsi.h" + #include "dsi_protocol.h" +-#include "utils.h" ++#include "afpfs-ng/utils.h" + #include "afp_replies.h" + #include "afp_internal.h" + #include "did.h" + #include "forklist.h" +-#include "codepage.h" ++#include "afpfs-ng/codepage.h" + + struct afp_versions afp_versions[] = { + { "AFPVersion 1.1", 11 }, +diff -Naur afpfs-ng-0.8.1/lib/afp_internal.h afpfs-ng-0.8.1.patch/lib/afp_internal.h +--- afpfs-ng-0.8.1/lib/afp_internal.h 2007-11-09 05:27:20.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/lib/afp_internal.h 2011-09-10 12:13:50.132124772 +0200 +@@ -1,7 +1,7 @@ + #ifndef _AFP_INTERNAL_H_ + #define _AFP_INTERNAL_H_ + +-#include "afp.h" ++#include "afpfs-ng/afp.h" + + extern struct afp_versions afp_versions[]; + +diff -Naur afpfs-ng-0.8.1/lib/afp_url.c afpfs-ng-0.8.1.patch/lib/afp_url.c +--- afpfs-ng-0.8.1/lib/afp_url.c 2008-03-04 21:16:49.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/lib/afp_url.c 2011-09-10 12:13:50.132124772 +0200 +@@ -3,7 +3,7 @@ + #include <stdio.h> + #include <stdlib.h> + #include <errno.h> +-#include "afp.h" ++#include "afpfs-ng/afp.h" + + void afp_default_url(struct afp_url *url) + { +diff -Naur afpfs-ng-0.8.1/lib/client.c afpfs-ng-0.8.1.patch/lib/client.c +--- afpfs-ng-0.8.1/lib/client.c 2008-02-18 04:36:30.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/lib/client.c 2011-09-10 12:13:50.132124772 +0200 +@@ -1,5 +1,5 @@ +-#include <afp.h> +-#include <libafpclient.h> ++#include <afpfs-ng/afp.h> ++#include <afpfs-ng/libafpclient.h> + + + struct libafpclient * libafpclient = NULL; +diff -Naur afpfs-ng-0.8.1/lib/codepage.c afpfs-ng-0.8.1.patch/lib/codepage.c +--- afpfs-ng-0.8.1/lib/codepage.c 2008-02-18 04:36:54.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/lib/codepage.c 2011-09-10 12:13:50.133124786 +0200 +@@ -14,8 +14,8 @@ + + #include <string.h> + #include <stdlib.h> +-#include "afp_protocol.h" +-#include "utils.h" ++#include "afpfs-ng/afp_protocol.h" ++#include "afpfs-ng/utils.h" + #include "unicode.h" + + int convert_utf8dec_to_utf8pre(const char *src, int src_len, +diff -Naur afpfs-ng-0.8.1/lib/connect.c afpfs-ng-0.8.1.patch/lib/connect.c +--- afpfs-ng-0.8.1/lib/connect.c 2008-02-18 04:38:59.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/lib/connect.c 2011-09-10 12:13:50.133124786 +0200 +@@ -10,13 +10,13 @@ + #include <string.h> + #include <sys/socket.h> + +-#include "afp.h" +-#include "dsi.h" +-#include "utils.h" +-#include "uams_def.h" +-#include "codepage.h" ++#include "afpfs-ng/afp.h" ++#include "afpfs-ng/dsi.h" ++#include "afpfs-ng/utils.h" ++#include "afpfs-ng/uams_def.h" ++#include "afpfs-ng/codepage.h" + #include "users.h" +-#include "libafpclient.h" ++#include "afpfs-ng/libafpclient.h" + #include "server.h" + + +diff -Naur afpfs-ng-0.8.1/lib/did.c afpfs-ng-0.8.1.patch/lib/did.c +--- afpfs-ng-0.8.1/lib/did.c 2008-02-18 04:39:17.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/lib/did.c 2011-09-10 12:13:50.133124786 +0200 +@@ -9,8 +9,8 @@ + #include <string.h> + #include <stdio.h> + +-#include "afp.h" +-#include "afp_protocol.h" ++#include "afpfs-ng/afp.h" ++#include "afpfs-ng/afp_protocol.h" + + #undef DID_CACHE_DISABLE + +diff -Naur afpfs-ng-0.8.1/lib/dsi.c afpfs-ng-0.8.1.patch/lib/dsi.c +--- afpfs-ng-0.8.1/lib/dsi.c 2008-02-18 04:53:03.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/lib/dsi.c 2011-09-10 12:13:50.134124800 +0200 +@@ -19,12 +19,12 @@ + #include <signal.h> + #include <iconv.h> + +-#include "utils.h" +-#include "dsi.h" +-#include "afp.h" +-#include "uams_def.h" ++#include "afpfs-ng/utils.h" ++#include "afpfs-ng/dsi.h" ++#include "afpfs-ng/afp.h" ++#include "afpfs-ng/uams_def.h" + #include "dsi_protocol.h" +-#include "libafpclient.h" ++#include "afpfs-ng/libafpclient.h" + #include "afp_internal.h" + #include "afp_replies.h" + +diff -Naur afpfs-ng-0.8.1/lib/forklist.c afpfs-ng-0.8.1.patch/lib/forklist.c +--- afpfs-ng-0.8.1/lib/forklist.c 2008-01-17 05:49:16.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/lib/forklist.c 2011-09-10 12:13:50.135124814 +0200 +@@ -10,7 +10,7 @@ + */ + + +-#include "afp.h" ++#include "afpfs-ng/afp.h" + + #include <stdlib.h> + #include <pthread.h> +diff -Naur afpfs-ng-0.8.1/lib/log.c afpfs-ng-0.8.1.patch/lib/log.c +--- afpfs-ng-0.8.1/lib/log.c 2008-01-30 05:37:58.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/lib/log.c 2011-09-10 12:13:50.135124814 +0200 +@@ -3,7 +3,7 @@ + #include <stdarg.h> + #include <string.h> + #include <stdlib.h> +-#include "libafpclient.h" ++#include "afpfs-ng/libafpclient.h" + + void log_for_client(void * priv, + enum loglevels loglevel, int logtype, char *format, ...) { +diff -Naur afpfs-ng-0.8.1/lib/loop.c afpfs-ng-0.8.1.patch/lib/loop.c +--- afpfs-ng-0.8.1/lib/loop.c 2008-02-18 04:40:11.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/lib/loop.c 2011-09-10 12:13:50.135124814 +0200 +@@ -16,9 +16,9 @@ + #include <sys/time.h> + #include <signal.h> + +-#include "afp.h" +-#include "dsi.h" +-#include "utils.h" ++#include "afpfs-ng/afp.h" ++#include "afpfs-ng/dsi.h" ++#include "afpfs-ng/utils.h" + + #define SIGNAL_TO_USE SIGUSR2 + +diff -Naur afpfs-ng-0.8.1/lib/lowlevel.c afpfs-ng-0.8.1.patch/lib/lowlevel.c +--- afpfs-ng-0.8.1/lib/lowlevel.c 2008-02-20 02:33:17.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/lib/lowlevel.c 2011-09-10 12:13:50.136124828 +0200 +@@ -19,10 +19,10 @@ + #else + #include <fcntl.h> + #endif +-#include "afp.h" +-#include "afp_protocol.h" +-#include "codepage.h" +-#include "utils.h" ++#include "afpfs-ng/afp.h" ++#include "afpfs-ng/afp_protocol.h" ++#include "afpfs-ng/codepage.h" ++#include "afpfs-ng/utils.h" + #include "did.h" + #include "users.h" + +diff -Naur afpfs-ng-0.8.1/lib/map_def.c afpfs-ng-0.8.1.patch/lib/map_def.c +--- afpfs-ng-0.8.1/lib/map_def.c 2007-09-07 15:10:59.000000000 +0200 ++++ afpfs-ng-0.8.1.patch/lib/map_def.c 2011-09-10 12:13:50.136124828 +0200 +@@ -1,6 +1,6 @@ + #include <string.h> +-#include "afp.h" +-#include "map_def.h" ++#include "afpfs-ng/afp.h" ++#include "afpfs-ng/map_def.h" + + static char *afp_map_strings[] = { + "Unknown", +diff -Naur afpfs-ng-0.8.1/lib/meta.c afpfs-ng-0.8.1.patch/lib/meta.c +--- afpfs-ng-0.8.1/lib/meta.c 2008-01-04 04:52:44.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/lib/meta.c 2011-09-10 12:13:50.137124841 +0200 +@@ -17,10 +17,10 @@ + #include <unistd.h> + #include <sys/time.h> + +-#include "afp.h" +-#include "dsi.h" +-#include "afp_protocol.h" +-#include "utils.h" ++#include "afpfs-ng/afp.h" ++#include "afpfs-ng/dsi.h" ++#include "afpfs-ng/afp_protocol.h" ++#include "afpfs-ng/utils.h" + + + int afp_meta_getattr(const char *path, struct stat *stbuf) +diff -Naur afpfs-ng-0.8.1/lib/midlevel.c afpfs-ng-0.8.1.patch/lib/midlevel.c +--- afpfs-ng-0.8.1/lib/midlevel.c 2008-03-08 17:08:18.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/lib/midlevel.c 2011-09-10 12:13:50.160125150 +0200 +@@ -10,7 +10,7 @@ + */ + + +-#include "afp.h" ++#include "afpfs-ng/afp.h" + + #include <sys/stat.h> + #include <string.h> +@@ -28,9 +28,9 @@ + #include "users.h" + #include "did.h" + #include "resource.h" +-#include "utils.h" +-#include "codepage.h" +-#include "midlevel.h" ++#include "afpfs-ng/utils.h" ++#include "afpfs-ng/codepage.h" ++#include "afpfs-ng/midlevel.h" + #include "afp_internal.h" + #include "forklist.h" + #include "uams.h" +diff -Naur afpfs-ng-0.8.1/lib/proto_attr.c afpfs-ng-0.8.1.patch/lib/proto_attr.c +--- afpfs-ng-0.8.1/lib/proto_attr.c 2008-01-30 05:37:58.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/lib/proto_attr.c 2011-09-10 12:13:50.168125257 +0200 +@@ -7,10 +7,10 @@ + + #include <string.h> + #include <stdlib.h> +-#include "dsi.h" +-#include "afp.h" +-#include "utils.h" +-#include "afp_protocol.h" ++#include "afpfs-ng/dsi.h" ++#include "afpfs-ng/afp.h" ++#include "afpfs-ng/utils.h" ++#include "afpfs-ng/afp_protocol.h" + #include "dsi_protocol.h" + + /* This is a new command, function 76. There are currently no docs, so this +diff -Naur afpfs-ng-0.8.1/lib/proto_desktop.c afpfs-ng-0.8.1.patch/lib/proto_desktop.c +--- afpfs-ng-0.8.1/lib/proto_desktop.c 2008-02-18 04:44:11.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/lib/proto_desktop.c 2011-09-10 12:13:50.168125257 +0200 +@@ -9,10 +9,10 @@ + #include <string.h> + #include <stdlib.h> + +-#include "dsi.h" +-#include "afp.h" +-#include "utils.h" +-#include "afp_protocol.h" ++#include "afpfs-ng/dsi.h" ++#include "afpfs-ng/afp.h" ++#include "afpfs-ng/utils.h" ++#include "afpfs-ng/afp_protocol.h" + #include "dsi_protocol.h" + + /* closedt, addicon, geticoninfo, addappl, removeappl */ +diff -Naur afpfs-ng-0.8.1/lib/proto_directory.c afpfs-ng-0.8.1.patch/lib/proto_directory.c +--- afpfs-ng-0.8.1/lib/proto_directory.c 2008-02-19 03:39:29.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/lib/proto_directory.c 2011-09-10 12:13:50.168125257 +0200 +@@ -9,10 +9,10 @@ + #include <string.h> + #include <stdlib.h> + +-#include "dsi.h" +-#include "afp.h" +-#include "utils.h" +-#include "afp_protocol.h" ++#include "afpfs-ng/dsi.h" ++#include "afpfs-ng/afp.h" ++#include "afpfs-ng/utils.h" ++#include "afpfs-ng/afp_protocol.h" + #include "dsi_protocol.h" + #include "afp_replies.h" + +diff -Naur afpfs-ng-0.8.1/lib/proto_files.c afpfs-ng-0.8.1.patch/lib/proto_files.c +--- afpfs-ng-0.8.1/lib/proto_files.c 2008-02-18 04:46:18.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/lib/proto_files.c 2011-09-10 12:13:50.169125270 +0200 +@@ -8,11 +8,11 @@ + + #include <stdlib.h> + #include <string.h> +-#include "dsi.h" +-#include "afp.h" +-#include "utils.h" ++#include "afpfs-ng/dsi.h" ++#include "afpfs-ng/afp.h" ++#include "afpfs-ng/utils.h" + #include "dsi_protocol.h" +-#include "afp_protocol.h" ++#include "afpfs-ng/afp_protocol.h" + #include "afp_internal.h" + + /* afp_setfileparms, afp_setdirparms and afpsetfiledirparms are all remarkably +diff -Naur afpfs-ng-0.8.1/lib/proto_fork.c afpfs-ng-0.8.1.patch/lib/proto_fork.c +--- afpfs-ng-0.8.1/lib/proto_fork.c 2008-01-30 05:37:58.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/lib/proto_fork.c 2011-09-10 12:13:50.169125270 +0200 +@@ -9,11 +9,11 @@ + #include <stdlib.h> + #include <string.h> + +-#include "dsi.h" +-#include "afp.h" +-#include "utils.h" ++#include "afpfs-ng/dsi.h" ++#include "afpfs-ng/afp.h" ++#include "afpfs-ng/utils.h" + #include "dsi_protocol.h" +-#include "afp_protocol.h" ++#include "afpfs-ng/afp_protocol.h" + + int afp_setforkparms(struct afp_volume * volume, + unsigned short forkid, unsigned short bitmap, unsigned long len) +diff -Naur afpfs-ng-0.8.1/lib/proto_login.c afpfs-ng-0.8.1.patch/lib/proto_login.c +--- afpfs-ng-0.8.1/lib/proto_login.c 2008-01-30 05:37:59.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/lib/proto_login.c 2011-09-10 12:13:50.169125270 +0200 +@@ -10,10 +10,10 @@ + + #include <stdlib.h> + #include <string.h> +-#include "dsi.h" ++#include "afpfs-ng/dsi.h" + #include "dsi_protocol.h" +-#include "afp.h" +-#include "utils.h" ++#include "afpfs-ng/afp.h" ++#include "afpfs-ng/utils.h" + #include "afp_internal.h" + + +diff -Naur afpfs-ng-0.8.1/lib/proto_map.c afpfs-ng-0.8.1.patch/lib/proto_map.c +--- afpfs-ng-0.8.1/lib/proto_map.c 2008-01-30 05:37:59.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/lib/proto_map.c 2011-09-10 12:13:50.170125283 +0200 +@@ -9,11 +9,11 @@ + #include <stdlib.h> + #include <string.h> + +-#include "dsi.h" +-#include "afp.h" +-#include "utils.h" ++#include "afpfs-ng/dsi.h" ++#include "afpfs-ng/afp.h" ++#include "afpfs-ng/utils.h" + #include "dsi_protocol.h" +-#include "afp_protocol.h" ++#include "afpfs-ng/afp_protocol.h" + + /* This is used to pass the return values back from afp_getuserinfo_reply() */ + struct uidgid { +diff -Naur afpfs-ng-0.8.1/lib/proto_replyblock.c afpfs-ng-0.8.1.patch/lib/proto_replyblock.c +--- afpfs-ng-0.8.1/lib/proto_replyblock.c 2008-02-18 04:46:19.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/lib/proto_replyblock.c 2011-09-10 12:13:50.170125283 +0200 +@@ -6,9 +6,9 @@ + */ + + #include <string.h> +-#include "dsi.h" +-#include "afp.h" +-#include "utils.h" ++#include "afpfs-ng/dsi.h" ++#include "afpfs-ng/afp.h" ++#include "afpfs-ng/utils.h" + #include "afp_internal.h" + + +diff -Naur afpfs-ng-0.8.1/lib/proto_server.c afpfs-ng-0.8.1.patch/lib/proto_server.c +--- afpfs-ng-0.8.1/lib/proto_server.c 2008-02-19 02:56:21.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/lib/proto_server.c 2011-09-10 12:13:50.170125283 +0200 +@@ -7,12 +7,12 @@ + */ + #include <stdlib.h> + #include <string.h> +-#include "dsi.h" +-#include "afp.h" +-#include "utils.h" ++#include "afpfs-ng/dsi.h" ++#include "afpfs-ng/afp.h" ++#include "afpfs-ng/utils.h" + #include "dsi_protocol.h" +-#include "afp_protocol.h" +-#include "codepage.h" ++#include "afpfs-ng/afp_protocol.h" ++#include "afpfs-ng/codepage.h" + #include "afp_internal.h" + + int afp_getsrvrparms(struct afp_server *server) +diff -Naur afpfs-ng-0.8.1/lib/proto_session.c afpfs-ng-0.8.1.patch/lib/proto_session.c +--- afpfs-ng-0.8.1/lib/proto_session.c 2008-02-18 04:46:19.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/lib/proto_session.c 2011-09-10 12:13:50.170125283 +0200 +@@ -8,10 +8,10 @@ + */ + #include <stdlib.h> + #include <string.h> +-#include "dsi.h" ++#include "afpfs-ng/dsi.h" + #include "dsi_protocol.h" +-#include "afp.h" +-#include "utils.h" ++#include "afpfs-ng/afp.h" ++#include "afpfs-ng/utils.h" + + int afp_getsessiontoken(struct afp_server * server, int type, + unsigned int timestamp, struct afp_token *outgoing_token, +diff -Naur afpfs-ng-0.8.1/lib/proto_volume.c afpfs-ng-0.8.1.patch/lib/proto_volume.c +--- afpfs-ng-0.8.1/lib/proto_volume.c 2008-02-18 04:47:48.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/lib/proto_volume.c 2011-09-10 12:13:50.171125296 +0200 +@@ -8,13 +8,13 @@ + + #include <string.h> + #include <stdlib.h> +-#include "dsi.h" +-#include "afp.h" +-#include "utils.h" ++#include "afpfs-ng/dsi.h" ++#include "afpfs-ng/afp.h" ++#include "afpfs-ng/utils.h" + #include "dsi_protocol.h" +-#include "afp_protocol.h" ++#include "afpfs-ng/afp_protocol.h" + #include "afp_internal.h" +-#include "codepage.h" ++#include "afpfs-ng/codepage.h" + + static int parse_volbitmap_reply(struct afp_server * server, + struct afp_volume * tmpvol, +diff -Naur afpfs-ng-0.8.1/lib/resource.c afpfs-ng-0.8.1.patch/lib/resource.c +--- afpfs-ng-0.8.1/lib/resource.c 2008-02-18 04:46:56.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/lib/resource.c 2011-09-10 12:13:50.171125296 +0200 +@@ -3,11 +3,11 @@ + #include <string.h> + #include <errno.h> + #include <fcntl.h> +-#include "afp.h" ++#include "afpfs-ng/afp.h" + #include "resource.h" + #include "lowlevel.h" + #include "did.h" +-#include "midlevel.h" ++#include "afpfs-ng/midlevel.h" + + #define appledouble ".AppleDouble" + #define finderinfo_string ".finderinfo" +diff -Naur afpfs-ng-0.8.1/lib/server.c afpfs-ng-0.8.1.patch/lib/server.c +--- afpfs-ng-0.8.1/lib/server.c 2008-02-19 02:56:21.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/lib/server.c 2011-09-10 12:13:50.172125310 +0200 +@@ -8,15 +8,15 @@ + #include <string.h> + #include <time.h> + +-#include "afp.h" +-#include "dsi.h" +-#include "utils.h" +-#include "uams_def.h" +-#include "codepage.h" ++#include "afpfs-ng/afp.h" ++#include "afpfs-ng/dsi.h" ++#include "afpfs-ng/utils.h" ++#include "afpfs-ng/uams_def.h" ++#include "afpfs-ng/codepage.h" + #include "users.h" +-#include "libafpclient.h" ++#include "afpfs-ng/libafpclient.h" + #include "afp_internal.h" +-#include "dsi.h" ++#include "afpfs-ng/dsi.h" + + + struct afp_server * afp_server_complete_connection( +diff -Naur afpfs-ng-0.8.1/lib/status.c afpfs-ng-0.8.1.patch/lib/status.c +--- afpfs-ng-0.8.1/lib/status.c 2008-03-08 17:08:38.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/lib/status.c 2011-09-10 12:13:50.172125310 +0200 +@@ -1,8 +1,8 @@ + #include <string.h> + #include <stdio.h> +-#include "map_def.h" +-#include "dsi.h" +-#include "afp.h" ++#include "afpfs-ng/map_def.h" ++#include "afpfs-ng/dsi.h" ++#include "afpfs-ng/afp.h" + + int afp_status_header(char * text, int * len) + { +diff -Naur afpfs-ng-0.8.1/lib/uams.c afpfs-ng-0.8.1.patch/lib/uams.c +--- afpfs-ng-0.8.1/lib/uams.c 2008-01-04 04:52:44.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/lib/uams.c 2011-09-10 12:13:50.173125324 +0200 +@@ -8,10 +8,10 @@ + + #include <string.h> + #include <stdlib.h> +-#include "dsi.h" +-#include "afp.h" +-#include "utils.h" +-#include "uams_def.h" ++#include "afpfs-ng/dsi.h" ++#include "afpfs-ng/afp.h" ++#include "afpfs-ng/utils.h" ++#include "afpfs-ng/uams_def.h" + #include "config.h" + + #ifdef HAVE_LIBGCRYPT +diff -Naur afpfs-ng-0.8.1/lib/users.c afpfs-ng-0.8.1.patch/lib/users.c +--- afpfs-ng-0.8.1/lib/users.c 2008-02-18 04:48:56.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/lib/users.c 2011-09-10 12:13:50.174125338 +0200 +@@ -3,8 +3,8 @@ + #include <grp.h> + #include <string.h> + +-#include "afp.h" +-#include "map_def.h" ++#include "afpfs-ng/afp.h" ++#include "afpfs-ng/map_def.h" + + /* How mapping works + * +diff -Naur afpfs-ng-0.8.1/lib/utils.c afpfs-ng-0.8.1.patch/lib/utils.c +--- afpfs-ng-0.8.1/lib/utils.c 2008-02-18 04:53:37.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/lib/utils.c 2011-09-10 12:13:50.174125338 +0200 +@@ -8,10 +8,10 @@ + #include <stdio.h> + #include <string.h> + #include <stdlib.h> +-#include "afp.h" +-#include "utils.h" ++#include "afpfs-ng/afp.h" ++#include "afpfs-ng/utils.h" + #include "afp_internal.h" +-#include "afp_protocol.h" ++#include "afpfs-ng/afp_protocol.h" + + struct afp_path_header_long { + unsigned char type; +diff -Naur afpfs-ng-0.8.1/Makefile.am afpfs-ng-0.8.1.patch/Makefile.am +--- afpfs-ng-0.8.1/Makefile.am 2008-02-18 04:24:14.000000000 +0100 ++++ afpfs-ng-0.8.1.patch/Makefile.am 2011-09-10 12:13:50.176125365 +0200 +@@ -1,5 +1,5 @@ + if HAVE_LIBFUSE +-SUBDIRS = lib fuse cmdline docs ++SUBDIRS = lib fuse cmdline include docs + else +-SUBDIRS = lib cmdline docs ++SUBDIRS = lib cmdline include docs + endif diff --git a/community/gendesk/PKGBUILD b/community/gendesk/PKGBUILD new file mode 100644 index 000000000..d5f5589f0 --- /dev/null +++ b/community/gendesk/PKGBUILD @@ -0,0 +1,43 @@ +# $Id: PKGBUILD 68578 2012-03-28 14:04:58Z arodseth $ +# Maintainer: Alexander Rødseth <rodseth@gmail.com> +# Thanks to Moonprincessluna at DeviantArt for the default icon: +# http://mylittlepixel.deviantart.com/gallery/35405924#/d4pt23a + +pkgname=gendesk +pkgver=0.2 +pkgrel=1 +pkgdesc="Utility to generate .desktop files and download icons" +arch=('x86_64' 'i686') +url="http://roboticoverlords.org/gendesk/" +license=('MIT') +depends=('glibc') +makedepends=('go') +conflicts=('go-hg') +source=("http://roboticoverlords.org/$pkgname/$pkgname-$pkgver.tar.gz" + "http://roboticoverlords.org/images/default.png") +sha256sums=('51de3dd28ac38da82ca1db1428aad44348bc2edc491931ed0146044e781ca2e8' + '4d96eded48e536d02e35727c36dc20844c2e44654e81baf78e10aee4eb48e837') +options=(!strip) +if [ "$CARCH" = "x86_64" ]; then + _go=6 +else + _go=8 +fi + +build() { + cd "$srcdir/$pkgname-$pkgver" + + msg2 "Compiling..." + "${_go}g" "$pkgname.go" + "${_go}l" -o "$pkgname" "$pkgname.$_go" +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + + install -Dm755 "$pkgname" "$pkgdir/usr/bin/$pkgname" + install -Dm644 "$srcdir/default.png" "$pkgdir/usr/share/pixmaps/default.png" + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} + +# vim:set ts=2 sw=2 et: diff --git a/community/go/PKGBUILD b/community/go/PKGBUILD index eefe760c7..9294711b8 100644 --- a/community/go/PKGBUILD +++ b/community/go/PKGBUILD @@ -1,13 +1,13 @@ -# $Id: PKGBUILD 63009 2012-01-30 12:36:34Z arodseth $ +# $Id: PKGBUILD 68595 2012-03-29 03:48:22Z vegai $ # Maintainer: Vesa Kaihlavirta <vegai@iki.fi> # Contributor: Andres Perera <andres87p gmail> # Contributor: Matthew Bauer <mjbauer95@gmail.com> # Contributor: Christian Himpel <chressie at gmail dot com> pkgname=go -pkgver=r60.3 -pkgrel=3 -epoch=1 +pkgver=1 +pkgrel=1 +epoch=2 pkgdesc='Google Go compiler and tools (release version)' arch=('i686' 'x86_64') url="http://golang.org/" @@ -48,19 +48,10 @@ build() { mkdir -p "$GOROOT/bin" cd "$GOROOT/src" - hg update release.$pkgver - + hg update release-branch.go$pkgver . ./make.bash } -check() { - export GOROOT="$srcdir/$_hgrepo-build" - export GOOS=linux - export GOBIN="$GOROOT/bin" - cd "$GOROOT/src/pkg" - gomake -k test || true -} - package() { cd "$srcdir/release-build" diff --git a/community/guake/PKGBUILD b/community/guake/PKGBUILD index 1df90ebb5..9bd937c0e 100644 --- a/community/guake/PKGBUILD +++ b/community/guake/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 68271 2012-03-21 05:47:03Z bgyorgy $ +# $Id: PKGBUILD 68559 2012-03-28 06:25:01Z bgyorgy $ # Maintainer: Balló György <ballogyor+arch at gmail dot com> # Contributor: Angel Velasquez <angvp@archlinux.org> # Contributor: Wilson Pinto Júnior (N3RD3X) <n3rd3x@linuxmail.org> pkgname=guake pkgver=0.4.2 -pkgrel=6 +pkgrel=7 pkgdesc='Drop-down terminal for GNOME' arch=('i686' 'x86_64') url="http://guake.org/" @@ -15,18 +15,24 @@ makedepends=('intltool') options=('!libtool') install=$pkgname.install source=(http://guake.org/files/$pkgname-$pkgver.tar.gz - http://guake.org/raw-attachment/ticket/246/0001-Retrieve-port-as-int.2.patch) + http://guake.org/raw-attachment/ticket/246/0001-Retrieve-port-as-int.2.patch + guake-glib2.32.patch) md5sums=('1f0feff3bfc15c998147dbf07d9d8a8e' - '9aca6ba8e46ae1b69958cda0e03320ff') + '9aca6ba8e46ae1b69958cda0e03320ff' + 'ac692391e2fa171f6f96e5ceb2284c2d') build() { cd "$srcdir/$pkgname-$pkgver" sed -i 's|schemadir = $(sysconfdir)/gconf/schemas|schemadir = $(GCONF_SCHEMA_FILE_DIR)|' data/Makefile.in sed -i 's|PYTHON="/usr/bin/python"|PYTHON="/usr/bin/python2"|' src/guake{,-prefs}.in + patch -Np1 -i "$srcdir/guake-glib2.32.patch" # Patch to import proxy port setting as int (http://guake.org/ticket/246) patch -Np1 -i "$srcdir/0001-Retrieve-port-as-int.2.patch" + # Do not disable autostart in GNOME + sed -i '/X-GNOME-Autostart-enabled/ d' data/guake.desktop.in + ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --disable-static --disable-schemas-install \ --with-gconf-schema-file-dir=/usr/share/gconf/schemas \ @@ -38,4 +44,7 @@ package() { cd "$srcdir/$pkgname-$pkgver" make DESTDIR="$pkgdir" install + + # Remove autostart file + rm -r "$pkgdir/etc" } diff --git a/community/guake/guake-glib2.32.patch b/community/guake/guake-glib2.32.patch new file mode 100644 index 000000000..a370e123c --- /dev/null +++ b/community/guake/guake-glib2.32.patch @@ -0,0 +1,21 @@ +commit 0353da88e550031b4694a4168bd6d489f873d68a +Author: max ulidtko <ulidtko@gmail.com> +Date: Fri Mar 2 07:51:38 2012 +0200 + + globalhotkeys build fix for glib 2.31 + + apply patch from #425 + +diff --git a/src/globalhotkeys/keybinder.h b/src/globalhotkeys/keybinder.h +index 00e532d..69a50c0 100644 +--- a/src/globalhotkeys/keybinder.h ++++ b/src/globalhotkeys/keybinder.h +@@ -2,7 +2,7 @@ + #ifndef __KEY_BINDER_H__ + #define __KEY_BINDER_H__ + +-#include <glib/gtypes.h> ++#include <glib.h> + + G_BEGIN_DECLS + diff --git a/community/gummi/PKGBUILD b/community/gummi/PKGBUILD index baca995fc..e0f58ec7c 100644 --- a/community/gummi/PKGBUILD +++ b/community/gummi/PKGBUILD @@ -1,12 +1,11 @@ -# $Id: PKGBUILD 68113 2012-03-18 11:53:48Z arodseth $ - +# $Id: PKGBUILD 68592 2012-03-28 22:12:45Z arodseth $ # Maintainer: Alexander Rødseth <rodseth@gmail.com> # Contributor: Thomas Dziedzic < gostrc at gmail > # Contributor: Sergio A. Morales <sergiomorales@archlinux.cl> # Contributor: soeren <nonick@posteo.de> pkgname=gummi -pkgver=0.6.2 +pkgver=0.6.3 pkgrel=1 pkgdesc='Simple LaTex editor for GTK users' arch=('x86_64' 'i686') @@ -15,8 +14,8 @@ license=('MIT') depends=('texlive-core' 'gtkspell' 'gtksourceview2' 'poppler-glib' 'desktop-file-utils') makedepends=('glib2' 'gtk2' 'pango' 'poppler' 'intltool') install=$pkgname.install -source=("http://dev.midnightcoding.org/attachments/download/258/$pkgname-$pkgver.tar.gz") -sha256sums=('1d886e6036a9a480662f9cf3ae8afa4d1129929c16cb78081755ad1d10be8277') +source=("http://dev.midnightcoding.org/projects/$pkgname/latest.tar.gz") +sha256sums=('d44196e56ed61e125bba01e5949be0928cf09919fdb80e62e6a41999a478f0ed') build() { cd "$pkgname-$pkgver" diff --git a/community/libcec/PKGBUILD b/community/libcec/PKGBUILD new file mode 100644 index 000000000..6a2af7230 --- /dev/null +++ b/community/libcec/PKGBUILD @@ -0,0 +1,30 @@ +# $Id: PKGBUILD 68568 2012-03-28 10:28:32Z idevolder $ +# Maintainer: BlackIkeEagle <ike DOT devolder AT gmail DOT com> +# Contributor: Philippe Cherel <philippe.cherel@mayenne.org> + +pkgname=libcec +pkgver=1.5.2 +pkgrel=1 +pkgdesc="Pulse-Eight's libcec for the Pulse-Eight USB-CEC adapter" +arch=('i686' 'x86_64') +url="https://github.com/Pulse-Eight/libcec" +license=('GPL') +depends=('udev') +source=("$pkgname-$pkgver.tar.gz::https://github.com/Pulse-Eight/libcec/tarball/$pkgname-$pkgver") +_srcfolder=Pulse-Eight-libcec-00a02d1 +sha256sums=('93990024d01da7c66e2c78ca23919fd83137f6b944a2dc82fb5cc6d58a46742f') +options=(!libtool) + +build() { + mv "$_srcfolder" "$pkgname-$pkgver" + + cd "$pkgname-$pkgver" + autoreconf -vif + ./configure --prefix=/usr + make +} + +package() { + cd "$pkgname-$pkgver" + make DESTDIR="$pkgdir" install +} diff --git a/community/libnfs/PKGBUILD b/community/libnfs/PKGBUILD new file mode 100644 index 000000000..eaef7ac71 --- /dev/null +++ b/community/libnfs/PKGBUILD @@ -0,0 +1,30 @@ +# $Id: PKGBUILD 68570 2012-03-28 10:32:51Z idevolder $ +# Maintainer: BlackIkeEagle <ike DOT devolder AT gmail DOT com> + +pkgname=libnfs +pkgver=1.3.0 +pkgrel=1 +pkgdesc="client library for accessing NFS shares" +arch=('i686' 'x86_64') +url="https://github.com/sahlberg/libnfs" +license=('GPL') +depends=('glibc') +source=("$pkgname-$pkgver.tar.gz::https://github.com/sahlberg/libnfs/tarball/$pkgname-$pkgver") +_srcfolder=sahlberg-libnfs-47e5a2c +sha256sums=('0acda3029db699c3978684080843f71d222ad35b30a2ff0d220d144e98854948') +options=(!libtool) + +build() { + mv "$_srcfolder" "$pkgname-$pkgver" + + cd "$pkgname-$pkgver" + + autoreconf -vif + ./configure --prefix=/usr + make +} + +package() { + cd "$pkgname-$pkgver" + make DESTDIR="$pkgdir" install +} diff --git a/community/libshairport/PKGBUILD b/community/libshairport/PKGBUILD new file mode 100644 index 000000000..d6e406c41 --- /dev/null +++ b/community/libshairport/PKGBUILD @@ -0,0 +1,33 @@ +# $Id: PKGBUILD 68571 2012-03-28 10:35:14Z idevolder $ +# Maintainer: BlackIkeEagle <ike DOT devolder AT gmail DOT com> + +pkgname=libshairport +_developer='amejia1' +_version=1.2.1 +_commithash='aeb4987' +pkgver=${_version} +pkgrel=2 +pkgdesc="emulates an AirPort Express" +arch=('i686' 'x86_64') +url='https://github.com/amejia1/libshairport' +license=('GPL') +depends=('openssl' 'libao') +source=("$pkgname-$pkgver.tar.gz::https://github.com/amejia1/libshairport/tarball/$_commithash") +sha256sums=('003c65f56123a7cb090b2d7249f0facbef668f7db6048f4b458713892a6911ca') +options=(!libtool) + +_srcfolder=$_developer-$pkgname-$_commithash + +build() { + mv "$_srcfolder" "$pkgname-$pkgver" + + cd "$pkgname-$pkgver" + autoreconf -vif + ./configure --prefix=/usr + make +} + +package() { + cd "$pkgname-$pkgver" + make DESTDIR="$pkgdir" install +} diff --git a/community/regexxer/PKGBUILD b/community/regexxer/PKGBUILD index 85d87b7a6..c570f654d 100644 --- a/community/regexxer/PKGBUILD +++ b/community/regexxer/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 68478 2012-03-25 19:09:20Z bgyorgy $ +# $Id: PKGBUILD 68556 2012-03-28 05:13:10Z bgyorgy $ # Maintainer: Balló György <ballogyor+arch at gmail dot com> pkgname=regexxer pkgver=0.10 -pkgrel=2 +pkgrel=3 pkgdesc="Interactive search and replace tool for GNOME" arch=('i686' 'x86_64') url="http://regexxer.sourceforge.net/" @@ -11,11 +11,14 @@ license=('GPL') depends=('gtksourceviewmm' 'dconf' 'hicolor-icon-theme' 'xdg-utils') makedepends=('intltool') install=$pkgname.install -source=(http://ftp.gnome.org/pub/GNOME/sources/$pkgname/$pkgver/$pkgname-$pkgver.tar.xz) -sha256sums=('2a7832541a0306b3d4eb63a1cf8978d7bbfc7927e9304473fe801d71fd99736c') +source=(http://ftp.gnome.org/pub/GNOME/sources/$pkgname/$pkgver/$pkgname-$pkgver.tar.xz + regexxer-glib2.32.patch) +sha256sums=('2a7832541a0306b3d4eb63a1cf8978d7bbfc7927e9304473fe801d71fd99736c' + '1addebc552e4374f3f9ee778fb734c08c1ed3a4b2b5e70905f7c9287c9b34882') build() { cd "$srcdir/$pkgname-$pkgver" + patch -Np1 -i "$srcdir/regexxer-glib2.32.patch" sed -i '/GLIB_COMPILE_SCHEMAS/ d' Makefile.in ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ diff --git a/community/regexxer/regexxer-glib2.32.patch b/community/regexxer/regexxer-glib2.32.patch new file mode 100644 index 000000000..7d732b8bb --- /dev/null +++ b/community/regexxer/regexxer-glib2.32.patch @@ -0,0 +1,35 @@ +diff -Naur regexxer-0.10.orig/src/fileshared.h regexxer-0.10/src/fileshared.h +--- regexxer-0.10.orig/src/fileshared.h 2012-03-27 03:59:38.209864722 +0000 ++++ regexxer-0.10/src/fileshared.h 2012-03-27 04:17:47.161371044 +0000 +@@ -23,6 +23,7 @@ + + #include "sharedptr.h" + ++#include <glibmm/regex.h> + #include <gtkmm/textbuffer.h> + #include <functional> + #include <utility> +diff -Naur regexxer-0.10.orig/src/globalstrings.h regexxer-0.10/src/globalstrings.h +--- regexxer-0.10.orig/src/globalstrings.h 2012-03-27 03:59:38.209864722 +0000 ++++ regexxer-0.10/src/globalstrings.h 2012-03-27 04:21:44.906198757 +0000 +@@ -21,7 +21,7 @@ + #ifndef REGEXXER_GLOBALSTRINGS_H_INCLUDED + #define REGEXXER_GLOBALSTRINGS_H_INCLUDED + +-#include <glib/gutils.h> /* for G_DIR_SEPARATOR_S */ ++#include <glib.h> /* for G_DIR_SEPARATOR_S */ + + namespace Regexxer + { +diff -Naur regexxer-0.10.orig/src/translation.h regexxer-0.10/src/translation.h +--- regexxer-0.10.orig/src/translation.h 2012-03-27 03:59:38.206531386 +0000 ++++ regexxer-0.10/src/translation.h 2012-03-27 04:21:39.209576021 +0000 +@@ -21,7 +21,7 @@ + #ifndef REGEXXER_TRANSLATION_H_INCLUDED + #define REGEXXER_TRANSLATION_H_INCLUDED + +-#include <glib/gmacros.h> ++#include <glib.h> + #include <glibmm/ustring.h> + + #ifndef gettext_noop diff --git a/community/root/PKGBUILD b/community/root/PKGBUILD index 0a36eab5d..7fc664154 100644 --- a/community/root/PKGBUILD +++ b/community/root/PKGBUILD @@ -3,7 +3,7 @@ pkgname=root pkgver=5.32.02 -pkgrel=1 +pkgrel=2 pkgdesc='C++ data analysis framework and interpreter from CERN.' arch=('i686' 'x86_64') url='http://root.cern.ch' diff --git a/community/sword/PKGBUILD b/community/sword/PKGBUILD index 70d7a4ca4..8b018f58a 100644 --- a/community/sword/PKGBUILD +++ b/community/sword/PKGBUILD @@ -1,11 +1,13 @@ -# $Id: PKGBUILD 60193 2011-12-07 12:16:33Z arodseth $ +# $Id: PKGBUILD 68590 2012-03-28 20:56:27Z arodseth $ # Maintainer: Alexander Rødseth +# Contributor: Andrea Scarpino # Contributor: Stefan Husmann <stefan-husmann@t-online.de> # Contributor: TripleE <eric1548@yahoo.com> + pkgname=sword pkgver=1.6.2 -pkgrel=6 -pkgdesc="Libraries for Bible programs" +pkgrel=8 +pkgdesc="Library for Bible study programs" arch=('x86_64' 'i686') url="http://www.crosswire.org/sword/" license=('GPL') @@ -13,9 +15,9 @@ depends=('curl' 'clucene' 'swig') makedepends=('cmake') backup=('etc/sword.conf') source=("http://www.crosswire.org/ftpmirror/pub/$pkgname/source/v1.6/$pkgname-$pkgver.tar.gz" - curl.patch) -md5sums=('a7dc4456e20e915fec46d774b690e305' - 'e84a226ce3697af33b9fdd9a22884a2a') + "curl.patch") +sha256sums=('af76c7d54135c444b09eeaafb49229ef5201a4e1d44539d9341dceaeb60a87b9' + '3c2676b6dc1d56b08b2532f46af32c54e91ea71ed92a5d7a30ee29ed7ff09124') build() { cd "$srcdir/$pkgname-$pkgver" @@ -25,11 +27,11 @@ build() { mkdir ../build cd ../build - cmake "../$pkgname-$pkgver" \ + CXXFLAGS=-fpermissive cmake "../$pkgname-$pkgver" \ -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_BUILD_TYPE=Release - - make + -DCMAKE_BUILD_TYPE=Release \ + -DSWORD_GLOBAL_CONF_DIR=/etc + make } package() { @@ -38,20 +40,25 @@ package() { make DESTDIR="$pkgdir" install install -d "$pkgdir/usr/lib/sword" - mv "$pkgdir"/usr/lib/1.6.2_icu_4.8* "$pkgdir/usr/lib/sword/" + mv "$pkgdir"/usr/lib/${pkgver}_icu_* \ + "$pkgdir/usr/lib/sword/" cd "$srcdir/$pkgname-$pkgver/locales.d/" for file in *.conf; do - install -Dm644 "$file" "$pkgdir/usr/share/sword/locales.d/$file" + install -Dm644 "$file" \ + "$pkgdir/usr/share/sword/locales.d/$file" done cd ../include install -d "$pkgdir/usr/include/sword" - install -Dm644 canon_{catholic{,2},synodalp}.h "$pkgdir/usr/include/sword" + install -Dm644 canon_{catholic{,2},synodalp}.h \ + "$pkgdir/usr/include/sword" cd ../samples - install -Dm644 mods.d/globals.conf "$pkgdir/usr/share/sword/mods.d/globals.conf" - install -Dm644 recommended/sword.conf "$pkgdir/etc/sword.conf" + install -Dm644 mods.d/globals.conf \ + "$pkgdir/usr/share/sword/mods.d/globals.conf" + install -Dm644 recommended/sword.conf \ + "$pkgdir/etc/sword.conf" } # vim:set ts=2 sw=2 et: diff --git a/extra/garcon/PKGBUILD b/extra/garcon/PKGBUILD index 564fe802f..37c8faedb 100644 --- a/extra/garcon/PKGBUILD +++ b/extra/garcon/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 150129 2012-02-13 08:08:25Z foutrelis $ +# $Id: PKGBUILD 154452 2012-03-28 18:46:15Z foutrelis $ # Maintainer: Evangelos Foutras <evangelos@foutrelis.com> # Contributor: Xavier Devlamynck <magicrhesus@ouranos.be> pkgname=garcon -pkgver=0.1.10 +pkgver=0.1.11 pkgrel=1 pkgdesc="Implementation of the freedesktop.org menu specification" arch=('i686' 'x86_64') @@ -15,7 +15,7 @@ makedepends=('pkgconfig' 'intltool' 'xfce4-dev-tools') replaces=('libxfce4menu') options=('!libtool' '!makeflags') source=(http://archive.xfce.org/src/xfce/garcon/0.1/garcon-$pkgver.tar.bz2) -sha256sums=('c2497a2991101fc1e621dc712ef72aba7c238f6e5f5a1733c9572f9b23761316') +sha256sums=('272c1207a3449ce969a86ebdc61c6afcad05003f0a986e222bb90c01c1692dfc') build() { cd "$srcdir/garcon-$pkgver" diff --git a/extra/imagemagick/PKGBUILD b/extra/imagemagick/PKGBUILD index 9a8d39550..99c73191a 100644 --- a/extra/imagemagick/PKGBUILD +++ b/extra/imagemagick/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 153440 2012-03-14 01:50:29Z eric $ +# $Id: PKGBUILD 154479 2012-03-29 01:47:21Z eric $ # Maintainer: Eric Bélanger <eric@archlinux.org> pkgbase=imagemagick pkgname=('imagemagick' 'imagemagick-doc') -pkgver=6.7.6.0 +pkgver=6.7.6.2 pkgrel=1 arch=('i686' 'x86_64') url="http://www.imagemagick.org/" @@ -12,7 +12,7 @@ makedepends=('libltdl' 'lcms2' 'libxt' 'fontconfig' 'libxext' 'ghostscript' \ 'openexr' 'libwmf' 'librsvg' 'libxml2' 'jasper') source=(ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-${pkgver%.*}-${pkgver##*.}.tar.xz \ perlmagick.rpath.patch) -sha1sums=('878c264d070c70debc514d7da9f4feb7728bfe9f' +sha1sums=('5411be21304520ae6a24d3f3e6d5c60eabdd57af' '23405f80904b1de94ebd7bd6fe2a332471b8c283') build() { diff --git a/extra/mysql/PKGBUILD b/extra/mysql/PKGBUILD index 21d85faed..0af2c89e7 100644 --- a/extra/mysql/PKGBUILD +++ b/extra/mysql/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 150723 2012-02-21 07:30:13Z andrea $ +# $Id: PKGBUILD 154444 2012-03-28 18:29:19Z andrea $ # Maintainer: # Contributor: Andrea Scarpino <andrea@archlinux.org> # Contributor: Douglas Soares de Andrade <douglas@archlinux.org> pkgbase=mysql pkgname=('libmysqlclient' 'mysql-clients' 'mysql') -pkgver=5.5.21 +pkgver=5.5.22 pkgrel=1 arch=('i686' 'x86_64') license=('GPL') @@ -15,7 +15,7 @@ options=('!libtool') source=("http://ftp.gwdg.de/pub/misc/mysql/Downloads/MySQL-5.5/${pkgbase}-${pkgver}.tar.gz" 'mysqld' 'my.cnf') -md5sums=('86d6bd335054a0aed1756ed60574c16d' +md5sums=('c5b151a70e9ceed5308f108f1ece7b3b' '2234207625baa29b2ff7d7b4f088abce' '1c949c0dbea5206af0db14942d9927b6') diff --git a/extra/pycups/PKGBUILD b/extra/pycups/PKGBUILD index 22f6911f0..3f006e6db 100644 --- a/extra/pycups/PKGBUILD +++ b/extra/pycups/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 140387 2011-10-12 02:51:45Z eric $ +# $Id: PKGBUILD 154446 2012-03-28 18:30:40Z andrea $ # Maintainer: Andrea Scarpino <andrea@archlinux.org> # Contributor: nesl247 <nesl247@gmail.com> pkgname=pycups -pkgver=1.9.60 +pkgver=1.9.61 pkgrel=1 pkgdesc="Python CUPS Bindings" url="http://cyberelk.net/tim/software/pycups/" @@ -11,8 +11,8 @@ arch=('i686' 'x86_64') license=('GPL') depends=('libcups' 'python2') source=(http://cyberelk.net/tim/data/${pkgname}/${pkgname}-${pkgver}.tar.bz2{,.asc}) -md5sums=('083f3dd657df986e712a6fae36427457' - 'cda91ca46362ba3423df2f08c33de5cb') +md5sums=('7464093b349b907dcdefb913674e959b' + 'cb780142a614300792a08d462e198589') build() { cd "${srcdir}/${pkgname}-${pkgver}" diff --git a/extra/python-lxml/PKGBUILD b/extra/python-lxml/PKGBUILD index 4efb0fb00..023c1c0d2 100644 --- a/extra/python-lxml/PKGBUILD +++ b/extra/python-lxml/PKGBUILD @@ -1,17 +1,17 @@ -# $Id: PKGBUILD 153553 2012-03-15 23:11:41Z eric $ -# Maintainer: Andrea Scarpino <andrea@archlinux.org> +# $Id: PKGBUILD 154469 2012-03-28 22:33:23Z eric $ +# Maintainer: pkgname=('python-lxml' 'python2-lxml') -pkgver=2.3.3 -pkgrel=2 +pkgver=2.3.4 +pkgrel=1 pkgdesc="Python binding for the libxml2 and libxslt libraries" arch=('i686' 'x86_64') license=('BSD' 'custom') url="http://lxml.de/" makedepends=('python2' 'python' 'libxslt') source=(http://pypi.python.org/packages/source/l/lxml/lxml-${pkgver}.tar.gz{,.asc}) -md5sums=('a7825793c69d004f388ec6600bad7a6f' - '5c4b1a05f6e46a4dd7ebed8b5ad9e32e') +sha1sums=('90a226d8a2ee38de47fc3351445dab6df0e33a20' + '7962be7794d7f4c87d2fce0104c27990f48f1ce1') check() { cd "${srcdir}"/lxml-$pkgver diff --git a/extra/system-config-printer/PKGBUILD b/extra/system-config-printer/PKGBUILD index 131028cd3..438e17816 100644 --- a/extra/system-config-printer/PKGBUILD +++ b/extra/system-config-printer/PKGBUILD @@ -1,19 +1,19 @@ -# $Id: PKGBUILD 151614 2012-02-28 09:40:16Z andrea $ +# $Id: PKGBUILD 154448 2012-03-28 18:31:41Z andrea $ # Maintainer: Andrea Scarpino <andrea@archlinux.org> pkgbase=system-config-printer pkgname=('system-config-printer-common' 'system-config-printer-gnome') -pkgver=1.3.8 -pkgrel=3 +pkgver=1.3.9 +pkgrel=1 pkgdesc="A CUPS printer configuration tool and status applet" url="http://cyberelk.net/tim/software/system-config-printer/" arch=('i686' 'x86_64') license=('GPL') makedepends=('udev' 'libcups' 'intltool' 'python2' 'xmlto' 'docbook-xsl' 'desktop-file-utils') source=(http://cyberelk.net/tim/data/${pkgbase}/1.3/${pkgbase}-${pkgver}.tar.xz{,.sig}) -md5sums=('ca04568dd7ff1ef7a381ad637d4e915b' - '67c103760f9b4227bc1d99204d8378cd') +md5sums=('df424f127eede63965608e5ec5e27519' + 'd105b7f7725c1ec538b6e6adb10667f3') build() { cd "${srcdir}"/${pkgbase}-${pkgver} diff --git a/extra/thunar-volman/PKGBUILD b/extra/thunar-volman/PKGBUILD index bb5144802..7d95b21f2 100644 --- a/extra/thunar-volman/PKGBUILD +++ b/extra/thunar-volman/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 149177 2012-02-06 06:29:06Z foutrelis $ +# $Id: PKGBUILD 154456 2012-03-28 18:51:17Z foutrelis $ # Maintainer: Evangelos Foutras <evangelos@foutrelis.com> # Contributor: Tobias Kieslich <tobias (at) archlinux.org> pkgname=thunar-volman -pkgver=0.6.0 -pkgrel=3 +pkgver=0.6.1 +pkgrel=1 pkgdesc="Automatic management of removeable devices in Thunar" arch=('i686' 'x86_64') url="http://foo-projects.org/~benny/projects/thunar-volman" @@ -15,12 +15,13 @@ makedepends=('intltool') options=('!libtool') install=$pkgname.install source=(http://archive.xfce.org/src/apps/$pkgname/0.6/$pkgname-$pkgver.tar.bz2) -sha256sums=('b1afd2b3b285cfcf07c11caa3d37fa5ff1fc06f7dc68fcca07f9a0d70daa694f') +sha256sums=('04918a9ccd576e7b19dae37af50ffe6de6f79ed66bf305c26dfe81c1ff652b27') build() { cd "$srcdir/$pkgname-$pkgver" - ./configure --prefix=/usr \ + ./configure \ + --prefix=/usr \ --sysconfdir=/etc \ --libexecdir=/usr/lib/xfce4 \ --localstatedir=/var \ diff --git a/extra/tumbler/PKGBUILD b/extra/tumbler/PKGBUILD index c7f54c6bf..5b088ca76 100644 --- a/extra/tumbler/PKGBUILD +++ b/extra/tumbler/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 148946 2012-02-05 11:57:15Z ibiru $ +# $Id: PKGBUILD 154454 2012-03-28 18:48:51Z foutrelis $ # Maintainer: Evangelos Foutras <evangelos@foutrelis.com> # Contributor: Andreas Radke <andyrtr@archlinux.org> # Contributor: Jan Jezek <honzin.jezek@gmail.com> pkgname=tumbler -pkgver=0.1.23 -pkgrel=4 +pkgver=0.1.24 +pkgrel=1 pkgdesc="D-Bus service for applications to request thumbnails" arch=('i686' 'x86_64') url="http://git.xfce.org/xfce/tumbler/" @@ -22,7 +22,7 @@ optdepends=('ffmpegthumbnailer: for video thumbnails' 'freetype2: for font thumbnails') options=('!libtool') source=(http://archive.xfce.org/src/apps/$pkgname/0.1/$pkgname-$pkgver.tar.bz2) -sha256sums=('b3066d17b7e1fee5135eb876a7c2c50a1221bd0d447c3dd7c36efe6d7f3874cb') +sha256sums=('18fe74900851211cbd10eff4e9e487229284d1701aa60f0c3d35cdd457c72566') build() { cd "$srcdir/$pkgname-$pkgver" diff --git a/extra/xfce4-power-manager/PKGBUILD b/extra/xfce4-power-manager/PKGBUILD index bb2067066..a1ab3f404 100644 --- a/extra/xfce4-power-manager/PKGBUILD +++ b/extra/xfce4-power-manager/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 149179 2012-02-06 06:31:48Z foutrelis $ +# $Id: PKGBUILD 154458 2012-03-28 18:59:06Z foutrelis $ # Maintainer: Evangelos Foutras <evangelos@foutrelis.com> # Contributor: Tobias Kieslich <tobias funnychar archlinux.org> pkgname=xfce4-power-manager -pkgver=1.0.10 -pkgrel=3 +pkgver=1.0.11 +pkgrel=1 pkgdesc="Power manager for Xfce desktop" arch=('i686' 'x86_64') url="http://xfce-goodies.berlios.de/" @@ -15,17 +15,14 @@ depends=('xfce4-panel' 'upower' 'udisks' 'libnotify' 'hicolor-icon-theme' makedepends=('pkgconfig' 'intltool') options=('!libtool') install=$pkgname.install -source=(http://archive.xfce.org/src/apps/$pkgname/1.0/$pkgname-$pkgver.tar.bz2 - xfce4-power-manager-1.0.10-libnotify-0.7.patch) -sha256sums=('80e4bb44f81c485ec09654dde432d6e28667d49a787625632a4413aac30422f0' - '8bebb7830a4a7d9a49f5f06280aaf7bd703aceaecddcd9e2069e7c2c45dbc013') +source=(http://archive.xfce.org/src/apps/$pkgname/1.0/$pkgname-$pkgver.tar.bz2) +sha256sums=('cfa85d839458fa2e9c2ee874d7d64ab00a95d6d51e6acf0ac082ffc700fe4339') build() { cd "$srcdir/$pkgname-$pkgver" - patch -Np1 -i "$srcdir/xfce4-power-manager-1.0.10-libnotify-0.7.patch" - - ./configure --prefix=/usr \ + ./configure \ + --prefix=/usr \ --sysconfdir=/etc \ --libexecdir=/usr/lib \ --localstatedir=/var \ diff --git a/gnome-unstable/empathy/PKGBUILD b/gnome-unstable/empathy/PKGBUILD index b34addb5f..6a1dc5288 100644 --- a/gnome-unstable/empathy/PKGBUILD +++ b/gnome-unstable/empathy/PKGBUILD @@ -1,8 +1,8 @@ -# $Id: PKGBUILD 153907 2012-03-20 12:22:04Z ibiru $ +# $Id: PKGBUILD 154438 2012-03-28 11:34:50Z heftig $ # Maintainer: Ionut Biru <ibiru@archlinux.org> pkgname=empathy -pkgver=3.3.92 +pkgver=3.4.0 pkgrel=1 pkgdesc="A GNOME instant messaging client using the Telepathy framework." arch=('i686' 'x86_64') @@ -19,7 +19,7 @@ options=('!libtool') groups=('gnome-extra') install=empathy.install source=(http://ftp.gnome.org/pub/GNOME/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz) -sha256sums=('d5880cc7bc092ef8b3d6c9eaa903ebdc501326367aee793aca60a8fccea2ed5f') +sha256sums=('dd04344638a5496fd108c4d299a6f6d2272dc521dc353de85f13995f399f8f1a') build() { cd "$pkgname-$pkgver" diff --git a/gnome-unstable/gcr/PKGBUILD b/gnome-unstable/gcr/PKGBUILD index 67d1b118c..73a5b7bab 100644 --- a/gnome-unstable/gcr/PKGBUILD +++ b/gnome-unstable/gcr/PKGBUILD @@ -1,8 +1,8 @@ -# $Id: PKGBUILD 153766 2012-03-19 16:28:49Z ibiru $ +# $Id: PKGBUILD 154422 2012-03-28 10:47:07Z heftig $ # Maintainer: Ionut Biru <ibiru@archlinux.org> pkgname=gcr -pkgver=3.3.92 +pkgver=3.4.0 pkgrel=1 pkgdesc="A library for bits of crypto UI and parsing" arch=(i686 x86_64) @@ -13,7 +13,7 @@ makedepends=('intltool' 'gobject-introspection') options=(!libtool) install=gcr.install source=(http://download.gnome.org/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz) -sha256sums=('06ee57d14a00ffd514f636e91d00a2bb5c8ca9783dda3864ea6e67425bef9465') +sha256sums=('6cb92178a04b5ea335102b43027420c200fe6a053e5e2009ffae91914a268106') build() { cd "$pkgname-$pkgver" diff --git a/gnome-unstable/gnome-dictionary/PKGBUILD b/gnome-unstable/gnome-dictionary/PKGBUILD index a9c988d45..43d707f7b 100644 --- a/gnome-unstable/gnome-dictionary/PKGBUILD +++ b/gnome-unstable/gnome-dictionary/PKGBUILD @@ -1,7 +1,7 @@ -# $Id: PKGBUILD 152932 2012-03-10 17:52:38Z ibiru $ +# $Id: PKGBUILD 154416 2012-03-28 10:37:52Z heftig $ # Maintainer: Ionut Biru <ibiru@archlinux.org> pkgname=gnome-dictionary -pkgver=3.3.2 +pkgver=3.4.0 pkgrel=1 pkgdesc="Look up words in dictionary sources" arch=(i686 x86_64) @@ -12,7 +12,7 @@ makedepends=('intltool' 'gnome-doc-utils') install=$pkgname.install options=(!libtool) source=(http://download.gnome.org/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz) -sha256sums=('4bd6f51a98446f8c8d2bceb19bbb5221bd8b2eb2d75f23d2ad8d1045c0aafa24') +sha256sums=('70a15987617f5ae39f1fc27f7ed0a039193b4704cef7b89ed3aea30ac38f56af') build() { cd "$pkgname-$pkgver" diff --git a/gnome-unstable/gnome-keyring/PKGBUILD b/gnome-unstable/gnome-keyring/PKGBUILD index b3ddfcf0b..45a257fb3 100644 --- a/gnome-unstable/gnome-keyring/PKGBUILD +++ b/gnome-unstable/gnome-keyring/PKGBUILD @@ -1,8 +1,8 @@ -#$Id: PKGBUILD 153803 2012-03-19 18:53:56Z ibiru $ +#$Id: PKGBUILD 154423 2012-03-28 10:48:45Z heftig $ # Maintainer: Jan De Groot <jgc@archlinux.org> pkgname=gnome-keyring -pkgver=3.3.92 +pkgver=3.4.0 pkgrel=1 pkgdesc="GNOME Password Management daemon" arch=(i686 x86_64) @@ -14,7 +14,7 @@ options=('!libtool' '!emptydirs') url="http://www.gnome.org" install=gnome-keyring.install source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz) -sha256sums=('968bb7a099214259b333ed0e9f88960da59228b05e18817b7e679b6a8de48a2e') +sha256sums=('a3ea4ea71cdc5f25a4d72027ea6b775d20d9fead1ac71210d743e4cb2df3c3a2') build() { cd "$pkgname-$pkgver" diff --git a/gnome-unstable/gnome-screenshot/PKGBUILD b/gnome-unstable/gnome-screenshot/PKGBUILD index c5d82ac9e..fa3fcded3 100644 --- a/gnome-unstable/gnome-screenshot/PKGBUILD +++ b/gnome-unstable/gnome-screenshot/PKGBUILD @@ -1,7 +1,8 @@ -# $Id: PKGBUILD 153818 2012-03-19 19:07:07Z ibiru $ +# $Id: PKGBUILD 154440 2012-03-28 11:37:35Z heftig $ # Maintainer: Ionut Biru <ibiru@archlinux.org> + pkgname=gnome-screenshot -pkgver=3.3.92 +pkgver=3.4.0 pkgrel=1 pkgdesc="Take pictures of your screen" arch=(i686 x86_64) @@ -12,7 +13,7 @@ makedepends=('intltool') groups=('gnome-extra') install=$pkgname.install source=(http://download.gnome.org/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz) -sha256sums=('570cd04774c090e867142a59dc1d1e67fad881a90365a671374af1a42c61ffe4') +sha256sums=('0d04ffdc927557745de03aeef84924b43f3469a445e0afc8ef6050834898ad9c') build() { cd "$pkgname-$pkgver" diff --git a/gnome-unstable/gnome-terminal/PKGBUILD b/gnome-unstable/gnome-terminal/PKGBUILD index 7fced1eef..09f09aec5 100644 --- a/gnome-unstable/gnome-terminal/PKGBUILD +++ b/gnome-unstable/gnome-terminal/PKGBUILD @@ -1,8 +1,8 @@ -# $Id: PKGBUILD 152924 2012-03-10 17:13:11Z ibiru $ +# $Id: PKGBUILD 154430 2012-03-28 11:08:49Z heftig $ # Maintainer: Jan de Groot <jgc@archlinux.org> pkgname=gnome-terminal -pkgver=3.3.0 +pkgver=3.4.0.1 pkgrel=1 pkgdesc="The GNOME Terminal Emulator" arch=('i686' 'x86_64') @@ -13,8 +13,8 @@ options=('!emptydirs') url="http://www.gnome.org" groups=('gnome') install=gnome-terminal.install -source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz) -sha256sums=('7b158505dc1c8e03d75fabfae22eaec0404e934af0d0ab1eab202f0f8826befe') +source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver:0:3}/$pkgname-$pkgver.tar.xz) +sha256sums=('1369298498d62993b075dc6d4b9669bbce1acb7ba1f670a0ba39e40a2a25a092') build() { cd "$pkgname-$pkgver" diff --git a/gnome-unstable/gucharmap/PKGBUILD b/gnome-unstable/gucharmap/PKGBUILD index b29e9ea12..0e645ac3c 100644 --- a/gnome-unstable/gucharmap/PKGBUILD +++ b/gnome-unstable/gucharmap/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 152955 2012-03-10 20:02:22Z heftig $ +# $Id: PKGBUILD 154427 2012-03-28 10:55:55Z heftig $ # Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> # Contributor: Jan De Groot <jgc@archlinux.org> pkgname=gucharmap -pkgver=3.3.1 +pkgver=3.4.0.1 pkgrel=1 pkgdesc="Gnome Unicode Charmap" arch=('i686' 'x86_64') @@ -13,8 +13,8 @@ depends=('dconf' 'gtk3' 'hicolor-icon-theme') makedepends=('gtk-doc' 'intltool' 'gobject-introspection') options=('!libtool' '!emptydirs') install=gucharmap.install -source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz) -sha256sums=('ed70de66eb733349807c319240c78397c5f001f5419833208b8b0fbcf3b2d179') +source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver:0:3}/$pkgname-$pkgver.tar.xz) +sha256sums=('eac2f2281cde5118544bc930b9ce90e68302a8c4ea09755f0db3e2e5e022b23c') build() { cd $pkgname-$pkgver diff --git a/gnome-unstable/gucharmap/gucharmap.install b/gnome-unstable/gucharmap/gucharmap.install index 21c219dc7..9a19b56fc 100644 --- a/gnome-unstable/gucharmap/gucharmap.install +++ b/gnome-unstable/gucharmap/gucharmap.install @@ -5,6 +5,7 @@ post_install() { pre_upgrade() { (( $(vercmp $2 3.3) < 0 )) && gconfpkg --uninstall gucharmap + return 0 } post_upgrade() { diff --git a/gnome-unstable/libcroco/PKGBUILD b/gnome-unstable/libcroco/PKGBUILD new file mode 100644 index 000000000..329e5b008 --- /dev/null +++ b/gnome-unstable/libcroco/PKGBUILD @@ -0,0 +1,26 @@ +# $Id: PKGBUILD 154432 2012-03-28 11:15:41Z heftig $ +# Maintainer: Jan de Groot <jgc@archlinux.org> + +pkgname=libcroco +pkgver=0.6.5 +pkgrel=1 +pkgdesc="A CSS parsing library" +arch=('x86_64' 'i686') +depends=('glib2' 'libxml2') +makedepends=('intltool') +license=('LGPL') +options=('!libtool') +source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/0.6/$pkgname-$pkgver.tar.xz) +url="http://www.gnome.org" +sha256sums=('2c6959c3644e889264a61c35ddf17401c86943681d4fe3c1682ecd9acabda7e3') + +build() { + cd $pkgname-$pkgver + ./configure --prefix=/usr --disable-static + make +} + +package() { + cd $pkgname-$pkgver + make DESTDIR="$pkgdir" install +} diff --git a/gnome-unstable/libgnome-keyring/PKGBUILD b/gnome-unstable/libgnome-keyring/PKGBUILD index ee943def0..fb9e18af4 100644 --- a/gnome-unstable/libgnome-keyring/PKGBUILD +++ b/gnome-unstable/libgnome-keyring/PKGBUILD @@ -1,8 +1,8 @@ -#$Id: PKGBUILD 153770 2012-03-19 16:32:46Z ibiru $ +#$Id: PKGBUILD 154421 2012-03-28 10:46:14Z heftig $ #Maintainer: Jan De Groot <jgc@archlinux.org> pkgname=libgnome-keyring -pkgver=3.3.92 +pkgver=3.4.0 pkgrel=1 pkgdesc="GNOME keyring client library" arch=(i686 x86_64) @@ -12,7 +12,7 @@ makedepends=('intltool' 'gobject-introspection') options=('!libtool' '!emptydirs') url="http://www.gnome.org" source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz) -sha256sums=('a7afee6e76318b965b8f105ebe633f5678868d9dbd2d6a8af67e80db0f00b2c9') +sha256sums=('60cc0728fd9c1c10c62b05abec24037ca616931e167b658ed78ec93ede2d3f7a') build() { cd "$pkgname-$pkgver" diff --git a/gnome-unstable/librsvg/PKGBUILD b/gnome-unstable/librsvg/PKGBUILD index 670af223d..24f3cd3a1 100644 --- a/gnome-unstable/librsvg/PKGBUILD +++ b/gnome-unstable/librsvg/PKGBUILD @@ -1,20 +1,20 @@ -# $Id: PKGBUILD 152712 2012-03-09 01:17:54Z heftig $ +# $Id: PKGBUILD 154429 2012-03-28 11:07:58Z heftig $ # Maintainer: Jan de Groot <jgc@archlinux.org> pkgname=librsvg -pkgver=2.35.2 +pkgver=2.36.0 pkgrel=1 pkgdesc="A SVG viewing library" arch=(i686 x86_64) license=('LGPL') depends=('gdk-pixbuf2>=2.24.1-3' 'pango' 'libcroco') -makedepends=('intltool' 'gtk2' 'gtk3') +makedepends=('intltool' 'gtk2' 'gtk3' 'gobject-introspection') optdepends=('gtk3: for rsvg-view-3') options=('!libtool' '!emptydirs') url="http://librsvg.sourceforge.net/" install=librsvg.install source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz) -sha256sums=('84bf2a293d374711654c4472d7e1ca9e152f6b0f0def050c09b77d9d8dd2354c') +sha256sums=('e6475e08c73e92c8bc58824e215551bd64ac5e9a492ff8c520b89c01a7ea510a') build() { cd $pkgname-$pkgver diff --git a/gnome-unstable/mousetweaks/PKGBUILD b/gnome-unstable/mousetweaks/PKGBUILD index 0380f6171..be243fcd6 100644 --- a/gnome-unstable/mousetweaks/PKGBUILD +++ b/gnome-unstable/mousetweaks/PKGBUILD @@ -3,7 +3,7 @@ # Contributor: Jan de Groot <jgc@archlinux.org> pkgname=mousetweaks -pkgver=3.3.90 +pkgver=3.4.0 pkgrel=1 pkgdesc="Mouse accessibility enhancements for the GNOME desktop" arch=(i686 x86_64) @@ -15,12 +15,12 @@ options=('!libtool' '!emptydirs') url="http://www.gnome.org" install=mousetweaks.install source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz) -sha256sums=('671be293d39ce778c366d0ecda3bd8fc6123cb5655d1b2a9b688cc6c1b389706') +sha256sums=('f44711d47fb6fb6286ca46c144bbdc791e39c5062f923b55e9e300844d317144') build() { cd $pkgname-$pkgver ./configure --prefix=/usr --sysconfdir=/etc \ - --localstatedir=/var --disable-scrollkeeper + --localstatedir=/var make } diff --git a/gnome-unstable/pygobject/PKGBUILD b/gnome-unstable/pygobject/PKGBUILD index 90a71d3b3..95a432728 100644 --- a/gnome-unstable/pygobject/PKGBUILD +++ b/gnome-unstable/pygobject/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 154063 2012-03-22 12:52:37Z ibiru $ +# $Id: PKGBUILD 154414 2012-03-28 10:29:14Z heftig $ # Maintainer: Ionut Biru <ibiru@archlinux.org> pkgbase=pygobject pkgname=(python-gobject python2-gobject pygobject-devel) -pkgver=3.1.93 +pkgver=3.2.0 pkgrel=1 arch=('i686' 'x86_64') url="https://live.gnome.org/PyGObject" @@ -11,7 +11,7 @@ license=('LGPL') makedepends=('python' 'python2' 'python-cairo' 'python2-cairo' 'gobject-introspection') source=(http://ftp.gnome.org/pub/gnome/sources/$pkgbase/${pkgver%.*}/$pkgbase-$pkgver.tar.xz) options=('!libtool') -sha256sums=('2090c9a97113829603c94b29753be96c6f1d3a9e3e7a2e43a7ab3256abb6c4a0') +sha256sums=('1a2140c4c4ce0c1a5d7abe74eeb7a7040f426cb17943c3ae7e57695b355151c3') build() { cp -a "$pkgbase-$pkgver" python2-build diff --git a/gnome-unstable/seahorse/PKGBUILD b/gnome-unstable/seahorse/PKGBUILD index d635a777f..7a8c42201 100644 --- a/gnome-unstable/seahorse/PKGBUILD +++ b/gnome-unstable/seahorse/PKGBUILD @@ -1,9 +1,10 @@ -# $Id: PKGBUILD 153824 2012-03-19 19:17:16Z ibiru $ -# Maintainer: Jan de Groot <jgc@archlinux.org> +# $Id: PKGBUILD 154434 2012-03-28 11:19:48Z heftig $ +# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> +# Contributor: Jan de Groot <jgc@archlinux.org> # Contributor: Michel Brabants <michel.linux@tiscali.be> pkgname=seahorse -pkgver=3.3.92 +pkgver=3.4.0 pkgrel=1 pkgdesc="GNOME application for managing PGP keys." arch=(i686 x86_64) @@ -18,7 +19,7 @@ groups=('gnome-extra') install=seahorse.install source=(http://ftp.gnome.org/pub/GNOME/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz seahorse-ssh-askpass.sh) -sha256sums=('3b3e5794ef6a4a68d19db586fae1c6785b1c2ef1d4fd7f038e376190bf2e0230' +sha256sums=('6bb7a7952c3d39a6023ddb493d9e31c4ed99ef3da1062d5dfd4b47d1d4ca2cc9' '400ea9a6084acc93f1dbd4223b95622bbd48071b763063328efba00de378b68c') build() { @@ -26,7 +27,6 @@ build() { ./configure --prefix=/usr --sysconfdir=/etc \ --localstatedir=/var --disable-static \ --enable-ldap --enable-hkp \ - --disable-scrollkeeper \ --disable-schemas-compile make } diff --git a/libre/grub/PKGBUILD b/libre/grub/PKGBUILD index bca7a98e3..91ad4a5cf 100644 --- a/libre/grub/PKGBUILD +++ b/libre/grub/PKGBUILD @@ -1,9 +1,11 @@ -# $Id: PKGBUILD 134896 2011-08-08 17:30:51Z ronald $ +# $Id: PKGBUILD 141999 2011-11-03 21:16:38Z ronald $ # Maintainer: Ronald van Haren <ronald.archlinux.org> +# Maintainer (Parabola): André Silva <andre.paulista@adinet.com.uy> +# Maintainer (Parabola): Jorge López <jorginho@adinet.com.uy> pkgname=grub pkgver=0.97 -pkgrel=20 +pkgrel=21 pkgdesc="A GNU multiboot boot loader (Parabola rebranded)" arch=('i686' 'x86_64') license=('GPL') @@ -11,6 +13,9 @@ url="http://www.gnu.org/software/grub/" groups=('base') depends=('ncurses' 'diffutils' 'sed') optdepends=('xfsprogs: freezing of xfs /boot in install-grub script') +replaces=('grub') +conflicts=('grub') +provides=("grub=$pkgver") source=(ftp://alpha.gnu.org/gnu/grub/grub-$pkgver.tar.gz menu.lst install-grub @@ -25,10 +30,22 @@ source=(ftp://alpha.gnu.org/gnu/grub/grub-$pkgver.tar.gz grub-0.97-ldflags-objcopy-remove-build-id.patch) backup=('boot/grub/menu.lst') install=grub.install +sha1sums=('2580626c4579bd99336d3af4482c346c95dac4fb' + 'e13bf0f91510fd6bb9451e6eb1b2a6e4a03e8b5f' + '3e23bfee50285c8c7b9ef9ec07964310278b1e09' + '157b81dbad3576536b08642242accfa1aeb093a9' + 'adbb4685c98797ffb4dc83561ec75698991dddbd' + 'f2e0dff29a7c8a45e90aa07298a1b2a9a9d29afc' + 'c5e2c94ed0e759590b9eb38c9d979f075d19d7c0' + '45fe668a3779664fb292591f426976b6c784d6c8' + '066d7ab1ae442f88e94c9e4f1867ac6682965d06' + '0436aa6fa0b6f768289172f983a3f4b69384629e' + 'a36f34e51efed540f1ddafd78e9c9f6d83e4c8d4' + '61c4b58d2eaa3c1561d8e9d8fc41341ce8882869') #set destination architecture here -DESTARCH="i686" -#DESTARCH="x86_64" +#DESTARCH="i686" +DESTARCH="x86_64" build() { diff --git a/testing/btrfs-progs/PKGBUILD b/testing/btrfs-progs/PKGBUILD new file mode 100644 index 000000000..626a5739a --- /dev/null +++ b/testing/btrfs-progs/PKGBUILD @@ -0,0 +1,31 @@ +# $Id: PKGBUILD 154467 2012-03-28 21:30:44Z tomegun $ +# Maintainer: Tom Gundersen <teg@jklm.no> +# Contributor: Tobias Powalowski <tpowa@archlinux.org> +pkgname=btrfs-progs +pkgver=0.19.20120328 +pkgrel=1 +pkgdesc="btrfs filesystem utilities" +arch=(i686 x86_64) +depends=('glibc' 'e2fsprogs') +source=(ftp://ftp.archlinux.org/other/$pkgname/$pkgname-$pkgver.tar.xz) +url="http://btrfs.wiki.kernel.org/" +replaces=('btrfs-progs-unstable') +conflicts=('btrfs-progs-unstable') +provides=('btrfs-progs-unstable') +license=('GPL2') + +build() { + cd $srcdir/$pkgname-$pkgver + make CFLAGS="$CFLAGS" +} + +package() { + cd $srcdir/$pkgname-$pkgver + make prefix=$pkgdir/usr install + # fix manpage + mkdir -p $pkgdir/usr/share/ + mv $pkgdir/usr/man $pkgdir/usr/share/man + mkdir -p ${pkgdir}/sbin + ln -sf /usr/bin/btrfs ${pkgdir}/sbin/btrfs +} +md5sums=('f4504e73cf9254779b78d5b2318ac570') diff --git a/testing/clamav/PKGBUILD b/testing/clamav/PKGBUILD new file mode 100644 index 000000000..4646e77a4 --- /dev/null +++ b/testing/clamav/PKGBUILD @@ -0,0 +1,61 @@ +# $Id: PKGBUILD 154473 2012-03-28 23:18:37Z bisson $ +# Contributor: Dale Blount <dale@archlinux.org> +# Contributor: Gregor Ibic <gregor.ibic@intelicom.si> +# Maintainer: Gaetan Bisson <bisson@archlinux.org> + +pkgname=clamav +pkgver=0.97.4 +pkgrel=2 +pkgdesc='Anti-virus toolkit for Unix' +url='http://www.clamav.net/' +license=('GPL') +options=('!libtool') +arch=('i686' 'x86_64') +depends=('bzip2' 'libltdl') +backup=('etc/clamav/clamd.conf' 'etc/clamav/freshclam.conf' 'etc/conf.d/clamav') +source=("http://downloads.sourceforge.net/project/${pkgname}/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz" + 'rc.d' + 'conf.d' + 'logrotate' + 'tmpfiles.d' + 'config.patch') +sha1sums=('56f90cf8a73acba8f97beca86b42c65c3923935d' + 'c9d508c1e5972f0f849d8694c1872455fa9e74de' + 'cb116cdab49a810381a515cbcfb6a6c148547f07' + '7cace58743a36dae3e63e5e0c6cc73ea5ef9a6ee' + 'a224ea9b4d0f4f196827347d54bed51e11c197ea' + '1c8ef193919b041135115170acd6313f008de808') + +install=install + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + + patch -p1 -i ../config.patch + + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc/clamav \ + --with-dbdir=/var/lib/clamav \ + --disable-clamav \ + + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install + + # Make sure conf files get installed, because make install + # doesn't do that if clamav is already installed upon building. + install -D -m644 etc/clamd.conf "${pkgdir}/etc/clamav/clamd.conf" + install -D -m644 etc/freshclam.conf "${pkgdir}/etc/clamav/freshclam.conf" + + install -D -m644 ../tmpfiles.d "${pkgdir}/usr/lib/tmpfiles.d/clamav.conf" + install -D -m644 ../logrotate "${pkgdir}/etc/logrotate.d/clamav" + install -D -m644 ../conf.d "${pkgdir}/etc/conf.d/clamav" + install -D -m755 ../rc.d "${pkgdir}/etc/rc.d/clamav" + + # Un-distribute databases to require freshclam. + rm "${pkgdir}"/var/lib/clamav/*.cvd +} diff --git a/testing/clamav/conf.d b/testing/clamav/conf.d new file mode 100644 index 000000000..9cd44d9f8 --- /dev/null +++ b/testing/clamav/conf.d @@ -0,0 +1,8 @@ +# clamav startup script config options + +# change these to "yes" to start +START_FRESHCLAM="no" +START_CLAMD="no" + +# Options to pass to freshclam (man freshclam for more info). +FRESHCLAM_OPTS="-c 12" diff --git a/testing/clamav/config.patch b/testing/clamav/config.patch new file mode 100644 index 000000000..0640df2c3 --- /dev/null +++ b/testing/clamav/config.patch @@ -0,0 +1,30 @@ +diff -arU 0 old/etc/clamd.conf new/etc/clamd.conf +--- old/etc/clamd.conf 2010-12-02 19:31:21.773357389 +0100 ++++ new/etc/clamd.conf 2010-12-02 19:31:45.873357389 +0100 +@@ -14 +14 @@ +-#LogFile /tmp/clamd.log ++LogFile /var/log/clamav/clamd.log +@@ -34 +34 @@ +-#LogTime yes ++LogTime yes +@@ -61 +61 @@ +-#PidFile /var/run/clamd.pid ++PidFile /run/clamav/clamd.pid +@@ -65 +65 @@ +-#TemporaryDirectory /var/tmp ++TemporaryDirectory /tmp +@@ -80 +80 @@ +-#LocalSocket /tmp/clamd.socket ++LocalSocket /var/lib/clamav/clamd.sock +@@ -190 +190 @@ +-#User clamav ++User clamav +diff -arU 0 old/etc/freshclam.conf new/etc/freshclam.conf +--- old/etc/freshclam.conf 2010-12-02 19:31:21.773357389 +0100 ++++ new/etc/freshclam.conf 2010-12-02 19:31:51.190024057 +0100 +@@ -17 +17 @@ +-#UpdateLogFile /var/log/freshclam.log ++UpdateLogFile /var/log/clamav/freshclam.log +@@ -121 +121 @@ +-#NotifyClamd /path/to/clamd.conf ++NotifyClamd /etc/clamav/clamd.conf diff --git a/testing/clamav/install b/testing/clamav/install new file mode 100644 index 000000000..a2092e815 --- /dev/null +++ b/testing/clamav/install @@ -0,0 +1,14 @@ +post_install() { + getent group clamav &>/dev/null || groupadd -r -g 64 clamav >/dev/null + getent passwd clamav &>/dev/null || useradd -r -u 64 -g clamav -d /dev/null -s /bin/false -c "Clam AntiVirus" clamav >/dev/null + + chown -R clamav:clamav /var/lib/clamav + install -o clamav -g clamav -d /run/clamav + install -o clamav -g clamav -d /var/log/clamav +} + +post_remove() { + getent passwd clamav &>/dev/null && userdel clamav >/dev/null + getent group clamav &>/dev/null && groupdel clamav >/dev/null + return 0 +} diff --git a/testing/clamav/logrotate b/testing/clamav/logrotate new file mode 100644 index 000000000..6a9051bed --- /dev/null +++ b/testing/clamav/logrotate @@ -0,0 +1,8 @@ +/var/log/clamav/clamd.log /var/log/clamav/freshclam.log { + create 644 clamav clamav + sharedscripts + postrotate + /bin/kill -HUP `cat /run/clamav/clamd.pid 2>/dev/null` 2> /dev/null || true + /bin/kill -HUP `cat /run/clamav/freshclam.pid 2>/dev/null` 2> /dev/null || true + endscript +} diff --git a/testing/clamav/rc.d b/testing/clamav/rc.d new file mode 100644 index 000000000..127c86c0f --- /dev/null +++ b/testing/clamav/rc.d @@ -0,0 +1,66 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +[[ -f /etc/conf.d/clamav ]] && source /etc/conf.d/clamav + +PID_FC=$(pidof -o %PPID /usr/bin/freshclam) +PID_CD=$(pidof -o %PPID /usr/sbin/clamd) + +case "$1" in + start) + if [[ $START_CLAMD = yes ]]; then + stat_busy "Starting ClamD" + [[ -z $PID_CD ]] && /usr/sbin/clamd + if [[ $? -gt 0 ]]; then + stat_fail + else + add_daemon clamav + stat_done + fi + fi + sleep 1 + if [[ $START_FRESHCLAM = yes ]]; then + stat_busy "Starting FreshClam" + [[ -z $PID_FC ]] && /usr/bin/freshclam -p /run/clamav/freshclam.pid -d $FRESHCLAM_OPTS + if [[ $? -gt 0 ]]; then + stat_fail + else + add_daemon clamav + stat_done + fi + fi + ;; + stop) + if [[ $START_CLAMD = yes ]]; then + stat_busy "Stopping ClamD" + [[ -n $PID_CD ]] && kill $PID_CD &> /dev/null + if [[ $? -gt 0 ]]; then + stat_fail + else + rm_daemon clamav + stat_done + fi + fi + + if [[ $START_FRESHCLAM = yes ]]; then + stat_busy "Stopping FreshClam" + [[ -n $PID_FC ]] && kill $PID_FC &> /dev/null + if [[ $? -gt 0 ]]; then + stat_fail + else + rm_daemon clamav + stat_done + fi + fi + ;; + restart) + $0 stop + sleep 2 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac +exit 0 diff --git a/testing/clamav/tmpfiles.d b/testing/clamav/tmpfiles.d new file mode 100644 index 000000000..22d29941e --- /dev/null +++ b/testing/clamav/tmpfiles.d @@ -0,0 +1 @@ +d /run/clamav 0755 clamav clamav diff --git a/testing/gcc/PKGBUILD b/testing/gcc/PKGBUILD index ed483a36e..af3f298f8 100644 --- a/testing/gcc/PKGBUILD +++ b/testing/gcc/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 154287 2012-03-25 10:43:43Z allan $ +# $Id: PKGBUILD 154483 2012-03-29 03:43:53Z allan $ # Maintainer: Allan McRae <allan@archlinux.org> # toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc @@ -6,8 +6,8 @@ pkgname=('gcc' 'gcc-libs' 'gcc-fortran' 'gcc-objc' 'gcc-ada' 'gcc-go') pkgver=4.7.0 -pkgrel=2 -#_snapshot=4.6-20120120 +pkgrel=3 +_snapshot=4.7-20120324 _libstdcppmanver=20120307 # Note: check source directory name when updating this pkgdesc="The GNU Compiler Collection" arch=('i686' 'x86_64') @@ -16,12 +16,12 @@ url="http://gcc.gnu.org" makedepends=('binutils>=2.22' 'libmpc' 'cloog' 'ppl' 'gcc-ada') checkdepends=('dejagnu') options=('!libtool' '!emptydirs') -source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.bz2 - #ftp://gcc.gnu.org/pub/gcc/snapshots/${_snapshot}/gcc-${_snapshot}.tar.bz2 +source=(#ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.bz2 + ftp://gcc.gnu.org/pub/gcc/snapshots/${_snapshot}/gcc-${_snapshot}.tar.bz2 ftp://gcc.gnu.org/pub/gcc/libstdc++/doxygen/libstdc++-api.${_libstdcppmanver}.man.tar.bz2 gcc_pure64.patch gcc-4.7.0-cloog-0.17.patch) -md5sums=('2a0f1d99fda235c29d40b561f81d9a77' +md5sums=('947f9a70dcbb4baaf20b1e95b518048e' '489d2f5311535800a120efd8d18db719' 'ced48436c1b3c981d721a829f1094de1' '575f7d17b022e609447a590e481b18b5') diff --git a/~mtjm/python-getmediumurl/PKGBUILD b/~mtjm/python-getmediumurl/PKGBUILD index bacc1c0f1..172f6dcd9 100644 --- a/~mtjm/python-getmediumurl/PKGBUILD +++ b/~mtjm/python-getmediumurl/PKGBUILD @@ -3,12 +3,12 @@ _pkgname=GetMediumURL pkgname=python-getmediumurl pkgver=0.0a5 -pkgrel=1 +pkgrel=2 pkgdesc="A package for getting URLs of media files from some websites" arch=("any") url="http://savannah.nongnu.org/projects/getmediumurl/" license=('AGPL') -depends=('python' 'python3-lxml' 'python-urlreader' 'python-distribute') +depends=('python' 'python-lxml' 'python-urlreader' 'python-distribute') checkdepends=('python2') # due to my laziness options=(!emptydirs) source=("http://download.savannah.gnu.org/releases/getmediumurl/${_pkgname}-${pkgver}.tar.gz") |