Netatalk for macOS - networking classic and modern Macs

About QEMU, a PPC Mac emulator for Windows, macOS and Linux that can run Mac OS 9.0 up to Mac OS X 10.5

Moderators: Cat_7, Ronald P. Regensburg

dgsga
Inquisitive Elf
Posts: 39
Joined: Wed Feb 17, 2021 8:13 pm

Re: Netatalk for macOS - networking classic and modern Macs

Post by dgsga »

Anyone know anything about dbus? I have been working on afpstats and dbus but cannot get it to work. The way the original code is set up to work is for afpstats to use the system bus but Homebrew's dbus only provides a per user session bus. I'm not even sure it's worth the work as the macusers script provides virtually the same info. What do you think?
User avatar
mabam
Master Emulator
Posts: 358
Joined: Wed Apr 10, 2013 9:32 am

Re: Netatalk for macOS - networking classic and modern Macs

Post by mabam »

I didn’t know how to fix these:

/doc/manpages/man1/uniconv.1.xml
line 56: @DEFAULT_CNID_SCHEME@

/doc/manpages/man5/afp.conf.5.xml
line 923: @DBUS_DAEMON_PATH@
line 1785: @DEFAULT_CNID_SCHEME@
line 1786: @compiled_backends@

All other undefined variables of the html documentation should be fixed in my latest pull request.
User avatar
adespoton
Forum All-Star
Posts: 3351
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Netatalk for macOS - networking classic and modern Macs

Post by adespoton »

dgsga wrote: Thu Apr 22, 2021 8:02 pm Anyone know anything about dbus? I have been working on afpstats and dbus but cannot get it to work. The way the original code is set up to work is for afpstats to use the system bus but Homebrew's dbus only provides a per user session bus. I'm not even sure it's worth the work as the macusers script provides virtually the same info. What do you think?
Homebrew's dbus only provides a per user session bus by default... there's instructions for setting up a launchd record for system bus use. Or maybe that was the MacPorts version... it's getting a bit fuzzy for me now that I've played around with both so much. Anyway, the script is probably the better way to go, as the dbus solution gives different results on different OS versions IIRC (Catalina and later may not have the system-wide option, now that I think of it).
dgsga
Inquisitive Elf
Posts: 39
Joined: Wed Feb 17, 2021 8:13 pm

Re: Netatalk for macOS - networking classic and modern Macs

Post by dgsga »

Update:

afpstats has been removed from the repo as the not-insignificant amount of code associated with it yields no working result, even in linux. This means dbus and dbus-glib dependencies are no longer required. I have added mysql to list of dependencies in case you want to use mysql as the cnid backend (requires the mysql server to be up and running in macOS).

Also, running 'ulimit -aH' in macOS gives the following result:

Code: Select all

% ulimit -aH
-t: cpu time (seconds)              unlimited
-f: file size (blocks)              unlimited
-d: data seg size (kbytes)          unlimited
-s: stack size (kbytes)             65532
-c: core file size (blocks)         unlimited
-v: address space (kbytes)          unlimited
-l: locked-in-memory size (kbytes)  unlimited
-u: processes                       8352
-n: file descriptors                unlimited
The resource argument "RLIMIT_NOFILE' used in the setlimits function specifies a value one greater than the maximum file descriptor number that can be opened by a process. The above output shows that the maximum file descriptor number that can be opened by a process in macOS is unlimited. So I have commented out the setlimits function in afpd and cnid_metad so those cnid_metad exit errors should be eliminated. Please let me know if you have any issues with this change and if so I will revert the commit
User avatar
mabam
Master Emulator
Posts: 358
Joined: Wed Apr 10, 2013 9:32 am

Re: Netatalk for macOS - networking classic and modern Macs

Post by mabam »

Wow, you seem to have spent your whole weekend on this!

I just tried compiling the new code and got this:

Code: Select all

$ make
[…]
Making all in libatalk
[…]
Making all in vfs
  CC       vfs.lo
  CC       unix.lo
  CC       ea_ad.lo
  CC       ea_sys.lo
  CC       extattr.lo
  CCLD     libvfs.la
  CC       dummy.lo
  CCLD     libatalk.la
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [libatalk.la] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
dgsga
Inquisitive Elf
Posts: 39
Joined: Wed Feb 17, 2021 8:13 pm

Re: Netatalk for macOS - networking classic and modern Macs

Post by dgsga »

@mabam
Try a fresh clone of the repo, made numerous changes and reverts over the weekend. I’ve double-checked here on 2 machines and all’s well...
User avatar
mabam
Master Emulator
Posts: 358
Joined: Wed Apr 10, 2013 9:32 am

