Skip to content
Open
Show file tree
Hide file tree
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
231 changes: 165 additions & 66 deletions net/netatalk/Portfile
Original file line number Diff line number Diff line change
@@ -1,81 +1,180 @@
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

Check warning on line 1 in net/netatalk/Portfile

View workflow job for this annotation

GitHub Actions / macos-13

port test netatalk: Warning: netatalk is configured to build for the architecture(s) 'x86_64', but did not install any Mach-O files.

Check warning on line 1 in net/netatalk/Portfile

View workflow job for this annotation

GitHub Actions / macos-14

port test netatalk: Warning: netatalk is configured to build for the architecture(s) 'arm64', but did not install any Mach-O files.

Check warning on line 1 in net/netatalk/Portfile

View workflow job for this annotation

GitHub Actions / macos-15

port test netatalk: Warning: netatalk is configured to build for the architecture(s) 'arm64', but did not install any Mach-O files.

PortSystem 1.0
PortGroup openssl 1.0
PortGroup github 1.0
PortGroup meson 1.0
PortGroup legacysupport 1.1

name netatalk
version 2.2.10
version 4.3.2
revision 0
epoch 1
categories net
license GPL-2
maintainers nomaintainer
description File and printer server for Apple Macintosh clients
long_description netatalk is a daemon which provides POSIX-compliant \
Unix/BSD systems with the ability to share files \
and printers with Apple Macintosh computers.
description Netatalk is a freely-available Open Source AFP fileserver.
long_description Netatalk is a freely-available Open Source AFP fileserver. \
It allows Unix-like operating systems to serve as file \
servers for Macintosh computers.

