From 8196c37c82664f25ae88ce4934aa1ba391a3f883 Mon Sep 17 00:00:00 2001 From: BjarneDM Date: Mon, 3 Mar 2025 23:11:08 +0100 Subject: [PATCH] proftpd : updated to v/ 1.3.9 ; more databases ; config changes * update to version 1.3.9 * sysconfir & localstatedir into own subdirs * mysql8 & postgresql* variants added addresses : https://trac.macports.org/ticket/43431 * modified patch to fix original m4 file reported : https://github.com/proftpd/proftpd/issues/1878 * autoconf : yes ; to re-create configure files due to patch * DRY changes Changes to be committed: modified: net/proftpd/Portfile deleted: net/proftpd/files/dynamic_lookup-11.patch new file: net/proftpd/files/-Wimplicit-function-declaration to-do file https://github.com/proftpd/proftpd/issues/1879 --- net/proftpd/Portfile | 132 +++++++++++++----- .../files/-Wimplicit-function-declaration | 23 +++ net/proftpd/files/dynamic_lookup-11.patch | 48 ------- 3 files changed, 123 insertions(+), 80 deletions(-) create mode 100644 net/proftpd/files/-Wimplicit-function-declaration delete mode 100644 net/proftpd/files/dynamic_lookup-11.patch diff --git a/net/proftpd/Portfile b/net/proftpd/Portfile index 5bb11393448e7..28a0aa6822c91 100644 --- a/net/proftpd/Portfile +++ b/net/proftpd/Portfile @@ -1,21 +1,25 @@ # -*- 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 PortSystem 1.0 +# check if legacysupport is necessary when updating to 1.3.10 +# https://github.com/proftpd/proftpd/issues/1879 +# https://github.com/proftpd/proftpd/issues/1881 PortGroup legacysupport 1.1 # dprintf legacysupport.newest_darwin_requires_legacy 10 name proftpd -version 1.3.8b +version 1.3.9 revision 0 -checksums rmd160 c5b29f1198beaec2a1191059b56f765b417ab904 \ - sha256 183ab7c6107de271a2959ff268f55c9b6c76b2cf0029e6584fccc019686601e0 \ - size 19752808 +checksums rmd160 3cd0a88329a73761e272828a6cc5e4c168e62379 \ + sha256 4a5f13b666226813b4da0ade34535d325e204ab16cf8008c7353b1b5a972f74b \ + size 19837398 categories net license GPL-2+ -maintainers nomaintainer +maintainers {@BjarneDMat mathiesen.info:macintosh} openmaintainer + description Highly configurable ftp-server. long_description ProFTPD is a highly configurable ftp daemon for unix \ and unix-like operating systems. ProFTPD is designed \ @@ -39,10 +43,10 @@ depends_lib port:libidn \ port:ncurses \ path:lib/libssl.dylib:openssl -patchfiles dynamic_lookup-11.patch - -configure.args --sysconfdir=${prefix}/etc \ - --localstatedir=${prefix}/var/run \ +# remove the following line when updating to 1.3.10 +use_autoconf yes +configure.args --sysconfdir=${prefix}/etc/${name} \ + --localstatedir=${prefix}/var/run/${name} \ --mandir=${prefix}/share/man \ --enable-ctrls \ --enable-dso \ @@ -57,6 +61,10 @@ set modules [list mod_tls mod_sftp mod_sftp_pam mod_ban mod_ctrls_admin \ set includes {} set libs {} pre-configure { + if {[lsearch -glob ${modules} mod_sql_*] != -1} { + lappend modules mod_sql mod_sql_passwd + configure.args-append --enable-openssl + } configure.args-append --with-modules=[join $modules :] configure.args-append --with-shared=[join $modules :] if {$includes != {}} { @@ -69,45 +77,105 @@ pre-configure { pre-destroot { reinplace "s|nogroup|nobody|g" ${worksrcpath}/sample-configurations/basic.conf - xinstall -m 755 -d ${destroot}${prefix}/var/run/proftpd - touch ${destroot}${prefix}/var/run/proftpd/proftpd.scoreboard + xinstall -m 755 -d ${destroot}${prefix}/var/run/${name} + touch ${destroot}${prefix}/var/run/${name}/${name}.scoreboard } post-destroot { - move ${destroot}${prefix}/etc/proftpd.conf ${destroot}${prefix}/etc/proftpd.conf.dist - move ${destroot}${prefix}/var/run/proftpd/proftpd.scoreboard ${destroot}${prefix}/var/run/proftpd/proftpd.scoreboard.dist + move ${destroot}${prefix}/etc/${name}/${name}.conf ${destroot}${prefix}/etc/${name}/${name}.conf.dist + move ${destroot}${prefix}/var/run/${name}/${name}.scoreboard ${destroot}${prefix}/var/run/${name}/${name}.scoreboard.dist } post-activate { - if {![file exists ${prefix}/etc/proftpd.conf]} { - copy ${prefix}/etc/proftpd.conf.dist ${prefix}/etc/proftpd.conf + # move the .conf from an old install + if {[file exists ${prefix}/etc/${name}.conf]} { + move ${prefix}/etc/${name}.conf ${prefix}/etc/${name}/${name}.conf + } + if {![file exists ${prefix}/etc/${name}/${name}.conf]} { + copy ${prefix}/etc/${name}/${name}.conf.dist ${prefix}/etc/${name}/${name}.conf } } -variant mysql57 conflicts postgresql11 sqlite3 description {Build with mysql 5.7 support} { - depends_lib-append port:mysql57 - lappend modules mod_sql mod_sql_mysql - lappend includes ${prefix}/include/mysql57/mysql - lappend libs ${prefix}/lib/mysql57/mysql +variant mysql57 conflicts mysql8 sqlite3 postgresql13 postgresql14 postgresql15 postgresql16 postgresql17 description {Build with mysql 5.7 support} { + set my_db mysql57 + depends_lib-append port:${my_db} + lappend modules mod_sql_mysql + lappend includes ${prefix}/include/${my_db}/mysql + lappend libs ${prefix}/lib/${my_db}/mysql } -variant postgresql11 conflicts mysql57 sqlite3 description {Build with PostgreSQL 11 support} { - depends_lib-append port:postgresql11 - lappend modules mod_sql mod_sql_postgres - lappend includes ${prefix}/include/postgresql11 - lappend libs ${prefix}/lib/postgresql11 +variant mysql8 conflicts mysql57 sqlite3 postgresql13 postgresql14 postgresql17 postgresql17 postgresql17 description {Build with mysql 8 support} { + set my_db mysql8 + depends_lib-append port:${my_db} + lappend modules mod_sql_mysql + lappend includes ${prefix}/include/${my_db}/mysql + lappend libs ${prefix}/lib/${my_db}/mysql } -variant sqlite3 conflicts mysql57 postgresql11 description {Build with sqlite3 support} { +# https://www.postgresql.org/support/versioning/ +variant postgresql13 conflicts mysql57 mysql8 sqlite3 postgresql14 postgresql15 postgresql16 postgresql17 description {Build with PostgreSQL 13 support} { + set my_db postgresql13 + depends_lib-append port:${my_db} + lappend modules mod_sql_postgres + lappend includes ${prefix}/include/${my_db} + lappend libs ${prefix}/lib/${my_db} +} + +variant postgresql14 conflicts mysql57 mysql8 sqlite3 postgresql13 postgresql15 postgresql16 postgresql17 description {Build with PostgreSQL 14 support} { + set my_db postgresql14 + depends_lib-append port:${my_db} + lappend modules mod_sql_postgres + lappend includes ${prefix}/include/${my_db} + lappend libs ${prefix}/lib/${my_db} +} + +variant postgresql15 conflicts mysql57 mysql8 sqlite3 postgresql13 postgresql14 postgresql16 postgresql17 description {Build with PostgreSQL 15 support} { + set my_db postgresql15 + depends_lib-append port:${my_db} + lappend modules mod_sql_postgres + lappend includes ${prefix}/include/${my_db} + lappend libs ${prefix}/lib/${my_db} +} + +variant postgresql16 conflicts mysql57 mysql8 sqlite3 postgresql13 postgresql14 postgresql15 postgresql17 description {Build with PostgreSQL 16 support} { + set my_db postgresql16 + depends_lib-append port:${my_db} + lappend modules mod_sql_postgres + lappend includes ${prefix}/include/${my_db} + lappend libs ${prefix}/lib/${my_db} +} + +variant postgresql17 conflicts mysql57 mysql8 sqlite3 postgresql13 postgresql14 postgresql15 postgresql16 description {Build with PostgreSQL 17 support} { + set my_db postgresql17 + depends_lib-append port:${my_db} + lappend modules mod_sql_postgres + lappend includes ${prefix}/include/${my_db} + lappend libs ${prefix}/lib/${my_db} +} + +variant sqlite3 conflicts mysql57 mysql8 postgresql13 postgresql14 postgresql15 postgresql16 postgresql17 description {Build with sqlite3 support} { depends_lib-append port:sqlite3 - lappend modules mod_sql mod_sql_sqlite + lappend modules mod_sql_sqlite } -variant quotatab description {Build with SQL quota support} { - lappend modules mod_quotatab mod_quotatab_sql +variant quotasql description {Build with SQL quota support} { + lappend modules mod_quotatab_sql } + notes " +On activation, if no ${prefix}/etc/${name}/${name}.conf file exists, +one will be created + +If a ${prefix}/etc/${name}/${name}.cnf file exists, MacPorts does not +touch it, and any changes you make to ${prefix}/etc/${name}/${name}.cnf +will be preserved (e.g., during port upgrades, deactivations or +activations). + +If you are upgrading from 1.3.8, the old ${prefix}/etc/${name}.cnf +will be moved to ${prefix}/etc/${name}/${name}.cnf +" + startupitem.create yes -startupitem.start "${prefix}/sbin/proftpd" -startupitem.restart "/bin/kill -HUP \$(/bin/cat ${prefix}/var/run/proftpd.pid)" -startupitem.stop "/bin/kill -15 \$(/bin/cat ${prefix}/var/run/proftpd.pid)" +startupitem.start "${prefix}/sbin/${name}" +startupitem.restart "/bin/kill -HUP \$(/bin/cat ${prefix}/var/run/${name}/${name}.pid)" +startupitem.stop "/bin/kill -15 \$(/bin/cat ${prefix}/var/run/${name}/${name}.pid)" diff --git a/net/proftpd/files/-Wimplicit-function-declaration b/net/proftpd/files/-Wimplicit-function-declaration new file mode 100644 index 0000000000000..a8706714354f1 --- /dev/null +++ b/net/proftpd/files/-Wimplicit-function-declaration @@ -0,0 +1,23 @@ +Warning: Configuration logfiles contain indications of -Wimplicit-function-declaration; check that features were not accidentally disabled: + crypt: found in proftpd-1.3.8c/config.log + gethostbyname: found in proftpd-1.3.8c/config.log + inet_aton: found in proftpd-1.3.8c/config.log + gethostent: found in proftpd-1.3.8c/config.log + bind: found in proftpd-1.3.8c/config.log + authenticate: found in proftpd-1.3.8c/config.log + loginfailed: found in proftpd-1.3.8c/config.log + loginsuccess: found in proftpd-1.3.8c/config.log + acl_get_perm: found in proftpd-1.3.8c/config.log + send_file: found in proftpd-1.3.8c/config.log + lgetxattr: found in proftpd-1.3.8c/config.log + llistxattr: found in proftpd-1.3.8c/config.log + lremovexattr: found in proftpd-1.3.8c/config.log + lsetxattr: found in proftpd-1.3.8c/config.log + SSLeay_add_all_algorithms: found in proftpd-1.3.8c/config.log, proftpd-1.3.8c/contrib/mod_sftp/config.log + +after autoconf w/ patch applied : ++ strchr: found in proftpd-1.3.8c/config.log +- make_scrambled_password: found in proftpd-1.3.8c/config.log +- make_scrambled_password_323: found in proftpd-1.3.8c/config.log +- my_make_scrambled_password: found in proftpd-1.3.8c/config.log +- my_make_scrambled_password_323: found in proftpd-1.3.8c/config.log diff --git a/net/proftpd/files/dynamic_lookup-11.patch b/net/proftpd/files/dynamic_lookup-11.patch deleted file mode 100644 index 3297b3fc6502d..0000000000000 --- a/net/proftpd/files/dynamic_lookup-11.patch +++ /dev/null @@ -1,48 +0,0 @@ -Recognize macOS 11 and later, remove inaccurate comment, and simplify. -https://debbugs.gnu.org/cgi/bugreport.cgi?bug=44605 ---- configure.orig 2021-06-13 21:48:23.000000000 -0500 -+++ configure 2021-08-05 18:47:30.000000000 -0500 -@@ -6538,16 +6538,11 @@ - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; -- darwin*) # darwin 5.x on -- # if running on 10.5 or later, the deployment target defaults -- # to the OS version, if on x86, and 10.4, the deployment -- # target defaults to 10.4. Don't you love it? -- case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in -- 10.0,*86*-darwin8*|10.0,*-darwin[91]*) -- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; -- 10.[012]*) -+ darwin*) -+ case $MACOSX_DEPLOYMENT_TARGET,$host in -+ 10.[012],*|,*powerpc*-darwin[5-8]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; -- 10.*) -+ *) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; ---- lib/libltdl/configure.orig 2021-06-13 21:48:23.000000000 -0500 -+++ lib/libltdl/configure 2021-08-05 18:47:30.000000000 -0500 -@@ -6303,16 +6303,11 @@ - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; -- darwin*) # darwin 5.x on -- # if running on 10.5 or later, the deployment target defaults -- # to the OS version, if on x86, and 10.4, the deployment -- # target defaults to 10.4. Don't you love it? -- case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in -- 10.0,*86*-darwin8*|10.0,*-darwin[91]*) -- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; -- 10.[012]*) -+ darwin*) -+ case $MACOSX_DEPLOYMENT_TARGET,$host in -+ 10.[012],*|,*powerpc*-darwin[5-8]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; -- 10.*) -+ *) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;;