simonvetter / afpfs-ng Goto Github PK
View Code? Open in Web Editor NEWafpfs-ng/libafpclient is an open source client for the Apple Filing Protocol
License: GNU General Public License v2.0
afpfs-ng/libafpclient is an open source client for the Apple Filing Protocol
License: GNU General Public License v2.0
Hello,
I am currently working on making a Formula for afpfs-ng
on Homebrew.
You can follow my thread on the subject here.
And regarding the last comment, I asked myself if you thought about contacting the original author and maybe discuss passing on maintainership if he does not want to maintain it anymore so that your fork becomes the official one.
I could release my Formula unofficially but this would be a shame since afpfs-ng
is quite relevant for Apple users and deserves to be maintained.
mig
I have no idea what this is a reply to, id 1758.
==16227== Thread 2:
==16227== Syscall param read(buf) points to unaddressable byte(s)
==16227== at 0x52A2D2D: ??? (syscall-template.S:82)
==16227== by 0x507E5B1: dsi_recv (unistd.h:45)
==16227== by 0x5081C27: afp_main_loop (loop.c:142)
==16227== by 0x5081CDD: afp_main_quick_startup_thread (loop.c:173)
==16227== by 0x529BE99: start_thread (pthread_create.c:308)
==16227== Address 0x62a1ec0 is 0 bytes after a block of size 4,096 alloc'd
==16227== at 0x4C2B3F8: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==16227== by 0x507C206: afp_server_init (afp.c:388)
==16227== by 0x50813D1: afp_server_full_connect (connect.c:101)
==16227== by 0x4029E0: server_subconnect (cmdline_afp.c:235)
==16227== by 0x403E2B: cmdline_server_startup (cmdline_afp.c:1155)
==16227== by 0x404EC1: cmdline_afp_setup (cmdline_afp.c:1243)
==16227== by 0x4024BE: main (cmdline_main.c:420)
==16227==
I have no idea what this is a reply to, id 1758.
I have no idea what this is a reply to, id 1758.
The rest of the errors are presumably consequential of the heap being corrupted, but for completeness:
==16227== Thread 1:
==16227== Invalid read of size 8
==16227== at 0x5088FD1: ll_handle_unlocking (lowlevel.c:48)
==16227== by 0x508960A: ll_read (lowlevel.c:361)
==16227== by 0x5082659: ml_read (midlevel.c:412)
==16227== by 0x402E61: retrieve_file (cmdline_afp.c:578)
==16227== by 0x403087: com_get_file (cmdline_afp.c:649)
==16227== by 0x403D47: com_get (cmdline_afp.c:672)
==16227== by 0x40530F: cmdline_ui (cmdline_main.c:307)
==16227== by 0x4024D4: main (cmdline_main.c:424)
==16227== Address 0xa86f508d5e6ae491 is not stack'd, malloc'd or (recently) free'd
etc etc
==16227== Thread 2:
==16227== Invalid free() / delete / delete[] / realloc()
==16227== at 0x4C2A739: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==16227== by 0x561516B: _nl_archive_subfreeres (in /lib/x86_64-linux-gnu/libc-2.15.so)
==16227== by 0x5614E9A: free_mem (in /lib/x86_64-linux-gnu/libc-2.15.so)
==16227== by 0x56156B1: __libc_freeres (in /lib/x86_64-linux-gnu/libc-2.15.so)
==16227== by 0x4A2569C: _vgnU_freeres (in /usr/lib/valgrind/vgpreload_core-amd64-linux.so)
==16227== by 0x6298D1F: ???
==16227== by 0xE2E422E: ???
==16227== by 0x6298E1F: ???
==16227== by 0x7: ???
I pulled the CVS repo from SF.net and filtered / imported it through SVN to GIT. It'd be nice to get that more-detailed history included in this repo (for git blame
change annotation), but I don't see any way to make that happen short of a force-push.
Would you consider going through the same process to pull history and doing the force-push on your tree? You can see the end-result on 007/afpfs-ng but there's apparently no common base to let me send a PR.
This process worked for me on Ubuntu 14.04. I had to install cvs2svn
, subversion
and git-svn
, and I don't remember if I needed other dependencies.
#!/bin/bash
# use a hard-root path to make file:// git-svn path look a little better
WORKDIR=/afpfs-ng.cvs.sourceforge.net
# might need to be sudo, or might need to create ahead of time
mkdir -p ${WORKDIR}
cd ${WORKDIR}
echo "Extracting CVS"
rsync -aP rsync://afpfs-ng.cvs.sourceforge.net/cvsroot/afpfs-ng/ cvs-version/
echo "Creating SVN dump"
cvs2svn --fallback-encoding latin1 --dumpfile afp.svn.dump cvs-version/afpfs-ng/
echo "Loading SVN dump"
svnadmin create svn-version
svnadmin load svn-version < afp.svn.dump
echo "Creating GIT clone"
cat > authors.txt << EOF
alexthepuffin = Alex deVries <[email protected]>
demon = Derrik Pates <[email protected]>
mulbrich = Michael Ulbrich <[email protected]>
(no author) = Alex deVries <[email protected]>
EOF
git svn clone file://${WORKDIR}/svn-version git-version –no-metadata -A authors.txt -t tags -b branches -T trunk
echo "working directory is ${WORKDIR}/git-version"
cd ${WORKDIR}/git-version
echo "Promoting trunk/afpfs-ng to true-root"
git filter-branch --subdirectory-filter afpfs-ng -- --all
echo "Getting new changes"
git remote add simonvetter https://github.com/simonvetter/afpfs-ng
git fetch simonvetter
echo "Pulling remote commits"
# these say "use the CP version of any/all diffs and overwrite mine"
git cherry-pick -m0 --strategy=recursive -Xtheirs 5a5eae2bdc859889911e0740be0b74e744dc0642
git cherry-pick -m0 --strategy=recursive -Xtheirs 93d871128cbbde25c49c6dfcf9d8d610130aea9d
git cherry-pick -m0 --strategy=recursive -Xtheirs ec7b7475abfcbdae49e244f6afee37c49326dbf0
git cherry-pick -m0 --strategy=recursive -Xtheirs 2017974c85cc11267bf8272ed08f39df9b8db11b
git cherry-pick -m0 --strategy=recursive -Xtheirs 2f232087da6d513b6f8fcb42a1436ce917e5a613
git cherry-pick -m0 --strategy=recursive -Xtheirs fac89c1978ca8963147c4384581dcc3fdccfedbd
git cherry-pick -m0 --strategy=recursive -Xtheirs 24e186b6867096701fb8319064563f2d8498cf6e
git cherry-pick -m0 --strategy=recursive -Xtheirs d5b75bafe5a6a95a0a546a69b1219edebfaa748c
git cherry-pick -m0 --strategy=recursive -Xtheirs b8862f904da166b7e4f60c329d165415a9c19e96
git cherry-pick -m0 --strategy=recursive -Xtheirs 6d53fbd677272040c14b978614fe28ba617c2b58
git cherry-pick -m0 --strategy=recursive -Xtheirs e107bd4939d9332e5eb70ab0c09479b7a87d18e2
echo "Pulling merges"
git cherry-pick -m1 --strategy=recursive -Xtheirs 1a766be39e9f4850c56220d2b18faf506c8baae1
git cherry-pick -m1 --strategy=recursive -Xtheirs f6e24eb73c9283732c3b5d9cb101a1e2e4fade3e
echo "Packing everything like a boss"
git repack -a -d -f --depth=1000 --window=500
There are exactly 500 commits that end up in SVN, so this whole process takes about 2 minutes end-to-end.
I have the problem with complete post.
https://unix.stackexchange.com/questions/364330/afp-client-afpfs-ng-ls-reading-directory-input-output-error-centos-7-ma
The installation process:
$ sudo yum install fuse fuse-devel readline-devel libgcrypt-devel gmp-devel
$ wget https://raw.githubusercontent.com/simonvetter/afpfs-ng/master/afpfs-ng-0.8.2.tar.gz
$ tar -xvf afpfs-ng-0.8.2.tar.gz
$ cd afpfs-ng/
$ ./configure && make && sudo make install && sudo ldconfig
Testing with mount_afp and ls
# mount_afp afp://theUser:[email protected]/ADATAHD /media/AFP_ADATAHD
The afpfs daemon does not appear to be running for uid 0, let me start it for you
Mounting 192.168.0.14 from ADATAHD on /media/AFP_ADATAHD
Mounting of volume ADATAHD of server theUser MacBook succeeded.
# ls -al /media/AFP_ADATAHD/SoftwareDownloads/WIN/
ls: reading directory /media/AFP_ADATAHD/SoftwareDownloads/WIN/: Input/output error
total 213
drwx------ 28 root root 908 May 10 09:21 .
drwxr-xr-x 9 root root 262 May 10 09:20 ..
drwxr-xr-x 3 root root 58 Apr 24 17:15 7ULive
-rw-r--r-- 1 root root 1735400 Apr 24 09:52 adksetup.exe
-rwx------ 1 root root 94 May 10 09:21 .directory
-rwx------ 1 root root 10244 May 10 09:20 .DS_Store
LISTING AFP DIRECTORY ON MACOS SIDE!
# ls -al /Volumes/ADATAHD/SoftwareDownloads/WIN/
total 8756680
drwx------ 28 _unknown _unknown 952 May 10 14:21 .
drwxr-xr-x 9 _unknown _unknown 306 May 10 14:20 ..
-rwx------@ 1 _unknown _unknown 10244 May 10 14:20 .DS_Store
-rwx------ 1 _unknown _unknown 94 May 10 14:21 .directory
drwxr-xr-x 3 _unknown _unknown 102 Apr 24 22:15 7ULive
-rwx------ 1 _unknown _unknown 20903280 Sep 2 2016 BCompare-4.1.8.21575.exe
-rw-r--r--@ 1 _unknown _unknown 28268 Mar 19 22:13 C9E72A428218A05F34C66182511C5C48EA015FD0.torrent
-rwx------@ 1 _unknown _unknown 9367104 Oct 2 2016 ConnectToWindowsFromMAC - RDC_2.1.1_ALL.dmg
drwxrwxrwx 3 _unknown _unknown 102 Mar 29 07:32 Development
drwxrwxrwx 7 _unknown _unknown 238 Apr 30 21:18 GRTMPVOL_ES_ISO
drwx------ 8 _unknown _unknown 272 Sep 3 2016 KMSpico 10.2.0 FINAL
drwxrwxrwx 4 _unknown _unknown 136 Apr 25 19:09 Microsoft Office 2016 VL ProPlus Spanish (x86-x64) March 2016
drwxr-xr-x 7 _unknown _unknown 238 Mar 20 17:10 Nitro 11.0.3.17
drwx------ 8 _unknown _unknown 272 Oct 5 2016 Nitro Pro 10.5.9.9 ES
drwx------ 13 _unknown _unknown 442 Mar 26 21:14 Office 2016
-rwx------@ 1 _unknown _unknown 53118336 Aug 31 2016 Open-Sankore_Windows_2.5.1.zip
-rwx------ 1 _unknown _unknown 11304960 Sep 10 2016 SmartView.msi
drwxr-xr-x 4 _unknown _unknown 136 May 1 13:12 WIN XP SP3
-rw-r--r-- 1 _unknown _unknown 3170525184 Apr 30 00:20 WINVISTA SP2 32 Bit.www.auyanet.net.iso
drwx------ 19 _unknown _unknown 646 Mar 29 11:53 Windows 10 Enterprise
drwx------ 21 _unknown _unknown 714 Apr 24 00:04 Windows Programas
-rw-r--r-- 1 _unknown _unknown 569790128 Apr 30 21:47 Windows XP SP3 Original.rar
-rw-r--r-- 1 _unknown _unknown 1735400 Apr 24 14:52 adksetup.exe
-rw-r--r-- 1 _unknown _unknown 26 Apr 24 14:52 adksetup.exe:Zone.Identifier
-rwx------@ 1 _unknown _unknown 77404656 Sep 6 2016 gimp-2.8.18-setup.exe
-rwx------@ 1 _unknown _unknown 203084344 Oct 4 2016 jdk-8u101-windows-x64.exe
-rwx------@ 1 _unknown _unknown 230883184 Oct 4 2016 netbeans-8.2-windows.exe
-rw-r--r--@ 1 _unknown _unknown 135240048 Apr 24 00:25 serviio-1.8-win-setup.exe
Testing with Samba
$ sudo mkdir /media/SMB_ADATAHD
$ sudo mount.cifs //192.168.0.14/ADATAHD /media/SMB_ADATAHD -o username=theUser,password=thePassword,domain=BZ,rw
# ls -al /media/SMB_ADATAHD/SoftwareDownloads/WIN/
total 4378504
drwx------ 29 nobody nobody 0 May 10 23:58 .
drwxr-xr-x 9 nobody nobody 0 May 10 14:20 ..
drwxr-xr-x 3 nobody nobody 0 Apr 24 22:15 7ULive
-rw-r--r-- 1 nobody nobody 1735400 Apr 24 14:52 adksetup.exe
-rw-r--r-- 1 nobody nobody 26 Apr 24 14:52 adksetup.exe:Zone.Identifier
-rwx------ 1 nobody nobody 20903280 Sep 2 2016 BCompare-4.1.8.21575.exe
-rw-r--r-- 1 nobody nobody 28268 Mar 19 22:13 C9E72A428218A05F34C66182511C5C48EA015FD0.torrent
-rwx------ 1 nobody nobody 9367104 Oct 2 2016 ConnectToWindowsFromMAC - RDC_2.1.1_ALL.dmg
drwxrwxrwx 3 nobody nobody 0 Mar 29 07:32 Development
-rwx------ 1 nobody nobody 94 May 10 14:21 .directory
-rwx------ 1 nobody nobody 10244 May 10 14:20 .DS_Store
-rwx------ 1 nobody nobody 77404656 Sep 6 2016 gimp-2.8.18-setup.exe
drwxrwxrwx 7 nobody nobody 0 Apr 30 21:18 GRTMPVOL_ES_ISO
-rwx------ 1 nobody nobody 203084344 Oct 4 2016 jdk-8u101-windows-x64.exe
drwx------ 8 nobody nobody 0 Sep 3 2016 KMSpico 10.2.0 FINAL
drwxrwxrwx 4 nobody nobody 0 Apr 25 19:09 Microsoft Office 2016 VL ProPlus Spanish (x86-x64) March 2016
-rwx------ 1 nobody nobody 230883184 Oct 4 2016 netbeans-8.2-windows.exe
drwxr-xr-x 7 nobody nobody 0 Mar 20 17:10 Nitro 11.0.3.17
drwx------ 8 nobody nobody 0 Oct 5 2016 Nitro Pro 10.5.9.9 ES
drwx------ 13 nobody nobody 0 Mar 26 21:14 Office 2016
-rwx------ 1 nobody nobody 53118336 Aug 31 2016 Open-Sankore_Windows_2.5.1.zip
-rw-r--r-- 1 nobody nobody 135240048 Apr 24 00:25 serviio-1.8-win-setup.exe
-rwx------ 1 nobody nobody 11304960 Sep 10 2016 SmartView.msi
-rw-r--r-- 1 nobody nobody 165754 May 11 07:43 testdisk.log
drwx------ 19 nobody nobody 0 Mar 29 11:53 Windows 10 Enterprise
drwx------ 21 nobody nobody 0 Apr 24 00:04 Windows Programas
-rw-r--r-- 1 nobody nobody 569790128 Apr 30 21:47 Windows XP SP3 Original.rar
-rw-r--r-- 1 nobody nobody 3170525184 Apr 30 00:20 WINVISTA SP2 32 Bit.www.auyanet.net.iso
drwxr-xr-x 4 nobody nobody 0 May 1 13:12 WIN XP SP3
Hi,
I have a problem probably related to my new experience in compiling source code to create a commands. When I run this command:afp_client mount -u main -p "mypassw" "severip":G_timemachine /media/folder
I get this response:
Could not pick a matching UAM
To be honest I don't even know what UAM means
Best Regards,
gugeswe
I am using the debian folder set noted here. This is mirrored from debian/ set from the Kodi PPA (stable). My directory does include a patch, although it is trivial to change if this is indeed the issue.
make[3]: *** No rule to make target 'identify.c', needed by 'libafpclient_la-identify.lo'. Stop.
make[3]: Leaving directory '/home/desktop/build-afpfs-ng-temp/afpfs-ng/lib'
Makefile:383: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/desktop/build-afpfs-ng-temp/afpfs-ng'
Makefile:314: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/desktop/build-afpfs-ng-temp/afpfs-ng'
dh_auto_build: make -j1 returned exit code 2
debian/rules:4: recipe for target 'build' failed
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
Removing identify.c from Makefile.am will build the the package. Is this incorrect? If identify.c should be there, can you please add it? I could manually add it from the old boxee patch, but I don't want to if it does not belong.
cmdline_afp.c
1094 snprintf(curdir,AFP_MAX_PATH,"%s",total_path);
1095 com_get_file(p->name,1, &amount_written);
com_get_file gets the filename, but it reparses it as if it's user input.
get_dir() really needs to call a lower level function which doesn't reparse the name, as what we have in p->name is a server-side name, not user input
should check for readline/readline.h
should check for libncurses
* QA Notice: Package triggers severe warnings which indicate that it
* may exhibit random runtime failures.
* afp_url.c:35:10: warning: implicit declaration of function 'uam_string_to_bitmap' [-Wimplicit-function-declaration]
* daemon.c:70:3: warning: implicit declaration of function ‘fuse_exit’ [-Wimplicit-function-declaration]
* client.c:80:14: warning: implicit declaration of function ‘basename’ [-Wimplicit-function-declaration]
* cmdline_main.c:416:2: warning: implicit declaration of function ‘cmdline_afp_setup_client’ [-Wimplicit-function-declaration]
* cmdline_main.c:418:2: warning: implicit declaration of function ‘afp_main_quick_startup’ [-Wimplicit-function-declaration]
I'll provide more details if you care
I have pulled the master branch down to my Ubuntu 16.04.3 machine and followed the installation instructions
sudo apt-get install g++ libfuse-dev libreadline-dev libncurses5-dev git ncurses-dev libreadline-dev
./configure && make && sudo make install && echo 'done!'
sudo ldconfig
I mkdir a new directory in /media/Marketing
then run the script
mount_afp afp://Marketing-02:passwordgoeshere@"Marketing-01/Data/Marketing Share/" /media/Marketing-01/
this works, however if i go to copy any files from the time capsule i get the following loop of errors
rc.local[1175]: Danger, recursive loop
1120 static int recursive_get(char * path)
1121 {
1122 char * dirc = strdup(path);
1123 char * base = basename(path);
1124 char * dir = dirname(dirc);
This gives "/" in both base and dir (man 3 basename) which causes paths like "///Foo" to be passed to the server, which fails.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.