homepage https://netatalk.sourceforge.net
master_sites sourceforge
# Main netatalk port - stub that selects appropriate version based on macOS
if {${subport} eq ${name}} {
PortGroup stub 1.0

checksums rmd160 3a8b7e7dac944dbc65005ebcdf49b286b6ac9730 \
sha256 0443368ec1a6019c41a0406d34fe6681b00207a5abe8a8a731a557d1d2a998e8 \
size 1341863

use_bzip2 yes
startupitem.create yes
startupitem.start "${prefix}/etc/netatalk/initscript start"
startupitem.stop "${prefix}/etc/netatalk/initscript stop"
startupitem.restart "${prefix}/etc/netatalk/initscript restart"

depends_build-append \
port:pkgconfig

depends_lib-append path:bin/perl:perl5 \
path:lib/libldap.dylib:openldap \
port:avahi \
port:db48 \
port:libgcrypt \
port:libiconv

configure.args-append \
--with-acls=no \
--with-bdb=${prefix} \
--with-spooldir=${prefix}/var/spool/netatalk \
--with-ssl-dir=${prefix} \
--with-libiconv=${prefix} \
--with-ldap=${prefix} \
--mandir=${prefix}/share/man

platform darwin {
if {${os.major} >= 10} {
configure.args-append \
--disable-a2boot \
--disable-ddp \
--disable-timelord
}
# For some reason, several symbols from uams_guest are left undefined.

# netatalk4 builds successfully on El Capitan (10.11) and later
if {${os.major} >= 11} {
configure.args-append \
--disable-pgp-uam \
--disable-krb4-uam \
--disable-krbV-uam
# macOS 10.11 (El Capitan) and later get netatalk 4.x
depends_run port:netatalk4
} else {
# macOS 10.10 and earlier get netatalk 2.x (legacy)
depends_run port:netatalk2
}

}

# Netatalk 4.x subport (modern version for macOS 10.11+)
subport netatalk4 {
github.setup Netatalk netatalk 4-3-2 netatalk-
version [string map {- .} ${github.version}]
github.tarball_from releases
distname netatalk-${version}
use_xz yes
revision 0

platforms {darwin >= 11}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no benefit in prohibiting to build a port which builds fine. Defaults can be set as you decide to (so that netatalk pulls in either v.4 or v.2), but rather allow a user to install either of the ports explicitly, if desired.

Besides, my objection was about deleting v.2 (without knowing for sure that v.4 is a proper replacement for every system), not about making v.4 the default. Maybe just make netatalk a stub for netatalk4 for all systems, but retain v.2 for the time-being (i.e. the subport which you have added here)? Otherwise it is a bit confusing: it will install with 4.3.2 version, even when it actually installs v.2.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We know 100% for sure that netatalk 4 is a replacemnt for netatalk 2.x. The 2.x has been depricated and replaced with 4.x. Have you looked at netatalk.io as it has the details.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the upstream actually tested it on 10.5+, then sure, 2.x can be just retired. (My default assumption is that nothing is tested on older systems.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your welcome to make bug reports on the upstream for those systems. Upstream has been fixing these kinds of things when reported.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don’t really get what is the argument about at this point. You wanted to make netatalk4 the default for all systems? I am fine with that (since the build should be fixed now). Since you asked me to review the changes, I commented on those. You could use my suggestions while making your choice on defaults (whether using v4 for all systems or for a subset of them). There are no objections to moving to v4 as the default. I can’t approve arbitrary platforms blacklisting, because it forces a user to edit portfiles manually to build a port, so there is a real downside with zero benefits. However, my approval is not something required to merge the PR anyway.

conflicts netatalk2

compiler.c_standard 2011
checksums rmd160 46af4f1c71fafc9e1cfca470d3e90f97d91b8117 \
sha256 2977b4fd113182f0cc183337ba23d5701fb2be4e0dfcec7ee575b4d73a738d3a \
size 956356

categories net
license GPL-2+
maintainers {@trodemaster icloud.com:manuals-unread2u} openmaintainer

description Netatalk is a freely-available Open Source AFP fileserver.
long_description Netatalk is a freely-available Open Source AFP fileserver. \
It allows Unix-like operating systems to serve as file \
servers for Macintosh computers.

homepage https://netatalk.io

depends_build-append path:bin/pkg-config:pkgconfig \
port:cmark-gfm \
port:bison \
port:flex

depends_lib port:sqlite3 \
port:libevent \
port:libgcrypt \
port:iniparser \
port:tracker3 \
port:dbus \
port:talloc \
port:glib2 \
port:bstring

configure.args-append -Dwith-init-style=none \
-Dwith-pam-config-path=${prefix}/etc/pam.d \
-Dwith-lockfile-path=${prefix}/var/run \
-Dwith-cnid-backends=sqlite \
-Dwith-cnid-default-backend=sqlite \
-Dwith-spotlight=true

startupitem.create yes
startupitem.executable ${prefix}/sbin/netatalk -d -F ${prefix}/etc/afp.conf
startupitem.logfile ${prefix}/var/log/${name}.log
startupitem.logfile.stderr ${prefix}/var/log/${name}-stderr.log
startupitem.logevents yes
startupitem.debug yes

notes "Upgrade details: https://netatalk.io/manual/en/Upgrading. Configuration files can be found in: ${prefix}/etc/. Log files can be found in: ${prefix}/var/log/."

# Support up to macOS 10.11 for getline function
legacysupport.newest_darwin_requires_legacy 15
}

configure.cppflags-append \
-I${prefix}/include/db48
configure.ldflags-append \
-L${prefix}/lib/db48
# Netatalk 2.x subport (legacy version for macOS 10.10 and earlier)
subport netatalk2 {
PortGroup openssl 1.0

post-destroot {
file delete -force ${destroot}${prefix}/sbin/atalkd \
${destroot}${prefix}/share/netatalk ${destroot}/etc
xinstall -m 755 -d ${destroot}${prefix}/var/log/ \
${destroot}${prefix}/var/run/netatalk \
${destroot}${prefix}/var/spool/netatalk
xinstall -m 755 ${filespath}/initscript ${destroot}${prefix}/etc/netatalk/
reinplace "s|MACPORTS_PREFIX|${prefix}|" ${destroot}${prefix}/etc/netatalk/initscript
system "touch ${destroot}${prefix}/var/log/netatalk.log"
system "touch ${destroot}${prefix}/var/run/netatalk/afpd"
destroot.keepdirs ${destroot}${prefix}/var/spool/netatalk

version 2.2.10
revision 0
platforms {darwin < 11}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likewise, IMO it is not justified to prohibit building the port on systems where it builds. It can be discouraged (in favor of v.4), but that is already done via netatalk stub. If needed, a port note can be added, advising to switch to v.4. But if someone needs to test something with v.2 on a newer macOS, why would we prevent that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The goal here is to replace the out of date software with the current release.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get that, but arbitrary restriction of platforms does not serve that purpose. If the stub pulls in v.4, the goal is already achieved: port install netatalk will install netatalk4.

conflicts netatalk4

categories net
license GPL-2
maintainers nomaintainer
description File and printer server for Apple Macintosh clients
long_description netatalk is a daemon which provides POSIX-compliant \
Unix/BSD systems with the ability to share files \
and printers with Apple Macintosh computers.

homepage https://netatalk.sourceforge.net
master_sites sourceforge

checksums rmd160 3a8b7e7dac944dbc65005ebcdf49b286b6ac9730 \
sha256 0443368ec1a6019c41a0406d34fe6681b00207a5abe8a8a731a557d1d2a998e8 \
size 1341863

use_bzip2 yes
startupitem.create yes
startupitem.start "${prefix}/etc/netatalk/initscript start"
startupitem.stop "${prefix}/etc/netatalk/initscript stop"
startupitem.restart "${prefix}/etc/netatalk/initscript restart"

depends_build-append \
port:pkgconfig
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could it be made path-style, like above?


depends_lib-append path:bin/perl:perl5 \
path:lib/libldap.dylib:openldap \
port:avahi \
port:db48 \
port:libgcrypt \
port:libiconv

configure.args-append \
--with-acls=no \
--with-bdb=${prefix} \
--with-spooldir=${prefix}/var/spool/netatalk \
--with-ssl-dir=${prefix} \
--with-libiconv=${prefix} \
--with-ldap=${prefix} \
--mandir=${prefix}/share/man

platform darwin {
if {${os.major} >= 10} {
configure.args-append \
--disable-a2boot \
--disable-ddp \
--disable-timelord
}
# For some reason, several symbols from uams_guest are left undefined.
if {${os.major} >= 11} {
configure.args-append \
--disable-pgp-uam \
--disable-krb4-uam \
--disable-krbV-uam
}
}

configure.cppflags-append \
-I${prefix}/include/db48
configure.ldflags-append \
-L${prefix}/lib/db48

post-destroot {
file delete -force ${destroot}${prefix}/sbin/atalkd \
${destroot}${prefix}/share/netatalk ${destroot}/etc
xinstall -m 755 -d ${destroot}${prefix}/var/log/ \
${destroot}${prefix}/var/run/netatalk \
${destroot}${prefix}/var/spool/netatalk
xinstall -m 755 ${filespath}/initscript ${destroot}${prefix}/etc/netatalk/
reinplace "s|MACPORTS_PREFIX|${prefix}|" ${destroot}${prefix}/etc/netatalk/initscript
system "touch ${destroot}${prefix}/var/log/netatalk.log"
system "touch ${destroot}${prefix}/var/run/netatalk/afpd"
destroot.keepdirs ${destroot}${prefix}/var/spool/netatalk
}
}
62 changes: 0 additions & 62 deletions net/netatalk4/Portfile

This file was deleted.

19 changes: 0 additions & 19 deletions net/netatalk4/files/bison.diff

This file was deleted.