Re: Netatalk for macOS - networking classic and modern Macs

Post by mabam »

The error was with a fresh clone from yesterday night. I remember the current “111 commits ahead of Netatalk:branch-netatalk-3-1” message in your repo from yesterday.

I just tried with cloning again anyway but got the same error as yesterday.
dgsga
Inquisitive Elf
Posts: 39
Joined: Wed Feb 17, 2021 8:13 pm

Re: Netatalk for macOS - networking classic and modern Macs

Post by dgsga »

mabam wrote: Mon Apr 26, 2021 8:36 pm The error was with a fresh clone from yesterday night. I remember the current “111 commits ahead of Netatalk:branch-netatalk-3-1” message in your repo from yesterday.

I just tried with cloning again anyway but got the same error as yesterday.
Hmm, not sure what's going on here, I can't seem to reproduce the issue. In your compilation summary it should say:

Code: Select all

SSL:
        LIBS   =  -L/usr/local/opt/openssl@1.1/lib -L/usr/local/opt/openssl@1.1 -lcrypto
        CFLAGS =  -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/openssl@1.1/include/openssl
Have you tried re-installing openssl in Homebrew? Anyone else have the same problem?
mikeboss
Space Cadet
Posts: 8
Joined: Sat Apr 17, 2021 7:54 am

Re: Netatalk for macOS - networking classic and modern Macs

Post by mikeboss »

I just tested it on my Mac mini M1 running a fresh install of macOS 11.3 and everything (installing brew, git clone make etc.) has worked flawless.
User avatar
mabam
Master Emulator
Posts: 358
Joined: Wed Apr 10, 2013 9:32 am

Re: Netatalk for macOS - networking classic and modern Macs

Post by mabam »

dgsga wrote: Tue Apr 27, 2021 7:17 pm Hmm, not sure what's going on here, I can't seem to reproduce the issue. In your compilation summary it should say:

Code: Select all

SSL:
        LIBS   =  -L/usr/local/opt/openssl@1.1/lib -L/usr/local/opt/openssl@1.1 -lcrypto
        CFLAGS =  -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/openssl@1.1/include/openssl
Have you tried re-installing openssl in Homebrew? Anyone else have the same problem?

I’m abroad for the rest of the week and will check this when I’m back.
dgsga
Inquisitive Elf
Posts: 39
Joined: Wed Feb 17, 2021 8:13 pm

Re: Netatalk for macOS - networking classic and modern Macs

Post by dgsga »

All done now. I have added an install.command file to the root of the repo that does it all (repo update, configure, make, install, cleanup) with a single double-click on the file. You just need to make it executable with:

Code: Select all

chmod +x install.command
User avatar
mabam
Master Emulator
Posts: 358
Joined: Wed Apr 10, 2013 9:32 am

Re: Netatalk for macOS - networking classic and modern Macs

Post by mabam »

mabam wrote: Wed Apr 28, 2021 12:39 pm
dgsga wrote: Tue Apr 27, 2021 7:17 pm Hmm, not sure what's going on here, I can't seem to reproduce the issue. In your compilation summary it should say:

Code: Select all

SSL:
        LIBS   =  -L/usr/local/opt/openssl@1.1/lib -L/usr/local/opt/openssl@1.1 -lcrypto
        CFLAGS =  -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/openssl@1.1/include/openssl
Have you tried re-installing openssl in Homebrew? Anyone else have the same problem?

I’m abroad for the rest of the week and will check this when I’m back.

Just tried to compile again. Your fix to the repo did the trick. Thanks again!
User avatar
mabam
Master Emulator
Posts: 358
Joined: Wed Apr 10, 2013 9:32 am

Re: Netatalk for macOS - networking classic and modern Macs

Post by mabam »

@dgsga:
I just figured that “sudo make uninstall” doesn’t work anymore (make: *** No rule to make target `uninstall'. Stop.).
I suppose that got deleted with some cleanup. Is it possible to revert this?
dgsga
Inquisitive Elf
Posts: 39
Joined: Wed Feb 17, 2021 8:13 pm

Re: Netatalk for macOS - networking classic and modern Macs

Post by dgsga »

Have removed make distclean auto-cleanup from install. command so all should be fine now...
User avatar
mabam
Master Emulator
Posts: 358
Joined: Wed Apr 10, 2013 9:32 am

Re: Netatalk for macOS - networking classic and modern Macs

Post by mabam »

Thank you, works as advertised!
Post Reply