Skip to content
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.1.0 #203754

Merged
merged 2 commits into from
Jan 12, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 28 additions & 14 deletions Formula/n/netatalk.rb
EricFromCanada marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class Netatalk < Formula
desc "File server for Macs, compliant with Apple Filing Protocol (AFP)"
homepage "https://netatalk.io"
url "https://github.com/Netatalk/netatalk/releases/download/netatalk-4-0-8/netatalk-4.0.8.tar.xz"
sha256 "d09d591521b27b91b1c2a6255a2e059af8c9fda43570f983f0a145706e5f7628"
url "https://github.com/Netatalk/netatalk/releases/download/netatalk-4-1-0/netatalk-4.1.0.tar.xz"
sha256 "96f70e0e67af6159b1465388a48d30df207f465377205ee932a1ef22617e0331"
license all_of: [
"GPL-2.0-only",
"GPL-2.0-or-later",
Expand All @@ -15,12 +15,12 @@ class Netatalk < Formula
head "https://github.com/Netatalk/netatalk.git", branch: "main"

bottle do
sha256 arm64_sequoia: "5aff5ad6a6dccba9fab03fd27a12cd517ab04f73c535b7b45535cf13d8957175"
sha256 arm64_sonoma: "d9146fce6e190d8f5558389f6ee795331dd801f6af42cb7a57a2b246b8e9277f"
sha256 arm64_ventura: "ea9c8c297943ae06289cecaecc46873808e4c025dcd26efb2cd14c960c4613a9"
sha256 sonoma: "22af562496f53cffb3aa4ed4d5f6be7dbbe29e35fe9720c5942d1e4c180e1d38"
sha256 ventura: "f54bb34fae8700afc7eebfe3946fcb9442d2eaabc5f55391803e2fc50605e074"
sha256 x86_64_linux: "eeaf7470fce660f94284f477223bf45fb9ccafa4c4f06217e317e6d24a53f018"
sha256 arm64_sequoia: "f23ab1e5af4633c2227a6183a38f95bf09f28604da467ee93b3e6dcf56c92730"
sha256 arm64_sonoma: "1042daac030536e7765f1d3485369c87a61ce1ff2571af43855f309be7a2f184"
sha256 arm64_ventura: "4b42d75193c290ababad3050241975aa2c107872ee837ca63c25a0e5b19d1a58"
sha256 sonoma: "f1e296c160c78b7e903992549b129bcf52b7b10268246dc38731532675449bcb"
sha256 ventura: "b036cda8da411dfa81793d00ef3e240ba7ece397323f01533a7882e17bee0dd2"
sha256 x86_64_linux: "3bc881ceb7a164ab5b0dbfccce91a7cb5ee35236ea53c0b6bace7201abf03d69"
end

depends_on "docbook-xsl" => :build
Expand All @@ -32,7 +32,7 @@ class Netatalk < Formula
depends_on "cracklib"
depends_on "libevent"
depends_on "libgcrypt"
depends_on "mysql"
depends_on "mariadb"
depends_on "openldap" # macOS LDAP.Framework is not fork safe

uses_from_macos "libxslt" => :build
Expand All @@ -45,11 +45,7 @@ class Netatalk < Formula
depends_on "avahi" # on macOS we use native mDNS instead
depends_on "cups" # used by the AppleTalk print server
depends_on "libtirpc" # on macOS we use native RPC instead
end

patch do
url "https://github.com/Netatalk/netatalk/commit/206fb7771862b9b98452c934dac884aaa397c8ca.patch?full_index=1"
sha256 "fd448734556daf0344be4fa0bb09e4704c4123078ad804069d288aa0e3e104d6"
depends_on "linux-pam"
end

def install
Expand All @@ -67,6 +63,7 @@ def install
"-Dwith-init-dir=#{prefix}",
"-Dwith-init-hooks=false",
"-Dwith-install-hooks=false",
"-Dwith-lockfile-path=#{var}/run",
"-Dwith-statedir-path=#{var}",
"-Dwith-pam-config-path=#{etc}/pam.d",
"-Dwith-rpath=false",
Expand All @@ -83,6 +80,23 @@ def install
require_root true
end

def caveats
on_macos do
on_arm do
<<~EOS
Authenticating as a system user requires manually installing the
PAM configuration file to a predetermined location by running:

sudo install -d -o $USER -g admin /usr/local/etc
mkdir -p /usr/local/etc/pam.d
cp $(brew --prefix)/etc/pam.d/netatalk /usr/local/etc/pam.d

See `man pam.conf` for more information.
EOS
end
end
end

test do
system sbin/"netatalk", "-V"
system sbin/"afpd", "-V"
Expand Down
Loading