-
-
Notifications
You must be signed in to change notification settings - Fork 12.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
netatalk 4.0.8 (new formula) #202713
base: master
Are you sure you want to change the base?
netatalk 4.0.8 (new formula) #202713
Conversation
Thanks for contributing to Homebrew! 🎉 It looks like you're having trouble with a CI failure. See our contribution guide for help. You may be most interested in the section on dealing with CI failures. You can find the CI logs in the Checks tab of your pull request. |
4c5e0b4
to
8bb667f
Compare
8bb667f
to
1b6c851
Compare
The remaining CI failures are triggered by the As mentioned in the summary, complying with them and using the macOS supplied libraries will break the software. Can these CI failures be ignored? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR; a few comments.
5e94138
to
3565ce2
Compare
3565ce2
to
24662de
Compare
2b31ec1
to
dac9912
Compare
72a454a
to
5e76486
Compare
4ebf570
to
1195a6c
Compare
Head branch was pushed to by a user without write access
Head branch was pushed to by a user without write access
@carlocab Thanks for all your help! I'm pleased that we got it working in the end. FYI, I had to force-push the branch again because one of the macOS CI runners got flaky and posted a failure. Seems to have been an intermittent connection issue with the runner machine. Hopefully we get a green slate this time... Edit: All jobs passed this time! |
I figured out how to register the launchd / systemd services for netatalk. It basically works, if you invoke
|
There is a |
@SMillerDev Right on, that did the trick. Thanks! |
end | ||
|
||
service do | ||
name macos: "io.netatalk.daemon", linux: "netatalk" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do these service files look like? In particular, where do they send logs, and what working directory do they use?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- macOS: https://github.com/Netatalk/netatalk/blob/main/distrib/initscripts/macos.netatalk.plist.in
- logs to
/tmp/netatalk.out
and/tmp/netatalk.err
- logs to
- Linux: https://github.com/Netatalk/netatalk/blob/main/distrib/initscripts/systemd.netatalk.service.in
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably want to fix up some of those path references, since they'll likely be Cellar
paths that aren't suitable for long-lived services
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@carlocab So you're arguing that the two /tmp paths for the macOS logs should be rewritten to start with #{prefix}
, for instance /opt/homebrew/Cellar/netatalk/4.0.8/var/log
?
Or am I getting your comment backwards?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On Linux, we log to journald by default, and not to a particular file.
The working directory is not controlled by the service files, but rather the build system. On aarch64 macOS, for instance, the working directory is /opt/homebrew/Cellar/netatalk/4.0.8/var/netatalk
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of the paths in plist, and the systemd unit file, are agnostic to the absolute path. The netatalkd
file is just a helper script used by the plist (or can be used directly by users: sudo netatalkd start
) that can be installed and reinstalled freely by brew.
However, thanks to this discussion I realized that it's critical to set a custom path for -Dwith-statedir-path
which translates to /opt/homebrew/opt/netatalk/var
or perhaps /opt/homebrew/var
. This is where netatalk stores the CNID database which contains a structured representation of all the files in the shared volumes. This must be carried over when upgrading netatalk.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, never mind, I see now that there's a symlink in place that makes /opt/homebrew/opt/netatalk/var
a stable path between installed versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually strike that, I ran some empirical tests. With the current configuration, updating from one version to another will wipe the contents of /opt/homebrew/opt/netatalk/var
, because it symlinks to f.e. /opt/homebrew/Cellar/netatalk/4.0.8/var
which gets replaced in an upgrade.
What gets me the expected behavior is -Dwith-statedir-path=#{var}
which stores the CNID database under /opt/homebrew/var/netatalk/CNID
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd still suggest using the stable opt_bin
path instead of the versioned path in the service files. See the inreplace
directive in the batt
formula for an example. Something like: inreplace "distrib/initscripts/macos.netatalk.plist.in", "@bindir@", opt_bin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do like these paths better. Now I've pushed this, plus the same substitution for the sbin dirs in all init scripts.
I've filed a PR to fix the launchd item not being able to stop the For now, I'd suggest adding a Side note: what's it take to get its user authentication working in modern macOS? With the server running on Sonoma on M3 and logging enabled in |
@EricFromCanada Thanks for filing the PR. Let me follow up over there. The next stable netatalk release is about a week out. Authentication should work out of the box on any host, as long as the Mac client is running Mac OS 8.6, 9.x, or any version of OSX / macOS. What OS is the client Mac running? My first guess would be some kind of PAM library failure on Sonoma. Alternatively, you're using a password that the DHX2 UAM doesn't like for some reason. If you like, you can open up a Discussion thread over at the netatalk GitHub project and we can dig into it. |
HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew test <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingHOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>
)? If this is a new formula, does it passbrew audit --new <formula>
? (see caveat below)Please note that
brew audit --new netatalk
throws non-compliance as per the below. However, the native macOSberkeley-db
andopenldap
libraries are both unusable: The former lacks required symbols, and the latter (represented by LDAP.Framework) isn't fork safe while netatalk is a forking application.