diff options
Diffstat (limited to 'net-ftp/proftpd/files')
-rw-r--r-- | net-ftp/proftpd/files/proftpd-1.3.6a-fix-libcheck.patch | 28 | ||||
-rw-r--r-- | net-ftp/proftpd/files/proftpd-1.3.6c-gcc-10.patch | 21 | ||||
-rw-r--r-- | net-ftp/proftpd/files/proftpd-1.3.8-configure-clang16.patch | 255 | ||||
-rw-r--r-- | net-ftp/proftpd/files/proftpd-1.3.8a-configure-c99.patch | 34 | ||||
-rw-r--r-- | net-ftp/proftpd/files/proftpd-tmpfiles.d.conf-r1 | 1 | ||||
-rw-r--r-- | net-ftp/proftpd/files/proftpd.initd-r1 | 51 |
6 files changed, 341 insertions, 49 deletions
diff --git a/net-ftp/proftpd/files/proftpd-1.3.6a-fix-libcheck.patch b/net-ftp/proftpd/files/proftpd-1.3.6a-fix-libcheck.patch deleted file mode 100644 index 93752c43e926..000000000000 --- a/net-ftp/proftpd/files/proftpd-1.3.6a-fix-libcheck.patch +++ /dev/null @@ -1,28 +0,0 @@ -Fix test suite detection. - -https://github.com/proftpd/proftpd/pull/839 - -Reported-by: Toralf Förster -Bug: https://bugs.gentoo.org/697782 ---- a/configure.in -+++ b/configure.in -@@ -991,7 +991,7 @@ AC_ARG_ENABLE(tests, - [enable unit tests (default=no)]) - ], - [ -- if test "$enableval" != xno ; then -+ if test x"$enableval" != xno ; then - AC_CHECK_HEADERS(check.h) - - AC_CHECK_LIB(check, tcase_create, ---- a/configure -+++ b/configure -@@ -20639,7 +20639,7 @@ ENABLE_TESTS="\"\"" - # Check whether --enable-tests was given. - if test "${enable_tests+set}" = set; then - enableval=$enable_tests; -- if test "$enableval" != xno ; then -+ if test x"$enableval" != xno ; then - - for ac_header in check.h - do diff --git a/net-ftp/proftpd/files/proftpd-1.3.6c-gcc-10.patch b/net-ftp/proftpd/files/proftpd-1.3.6c-gcc-10.patch deleted file mode 100644 index c3ee704c085c..000000000000 --- a/net-ftp/proftpd/files/proftpd-1.3.6c-gcc-10.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- a/contrib/mod_quotatab.c -+++ b/contrib/mod_quotatab.c -@@ -50,6 +50,7 @@ typedef struct regtab_obj { - module quotatab_module; - - /* Quota objects for the current session */ -+quota_deltas_t quotatab_deltas; - static quota_table_t *limit_tab = NULL; - static quota_limit_t sess_limit; - ---- a/contrib/mod_quotatab.h -+++ b/contrib/mod_quotatab.h -@@ -188,7 +188,7 @@ typedef struct table_obj { - #define QUOTATAB_TALLY_SRC 0x0002 - - /* Quota objects for the current session. */ --quota_deltas_t quotatab_deltas; -+extern quota_deltas_t quotatab_deltas; - - /* Function prototypes necessary for quotatab sub-modules */ - int quotatab_log(const char *, ...) diff --git a/net-ftp/proftpd/files/proftpd-1.3.8-configure-clang16.patch b/net-ftp/proftpd/files/proftpd-1.3.8-configure-clang16.patch new file mode 100644 index 000000000000..c44fd72262d2 --- /dev/null +++ b/net-ftp/proftpd/files/proftpd-1.3.8-configure-clang16.patch @@ -0,0 +1,255 @@ +https://bugs.gentoo.org/881709 (and dupe https://bugs.gentoo.org/900066) +https://github.com/proftpd/proftpd/pull/1667 + +From 98e46de3093da71121362d5be4c445a3ef227010 Mon Sep 17 00:00:00 2001 +From: Arjun Shankar <arjun@redhat.com> +Date: Fri, 5 May 2023 15:35:56 +0200 +Subject: [PATCH] configure: Remove several implicit function declarations + +During configure, some checks omit the corresponding include. A compiler +defaulting to C99 mode could cause those checks to fail since C99 does +not allow implicit function declarations. This commit fixes the same. +The configure script is re-generated. + +Signed-off-by: Arjun Shankar <arjun@redhat.com> +--- a/configure ++++ b/configure +@@ -18305,6 +18305,20 @@ _ACEOF + fi + + ++for ac_header in stddef.h crypt.h netdb.h arpa/inet.h sys/socket.h ++do : ++ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" ++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : ++ cat >>confdefs.h <<_ACEOF ++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 ++_ACEOF ++ ++fi ++ ++done ++ ++ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for standalone crypt" >&5 + $as_echo_n "checking for standalone crypt... " >&6; } + if ${pr_cv_lib_standalone_crypt+:} false; then : +@@ -18313,10 +18327,19 @@ else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + ++ #if HAVE_STDDEF_H ++ # include <stddef.h> ++ #endif ++ #if HAVE_CRYPT_H ++ # include <crypt.h> ++ #endif ++ + int + main () + { +-crypt(); ++ ++ crypt(NULL, NULL); ++ + ; + return 0; + } +@@ -18388,10 +18411,19 @@ else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + ++ #if HAVE_STDDEF_H ++ # include <stddef.h> ++ #endif ++ #if HAVE_NETDB_H ++ # include <netdb.h> ++ #endif ++ + int + main () + { +-gethostbyname(); ++ ++ gethostbyname(NULL); ++ + ; + return 0; + } +@@ -18508,10 +18540,19 @@ else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + ++ #if HAVE_STDDEF_H ++ # include <stddef.h> ++ #endif ++ #if HAVE_ARPA_INET_H ++ # include <arpa/inet.h> ++ #endif ++ + int + main () + { +-inet_aton(); ++ ++ inet_aton(NULL, NULL); ++ + ; + return 0; + } +@@ -18584,10 +18625,16 @@ else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + ++ #if HAVE_NETDB_H ++ # include <netdb.h> ++ #endif ++ + int + main () + { +-gethostent(); ++ ++ gethostent(); ++ + ; + return 0; + } +@@ -18659,10 +18706,19 @@ else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + ++ #if HAVE_STDDEF_H ++ # include <stddef.h> ++ #endif ++ #if HAVE_SYS_SOCKET_H ++ # include <sys/socket.h> ++ #endif ++ + int + main () + { +-bind(); ++ ++ bind(0, NULL, 0); ++ + ; + return 0; + } +--- a/configure.in ++++ b/configure.in +@@ -1476,18 +1476,42 @@ AC_ARG_ENABLE(transfer-buffer-size, + ]) + + dnl Checks for libraries. Yes, this is the hard way, but it's necessary. ++AC_CHECK_HEADERS(stddef.h crypt.h netdb.h arpa/inet.h sys/socket.h) ++ + AC_CACHE_CHECK(for standalone crypt,pr_cv_lib_standalone_crypt, +- AC_TRY_LINK(,[crypt();], +- pr_cv_lib_standalone_crypt="yes", pr_cv_lib_standalone_crypt="no" )) ++ AC_TRY_LINK( ++ [ ++ #if HAVE_STDDEF_H ++ # include <stddef.h> ++ #endif ++ #if HAVE_CRYPT_H ++ # include <crypt.h> ++ #endif ++ ], ++ [ ++ crypt(NULL, NULL); ++ ], ++ pr_cv_lib_standalone_crypt="yes", pr_cv_lib_standalone_crypt="no" )) + + if test "$pr_cv_lib_standalone_crypt" = "no"; then + AC_CHECK_LIB(crypt, crypt) + fi + + AC_CACHE_CHECK(for standalone gethostbyname,pr_cv_lib_standalone_gethost, +- AC_TRY_LINK(,[gethostbyname();], +- pr_cv_lib_standalone_gethost="yes", +- pr_cv_lib_standalone_gethost="no" )) ++ AC_TRY_LINK( ++ [ ++ #if HAVE_STDDEF_H ++ # include <stddef.h> ++ #endif ++ #if HAVE_NETDB_H ++ # include <netdb.h> ++ #endif ++ ], ++ [ ++ gethostbyname(NULL); ++ ], ++ pr_cv_lib_standalone_gethost="yes", ++ pr_cv_lib_standalone_gethost="no" )) + + if test "$pr_cv_lib_standalone_gethost" = "no"; then + AC_CHECK_LIB(resolv, gethostbyname) +@@ -1495,25 +1519,57 @@ if test "$pr_cv_lib_standalone_gethost" = "no"; then + fi + + AC_CACHE_CHECK(for standalone inet_aton,pr_cv_lib_standalone_aton, +- AC_TRY_LINK(,[inet_aton();], +- pr_cv_lib_standalone_aton="yes", +- pr_cv_lib_standalone_aton="no" )) ++ AC_TRY_LINK( ++ [ ++ #if HAVE_STDDEF_H ++ # include <stddef.h> ++ #endif ++ #if HAVE_ARPA_INET_H ++ # include <arpa/inet.h> ++ #endif ++ ], ++ [ ++ inet_aton(NULL, NULL); ++ ], ++ pr_cv_lib_standalone_aton="yes", ++ pr_cv_lib_standalone_aton="no" )) + + if test "$pr_cv_lib_standalone_aton" = "no"; then + AC_CHECK_LIB(bind, inet_aton) + fi + + AC_CACHE_CHECK(for standalone nsl functions,pr_cv_lib_standalone_nsl,[ +- AC_TRY_LINK(,[gethostent();], +- pr_cv_lib_standalone_nsl="yes", pr_cv_lib_standalone_nsl="no") ]) ++ AC_TRY_LINK( ++ [ ++ #if HAVE_NETDB_H ++ # include <netdb.h> ++ #endif ++ ], ++ [ ++ gethostent(); ++ ], ++ pr_cv_lib_standalone_nsl="yes", ++ pr_cv_lib_standalone_nsl="no") ]) + + if test "$pr_cv_lib_standalone_nsl" = "no"; then + AC_CHECK_LIB(nsl, gethostent) + fi + + AC_CACHE_CHECK(for standalone socket functions,pr_cv_lib_standalone_sockets, +- AC_TRY_LINK(,[bind();], +- pr_cv_lib_standalone_sockets="yes", pr_cv_lib_standalone_sockets="no")) ++ AC_TRY_LINK( ++ [ ++ #if HAVE_STDDEF_H ++ # include <stddef.h> ++ #endif ++ #if HAVE_SYS_SOCKET_H ++ # include <sys/socket.h> ++ #endif ++ ], ++ [ ++ bind(0, NULL, 0); ++ ], ++ pr_cv_lib_standalone_sockets="yes", ++ pr_cv_lib_standalone_sockets="no")) + + if test "$pr_cv_lib_standalone_sockets" = "no"; then + AC_CHECK_LIB(socket, bind) + diff --git a/net-ftp/proftpd/files/proftpd-1.3.8a-configure-c99.patch b/net-ftp/proftpd/files/proftpd-1.3.8a-configure-c99.patch new file mode 100644 index 000000000000..9364b23f0daa --- /dev/null +++ b/net-ftp/proftpd/files/proftpd-1.3.8a-configure-c99.patch @@ -0,0 +1,34 @@ +https://github.com/proftpd/proftpd/pull/1754 + +From 020192499202f268e6d96339597921aec01ec737 Mon Sep 17 00:00:00 2001 +From: Florian Weimer <fweimer@redhat.com> +Date: Fri, 8 Dec 2023 19:58:51 +0100 +Subject: [PATCH] configure: Use char ** for the iconv input argument + +The standard iconv function uses char ** even for the input buffer. +Using the incompatible const char ** type causes the check to fail if +the compiler treats such type errors as errors, instead of merely +warning about it. +--- a/configure ++++ b/configure +@@ -21475,7 +21475,7 @@ main () + { + + size_t res, in_len = 0, out_len = 0; +- const char *in = NULL; ++ char *in = NULL; + char *out = NULL; + res = iconv((iconv_t)-1, &in, &in_len, &out, &out_len); + +--- a/configure.in ++++ b/configure.in +@@ -2100,7 +2100,7 @@ AC_TRY_LINK( + ], + [ + size_t res, in_len = 0, out_len = 0; +- const char *in = NULL; ++ char *in = NULL; + char *out = NULL; + res = iconv((iconv_t)-1, &in, &in_len, &out, &out_len); + ], + diff --git a/net-ftp/proftpd/files/proftpd-tmpfiles.d.conf-r1 b/net-ftp/proftpd/files/proftpd-tmpfiles.d.conf-r1 new file mode 100644 index 000000000000..241dc7cb1bdc --- /dev/null +++ b/net-ftp/proftpd/files/proftpd-tmpfiles.d.conf-r1 @@ -0,0 +1 @@ +d /run/proftpd 0755 root root diff --git a/net-ftp/proftpd/files/proftpd.initd-r1 b/net-ftp/proftpd/files/proftpd.initd-r1 new file mode 100644 index 000000000000..0d59ec5762e8 --- /dev/null +++ b/net-ftp/proftpd/files/proftpd.initd-r1 @@ -0,0 +1,51 @@ +#!/sbin/openrc-run +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +extra_started_commands="reload" + +depend() { + need net + use logger dns mysql postgresql antivirus +} + +check_configuration() { + if [ ! -e /etc/proftpd/proftpd.conf ] ; then + eerror "To execute the ProFTPD server you need a /etc/proftpd/proftpd.conf configuration" + eerror "file. In /etc/proftpd you can find a sample configuration." + return 1 + fi + /usr/sbin/proftpd -t >/dev/null 2>&1 + if [ $? -ne 0 ] ; then + eerror "The ProFTPD configuration file /etc/proftpd/proftpd.conf is invalid! You have to" + eerror "fix your configuration in order to run the ProFTPD server. For more information" + eerror "you may execute the ProFTPD configuration check '/usr/sbin/proftpd -t'." + return 2 + fi +} + +start() { + checkpath -d /run/proftpd + [ "${RC_CMD}" = "restart" ] || check_configuration || return 1 + ebegin "Starting ProFTPD" + start-stop-daemon --start --quiet \ + --exec /usr/sbin/proftpd \ + --pidfile /run/proftpd/proftpd.pid + eend $? +} + +stop() { + [ "${RC_CMD}" != "restart" ] || check_configuration || return 1 + ebegin "Stopping ProFTPD" + start-stop-daemon --stop --quiet --retry 20 \ + --pidfile /run/proftpd/proftpd.pid + eend $? +} + +reload() { + check_configuration || return 1 + ebegin "Reloading ProFTPD" + start-stop-daemon --quiet --signal HUP \ + --pidfile /run/proftpd/proftpd.pid + eend $? +} |