* [gentoo-commits] repo/gentoo:master commit in: net-ftp/proftpd/files/, net-ftp/proftpd/
@ 2015-12-01 22:23 Sergei Trofimovich
0 siblings, 0 replies; 11+ messages in thread
From: Sergei Trofimovich @ 2015-12-01 22:23 UTC (permalink / raw
To: gentoo-commits
commit: 0701a27f2fb7e5d820b9da4317ee99b655cfd468
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 1 22:22:50 2015 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Tue Dec 1 22:23:12 2015 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0701a27f
net-ftp/proftpd: fix size limit of SFTP handshake, bug #567252
Reported-by: Agostino Sarubbo
Bug: https://bugs.gentoo.org/567252
Bug: http://bugs.proftpd.org/4210
Package-Manager: portage-2.2.25
.../files/proftpd-1.3.5a-unbound-sftp-p1.patch | 70 ++++++
.../files/proftpd-1.3.5a-unbound-sftp-p2.patch | 61 ++++++
net-ftp/proftpd/proftpd-1.3.5a-r2.ebuild | 240 +++++++++++++++++++++
3 files changed, 371 insertions(+)
diff --git a/net-ftp/proftpd/files/proftpd-1.3.5a-unbound-sftp-p1.patch b/net-ftp/proftpd/files/proftpd-1.3.5a-unbound-sftp-p1.patch
new file mode 100644
index 0000000..03dd1d8
--- /dev/null
+++ b/net-ftp/proftpd/files/proftpd-1.3.5a-unbound-sftp-p1.patch
@@ -0,0 +1,70 @@
+commit a24db7f9864240a4ebb236a6615ec649138fef0e
+Author: TJ Saunders <tj@castaglia.org>
+Date: Sat Nov 28 17:08:03 2015 -0800
+
+ Bug#4210 - Avoid unbounded SFTP extension key/values.
+
+diff --git a/contrib/mod_sftp/fxp.c b/contrib/mod_sftp/fxp.c
+index 5d9ae17..03c7eb5 100644
+--- a/contrib/mod_sftp/fxp.c
++++ b/contrib/mod_sftp/fxp.c
+@@ -241,6 +241,9 @@ struct fxp_extpair {
+ unsigned char *ext_data;
+ };
+
++/* Maximum length of SFTP extension name, AND of the extension value. */
++#define SFTP_EXT_MAX_LEN 1024
++
+ static pool *fxp_pool = NULL;
+ static int fxp_use_gmt = TRUE;
+
+@@ -1240,6 +1243,14 @@ static struct fxp_extpair *fxp_msg_read_extpair(pool *p, unsigned char **buf,
+ SFTP_DISCONNECT_CONN(SFTP_SSH2_DISCONNECT_BY_APPLICATION, NULL);
+ }
+
++ if (namelen > SFTP_EXT_MAX_LEN) {
++ (void) pr_log_writefile(sftp_logfd, MOD_SFTP_VERSION,
++ "received too-long SFTP extension name (%lu > max %lu), ignoring",
++ (unsigned long) namelen, (unsigned long) SFTP_EXT_MAX_LEN);
++ errno = EINVAL;
++ return NULL;
++ }
++
+ name = palloc(p, namelen + 1);
+ memcpy(name, *buf, namelen);
+ (*buf) += namelen;
+@@ -1248,6 +1259,14 @@ static struct fxp_extpair *fxp_msg_read_extpair(pool *p, unsigned char **buf,
+
+ datalen = sftp_msg_read_int(p, buf, buflen);
+ if (datalen > 0) {
++ if (datalen > SFTP_EXT_MAX_LEN) {
++ (void) pr_log_writefile(sftp_logfd, MOD_SFTP_VERSION,
++ "received too-long SFTP extension '%s' data (%lu > max %lu), ignoring",
++ name, (unsigned long) datalen, (unsigned long) SFTP_EXT_MAX_LEN);
++ errno = EINVAL;
++ return NULL;
++ }
++
+ data = sftp_msg_read_data(p, buf, buflen, datalen);
+
+ } else {
+@@ -2210,11 +2229,13 @@ static struct stat *fxp_attrs_read(struct fxp_packet *fxp, unsigned char **buf,
+ struct fxp_extpair *ext;
+
+ ext = fxp_msg_read_extpair(fxp->pool, buf, buflen);
+- pr_trace_msg(trace_channel, 15,
+- "protocol version %lu: read EXTENDED attribute: "
+- "extension '%s' (%lu bytes of data)",
+- (unsigned long) fxp_session->client_version, ext->ext_name,
+- (unsigned long) ext->ext_datalen);
++ if (ext != NULL) {
++ pr_trace_msg(trace_channel, 15,
++ "protocol version %lu: read EXTENDED attribute: "
++ "extension '%s' (%lu bytes of data)",
++ (unsigned long) fxp_session->client_version, ext->ext_name,
++ (unsigned long) ext->ext_datalen);
++ }
+ }
+ }
+
+
diff --git a/net-ftp/proftpd/files/proftpd-1.3.5a-unbound-sftp-p2.patch b/net-ftp/proftpd/files/proftpd-1.3.5a-unbound-sftp-p2.patch
new file mode 100644
index 0000000..c7d0a02
--- /dev/null
+++ b/net-ftp/proftpd/files/proftpd-1.3.5a-unbound-sftp-p2.patch
@@ -0,0 +1,61 @@
+commit f30ac3cc1a58ec7522de6aeeaa09314a45dbc690
+Author: TJ Saunders <tj@castaglia.org>
+Date: Sat Nov 28 17:13:55 2015 -0800
+
+ Correct the parameters to talk of "extended attributes", not SFTP extensions.
+
+diff --git a/contrib/mod_sftp/fxp.c b/contrib/mod_sftp/fxp.c
+index 03c7eb5..e7161d5 100644
+--- a/contrib/mod_sftp/fxp.c
++++ b/contrib/mod_sftp/fxp.c
+@@ -235,15 +235,18 @@ static size_t fxp_packet_data_allocsz = 0;
+ #define FXP_PACKET_DATA_DEFAULT_SZ (1024 * 16)
+ #define FXP_RESPONSE_DATA_DEFAULT_SZ 512
+
++#define FXP_MAX_PACKET_LEN (1024 * 512)
++#define FXP_MAX_EXTENDED_ATTRIBUTES 100
++
++/* Maximum length of SFTP extended attribute name OR value. */
++#define FXP_MAX_EXTENDED_ATTR_LEN 1024
++
+ struct fxp_extpair {
+ char *ext_name;
+ uint32_t ext_datalen;
+ unsigned char *ext_data;
+ };
+
+-/* Maximum length of SFTP extension name, AND of the extension value. */
+-#define SFTP_EXT_MAX_LEN 1024
+-
+ static pool *fxp_pool = NULL;
+ static int fxp_use_gmt = TRUE;
+
+@@ -1243,10 +1246,10 @@ static struct fxp_extpair *fxp_msg_read_extpair(pool *p, unsigned char **buf,
+ SFTP_DISCONNECT_CONN(SFTP_SSH2_DISCONNECT_BY_APPLICATION, NULL);
+ }
+
+- if (namelen > SFTP_EXT_MAX_LEN) {
++ if (namelen > FXP_MAX_EXTENDED_ATTR_LEN) {
+ (void) pr_log_writefile(sftp_logfd, MOD_SFTP_VERSION,
+- "received too-long SFTP extension name (%lu > max %lu), ignoring",
+- (unsigned long) namelen, (unsigned long) SFTP_EXT_MAX_LEN);
++ "received too-long extended attribute name (%lu > max %lu), ignoring",
++ (unsigned long) namelen, (unsigned long) FXP_MAX_EXTENDED_ATTR_LEN);
+ errno = EINVAL;
+ return NULL;
+ }
+@@ -1259,10 +1262,11 @@ static struct fxp_extpair *fxp_msg_read_extpair(pool *p, unsigned char **buf,
+
+ datalen = sftp_msg_read_int(p, buf, buflen);
+ if (datalen > 0) {
+- if (datalen > SFTP_EXT_MAX_LEN) {
++ if (datalen > FXP_MAX_EXTENDED_ATTR_LEN) {
+ (void) pr_log_writefile(sftp_logfd, MOD_SFTP_VERSION,
+- "received too-long SFTP extension '%s' data (%lu > max %lu), ignoring",
+- name, (unsigned long) datalen, (unsigned long) SFTP_EXT_MAX_LEN);
++ "received too-long extended attribute '%s' value (%lu > max %lu), "
++ "ignoring", name, (unsigned long) datalen,
++ (unsigned long) FXP_MAX_EXTENDED_ATTR_LEN);
+ errno = EINVAL;
+ return NULL;
+ }
diff --git a/net-ftp/proftpd/proftpd-1.3.5a-r2.ebuild b/net-ftp/proftpd/proftpd-1.3.5a-r2.ebuild
new file mode 100644
index 0000000..18d7c8e
--- /dev/null
+++ b/net-ftp/proftpd/proftpd-1.3.5a-r2.ebuild
@@ -0,0 +1,240 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils multilib systemd
+
+MOD_CASE="0.7"
+MOD_CLAMAV="0.11rc"
+MOD_DISKUSE="0.9"
+MOD_GSS="1.3.3"
+MOD_MSG="0.4.1"
+MOD_VROOT="0.9.3"
+
+DESCRIPTION="An advanced and very configurable FTP server"
+HOMEPAGE="http://www.proftpd.org/
+ http://www.castaglia.org/proftpd/
+ http://www.thrallingpenguin.com/resources/mod_clamav.htm
+ http://gssmod.sourceforge.net/"
+SRC_URI="ftp://ftp.proftpd.org/distrib/source/${P/_/}.tar.gz
+ case? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-case-${MOD_CASE}.tar.gz )
+ clamav? ( https://secure.thrallingpenguin.com/redmine/attachments/download/1/mod_clamav-${MOD_CLAMAV}.tar.gz )
+ diskuse? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-diskuse-${MOD_DISKUSE}.tar.gz )
+ kerberos? ( mirror://sourceforge/gssmod/mod_gss-${MOD_GSS}.tar.gz )
+ msg? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-msg-${MOD_MSG}.tar.gz )
+ vroot? ( https://github.com/Castaglia/${PN}-mod_vroot/archive/mod_vroot-${MOD_VROOT}.tar.gz )"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="acl authfile ban +caps case clamav copy ctrls deflate diskuse doc dso dynmasq exec ifsession ifversion ident ipv6
+ kerberos ldap libressl linguas_bg_BG linguas_en_US linguas_fr_FR linguas_it_IT linguas_ja_JP linguas_ko_KR
+ linguas_ru_RU linguas_zh_CN linguas_zh_TW log_forensic memcache msg mysql ncurses nls pam +pcre postgres qos radius
+ ratio readme rewrite selinux sftp shaper sitemisc snmp softquota sqlite ssl tcpd test trace unique_id vroot xinetd"
+# TODO: geoip
+REQUIRED_USE="ban? ( ctrls )
+ msg? ( ctrls )
+ sftp? ( ssl )
+ shaper? ( ctrls )"
+
+CDEPEND="acl? ( virtual/acl )
+ caps? ( sys-libs/libcap )
+ clamav? ( app-antivirus/clamav )
+ kerberos? ( virtual/krb5 )
+ ldap? ( net-nds/openldap )
+ memcache? ( >=dev-libs/libmemcached-0.41 )
+ mysql? ( virtual/mysql )
+ nls? ( virtual/libiconv )
+ ncurses? ( sys-libs/ncurses:0= )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:= )
+ )
+ pam? ( virtual/pam )
+ pcre? ( dev-libs/libpcre )
+ postgres? ( dev-db/postgresql:= )
+ sqlite? ( dev-db/sqlite:3 )
+ xinetd? ( virtual/inetd )"
+DEPEND="${CDEPEND}
+ test? ( dev-libs/check )"
+RDEPEND="${CDEPEND}
+ net-ftp/ftpbase
+ selinux? ( sec-policy/selinux-ftp )"
+
+S="${WORKDIR}/${P/_/}"
+
+__prepare_module() {
+ local mod_name=$1
+ local mod_topdir=${WORKDIR}/${2:-${mod_name}}
+
+ mv "${mod_topdir}/${mod_name}.c" contrib || die
+ mv "${mod_topdir}/${mod_name}.html" doc/contrib || die
+ rm -r "${mod_topdir}" || die
+}
+
+src_prepare() {
+ epatch -p1 "${FILESDIR}"/${P}-unbound-sftp-{p1,p2}.patch
+
+ # Skip 'install-conf' / Support LINGUAS
+ sed -i -e "/install-all/s/ install-conf//" Makefile.in
+ sed -i -e "s/^LANGS=.*$/LANGS=${LINGUAS}/" locale/Makefile.in
+
+ # Prepare external modules
+ use case && __prepare_module mod_case
+ if use clamav ; then
+ mv "${WORKDIR}"/mod_clamav-${MOD_CLAMAV}/mod_clamav.{c,h} contrib
+ epatch "${WORKDIR}"/mod_clamav-${MOD_CLAMAV}/${PN}.patch
+ rm -r "${WORKDIR}"/mod_clamav-${MOD_CLAMAV}
+ fi
+ use msg && __prepare_module mod_msg
+ use vroot && __prepare_module mod_vroot ${PN}-mod_vroot-mod_vroot-${MOD_VROOT}
+
+ # Prepare external kerberos module
+ if use kerberos ; then
+ cd "${WORKDIR}"/mod_gss-${MOD_GSS}
+
+ # Support app-crypt/heimdal / Gentoo Bug #284853
+ sed -i -e "s/krb5_principal2principalname/_\0/" mod_auth_gss.c.in
+
+ # Remove obsolete DES / Gentoo Bug #324903
+ # Replace 'rpm' lookups / Gentoo Bug #391021
+ sed -i -e "/ac_gss_libs/s/ -ldes425//" \
+ -e "s/ac_libdir=\`rpm -q -l.*$/ac_libdir=\/usr\/$(get_libdir)\//" \
+ -e "s/ac_includedir=\`rpm -q -l.*$/ac_includedir=\/usr\/include\//" configure{,.in}
+ fi
+}
+
+src_configure() {
+ local c m
+
+ use acl && m="${m}:mod_facl"
+ use ban && m="${m}:mod_ban"
+ use case && m="${m}:mod_case"
+ use clamav && m="${m}:mod_clamav"
+ use copy && m="${m}:mod_copy"
+ use ctrls && m="${m}:mod_ctrls_admin"
+ use deflate && m="${m}:mod_deflate"
+ if use diskuse ; then
+ cd "${WORKDIR}"/mod_diskuse
+ econf
+ mv mod_diskuse.{c,h} "${S}"/contrib
+ mv mod_diskuse.html "${S}"/doc/contrib
+ cd "${S}"
+ rm -r "${WORKDIR}"/mod_diskuse
+ m="${m}:mod_diskuse"
+ fi
+ use dynmasq && m="${m}:mod_dynmasq"
+ use exec && m="${m}:mod_exec"
+ use ifsession && m="${m}:mod_ifsession"
+ use ifversion && m="${m}:mod_ifversion"
+ if use kerberos ; then
+ cd "${WORKDIR}"/mod_gss-${MOD_GSS}
+ if has_version app-crypt/mit-krb5 ; then
+ econf --enable-mit
+ else
+ econf --enable-heimdal
+ fi
+ mv mod_{auth_gss,gss}.c "${S}"/contrib
+ mv mod_gss.h "${S}"/include
+ mv README.mod_{auth_gss,gss} "${S}"
+ mv mod_gss.html "${S}"/doc/contrib
+ mv rfc{1509,2228}.txt "${S}"/doc/rfc
+ cd "${S}"
+ rm -r "${WORKDIR}"/mod_gss-${MOD_GSS}
+ m="${m}:mod_gss:mod_auth_gss"
+ fi
+ use ldap && m="${m}:mod_ldap"
+ use log_forensic && m="${m}:mod_log_forensic"
+ use msg && m="${m}:mod_msg"
+ if use mysql || use postgres || use sqlite ; then
+ m="${m}:mod_sql:mod_sql_passwd"
+ use mysql && m="${m}:mod_sql_mysql"
+ use postgres && m="${m}:mod_sql_postgres"
+ use sqlite && m="${m}:mod_sql_sqlite"
+ fi
+ use qos && m="${m}:mod_qos"
+ use radius && m="${m}:mod_radius"
+ use ratio && m="${m}:mod_ratio"
+ use readme && m="${m}:mod_readme"
+ use rewrite && m="${m}:mod_rewrite"
+ if use sftp ; then
+ m="${m}:mod_sftp"
+ use pam && m="${m}:mod_sftp_pam"
+ use mysql || use postgres || use sqlite && m="${m}:mod_sftp_sql"
+ fi
+ use shaper && m="${m}:mod_shaper"
+ use sitemisc && m="${m}:mod_site_misc"
+ use snmp && m="${m}:mod_snmp"
+ if use softquota ; then
+ m="${m}:mod_quotatab:mod_quotatab_file"
+ use ldap && m="${m}:mod_quotatab_ldap"
+ use radius && m="${m}:mod_quotatab_radius"
+ use mysql || use postgres || use sqlite && m="${m}:mod_quotatab_sql"
+ fi
+ if use ssl ; then
+ m="${m}:mod_tls:mod_tls_shmcache"
+ use memcache && m="${m}:mod_tls_memcache"
+ fi
+ if use tcpd ; then
+ m="${m}:mod_wrap2:mod_wrap2_file"
+ use mysql || use postgres || use sqlite && m="${m}:mod_wrap2_sql"
+ fi
+ use unique_id && m="${m}:mod_unique_id"
+ use vroot && m="${m}:mod_vroot"
+
+ if [[ -n ${PROFTP_CUSTOM_MODULES} ]]; then
+ einfo "Adding user-specified extra modules: '${PROFTP_CUSTOM_MODULES}'"
+ m="${m}:${PROFTP_CUSTOM_MODULES}"
+ fi
+
+ [[ -z ${m} ]] || c="${c} --with-modules=${m:1}"
+ econf --localstatedir=/var/run/proftpd --sysconfdir=/etc/proftpd --disable-strip \
+ $(use_enable acl facl) \
+ $(use_enable authfile auth-file) \
+ $(use_enable caps cap) \
+ $(use_enable ctrls) \
+ $(use_enable dso) \
+ $(use_enable ident) \
+ $(use_enable ipv6) \
+ $(use_enable memcache) \
+ $(use_enable ncurses) \
+ $(use_enable nls) \
+ $(use_enable ssl openssl) \
+ $(use_enable pam auth-pam) \
+ $(use_enable pcre) \
+ $(use_enable test tests) \
+ $(use_enable trace) \
+ $(use_enable userland_GNU shadow) \
+ $(use_enable userland_GNU autoshadow) \
+ ${c:1}
+}
+
+src_test() {
+ emake api-tests -C tests
+}
+
+src_install() {
+ default
+ [[ -z ${LINGUAS} ]] && rm -r "${ED}"/usr/share/locale
+ rm -rf "${ED}"/var/run
+
+ newinitd "${FILESDIR}"/proftpd.initd proftpd
+ insinto /etc/proftpd
+ doins "${FILESDIR}"/proftpd.conf.sample
+
+ if use xinetd ; then
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/proftpd.xinetd proftpd
+ fi
+
+ dodoc ChangeLog CREDITS INSTALL NEWS README* RELEASE_NOTES
+ if use doc ; then
+ dohtml doc/*.html doc/contrib/*.html doc/howto/*.html doc/modules/*.html
+ docinto rfc
+ dodoc doc/rfc/*.txt
+ fi
+
+ systemd_dounit "${FILESDIR}"/${PN}.service
+ systemd_newtmpfilesd "${FILESDIR}"/${PN}-tmpfiles.d.conf ${PN}.conf
+}
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-ftp/proftpd/files/, net-ftp/proftpd/
@ 2017-03-26 21:29 Sergei Trofimovich
0 siblings, 0 replies; 11+ messages in thread
From: Sergei Trofimovich @ 2017-03-26 21:29 UTC (permalink / raw
To: gentoo-commits
commit: fba48bedb74f80376bb3a6761a052244350f4fd8
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 26 21:29:22 2017 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Mar 26 21:29:33 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fba48bed
net-ftp/proftpd: bump up to 1.3.6_rc4
In https://bugs.gentoo.org/612664 Yuri Mamaev reports
a crash in mod_sftp.
There was a few fixes upstream since.
Package-Manager: Portage-2.3.5, Repoman-2.3.2
net-ftp/proftpd/Manifest | 1 +
.../proftpd-1.3.6_rc4-diskuse-refresh-api.patch | 17 ++
.../files/proftpd-1.3.6_rc4-gss-refresh-api.patch | 60 +++++
.../files/proftpd-1.3.6_rc4-msg-refresh-api.patch | 29 +++
.../files/proftpd-1.3.6_rc4-open-tests.patch | 24 ++
.../proftpd-1.3.6_rc4-vroot-refresh-api.patch | 23 ++
net-ftp/proftpd/proftpd-1.3.6_rc4.ebuild | 256 +++++++++++++++++++++
7 files changed, 410 insertions(+)
diff --git a/net-ftp/proftpd/Manifest b/net-ftp/proftpd/Manifest
index 60dbe847afd..5f1425799a4 100644
--- a/net-ftp/proftpd/Manifest
+++ b/net-ftp/proftpd/Manifest
@@ -5,6 +5,7 @@ DIST mod_vroot-0.9.3.tar.gz 28352 SHA256 f16c61ed7fe2d7231e1421f8f1a484f29972e0e
DIST mod_vroot-0.9.4.tar.gz 29461 SHA256 80c82c18639909a3b5219cbb76363584c0eb311535de38adb5d9040a9b12bde8 SHA512 f5de392c9fe39f0a03b0783a7092bbfe17ea6db991f4b4e4a2d8f092f073d27ef2c64dd6484d5665b5abc808c0caba016d4fc3fab3da3810f5ebe5249bb4cbce WHIRLPOOL a3e086812e270d96dd659bbb1c3afb7e84adfe8db525adb08ecaabe02afb972032b413b8e16e2a26a8d99f2a599a3901010a6d1201c964164559aacf6105dc2a
DIST proftpd-1.3.5b.tar.gz 29992107 SHA256 afc1789f2478acf88dfdc7d70da90a4fa2786d628218e9574273295d044b4fc8 SHA512 5bdb9718c85c26b92256d7b3791a6a5456bec3826801b7b68f4d493d202ac77179c8378ad06efc1a805efce639db266561d3beb4bc7af61ca1352fb4bdfd4e6a WHIRLPOOL bb1a9fef464d2070c7dc1204cf2a8682e4f2719d682b0b1e541fff11f5c8a4a9a133011a607831fd30548b201531c3534248ed0eb36d0b4708e7b5b75353fc6f
DIST proftpd-1.3.5d.tar.gz 29966560 SHA256 f4e2997be7f22a5b31d7ac72497ed4f4471d24d32385978350410713e76129ac SHA512 3297ddd1f11d46123bbe46488d75fa7a6dcdf2c2d6e7e880a78a427f9f1e9901878dab179e41092e0b9864a615d8ba0b0bf444d4f829870e993e3169c7141c37 WHIRLPOOL d20c43368ad9d3e79e4e7a7590a808974ad4059592f183a325aa05650ee4c4d874b6fe2723c289678df84eb5be4d4888b6a523abd1e0c6a8817333daa12af463
+DIST proftpd-1.3.6rc4.tar.gz 20164575 SHA256 868893e71c4ee8d5855520bda56b6a85ff0c5d786d8b965a28d52d740ba5da52 SHA512 16f7483fcc5b7969e468d48ee65845bf0c14353658fca55752b68137c0d0dc7f2c2dd0e9ef8e360793f232b85af0094e4c83d96a14a16061b68dfc7cee3b691c WHIRLPOOL e44e17001a8f53ad8ea7abd692dfa39913450a79a318db4a22dad8493576eef72601e82e7ce3027f0d58d3b56cd38ce95807bf3b47fb924cd869cb6804500595
DIST proftpd-mod-case-0.7.tar.gz 13184 SHA256 c3f65588250fea7771439933fa754927794f664e99b8d20f99b1e400fea62111 SHA512 c08d13ef82fec36ae75aa3213dd02e0ce4045904849f422e152f039a9da66a45e4423751074b8bcf8ce347a40ce0e7bde798a85cbadc962fd872aeaa898261fc WHIRLPOOL 27f49e9f34099c081add803aa679fd9abe7afa652dffe5d8e42889fef49aeaefd499e1009fc564d6c8f882b3c6dc31d4c6dd08cc06a42b770e7ef76a2ebfcf8a
DIST proftpd-mod-diskuse-0.9.tar.gz 18596 SHA256 424f3fd49237245ec176d27ade0965fe21a0db1d645979d5ae3e55497e3da036 SHA512 d41976bf2810e4b783e775e8c767ca2030c3b5df116219fd31cbbac7feaf9922c315bf4ea092881b0d6cf43f2f4c5dbcae61be3c3a833058d12f962a3024b975 WHIRLPOOL aabd1dc23d6c38d308e859ff778beffd0dabfe70d3530c093cf2f95e80b5e9c94b97b6b5ae5109d031f76ff94dffc3822a7aa60fa30df04523d37ebed99730d6
DIST proftpd-mod-msg-0.4.1.tar.gz 8082 SHA256 255b79d31dc509ffad5d0fbcd469f833a8481e880aa962910c2bc8aa608ca6da SHA512 38ea63b1d355e1e10a6a4477596bf3fa28529a871c9fb8dbf093b5317f0743ef9cb59b986d0b8c1c7ed932dad5d5d571883d596fad2d3b793431824db4487012 WHIRLPOOL ff907e26a354f53231fed94515eb60050dec77118be6f49147e0eb8b79e50c9d73354618bca19d98d32a3fb79d7ba87507cc6c8b269f259c5fcf23d44ad3a906
diff --git a/net-ftp/proftpd/files/proftpd-1.3.6_rc4-diskuse-refresh-api.patch b/net-ftp/proftpd/files/proftpd-1.3.6_rc4-diskuse-refresh-api.patch
new file mode 100644
index 00000000000..34f1d95ebee
--- /dev/null
+++ b/net-ftp/proftpd/files/proftpd-1.3.6_rc4-diskuse-refresh-api.patch
@@ -0,0 +1,17 @@
+diff --git a/mod_diskuse.c b/mod_diskuse.c
+index 0e0a0d0..7eb5edf 100644
+--- a/mod_diskuse.c
++++ b/mod_diskuse.c
+@@ -53,6 +53,12 @@
+
+ #define MOD_DISKUSE_VERSION "mod_diskuse/0.9"
+
++#define pr_parse_expression pr_expr_create
++#define pr_class_or_expression pr_expr_eval_class_or
++#define pr_group_and_expression pr_expr_eval_group_and
++#define pr_group_or_expression pr_expr_eval_group_or
++#define pr_user_or_expression pr_expr_eval_user_or
++
+ static unsigned char have_max_diskuse = FALSE;
+ static double min_diskfree = 0.0;
+ static double current_diskfree = 0.0;
diff --git a/net-ftp/proftpd/files/proftpd-1.3.6_rc4-gss-refresh-api.patch b/net-ftp/proftpd/files/proftpd-1.3.6_rc4-gss-refresh-api.patch
new file mode 100644
index 00000000000..43cc659e47d
--- /dev/null
+++ b/net-ftp/proftpd/files/proftpd-1.3.6_rc4-gss-refresh-api.patch
@@ -0,0 +1,60 @@
+diff --git a/mod_auth_gss.c.in b/mod_auth_gss.c.in
+index 6228b4d..3569ebb 100644
+--- a/mod_auth_gss.c.in
++++ b/mod_auth_gss.c.in
+@@ -38,6 +38,10 @@
+ */
+
+ #include "mod_gss.h"
++
++#define DECLINED PR_DECLINED
++#define ERROR_INT PR_ERROR_INT
++
+ extern unsigned char gss_engine;
+ extern unsigned long gss_flags;
+ extern int gss_logfd;
+diff --git a/mod_gss.c.in b/mod_gss.c.in
+index 9d2d4c8..83a4019 100644
+--- a/mod_gss.c.in
++++ b/mod_gss.c.in
+@@ -57,6 +57,13 @@
+
+ #include "mod_gss.h"
+
++#define LOG_SYMLINK PR_LOG_SYMLINK
++#define LOG_WRITEABLE_DIR PR_LOG_WRITABLE_DIR
++#define HANDLED PR_HANDLED
++#define ERROR PR_ERROR
++#define DECLINED PR_DECLINED
++#define ERROR_INT PR_ERROR_INT
++
+ module gss_module;
+
+ /* Module variables maybe used externaly */
+@@ -1395,7 +1402,7 @@ MODRET gss_auth(cmd_rec *cmd) {
+
+ /* Convert the parameter to upper case */
+ for (i = 0; i < strlen(cmd->argv[1]); i++)
+- (cmd->argv[1])[i] = toupper((cmd->argv[1])[i]);
++ ((char*)cmd->argv[1])[i] = toupper(((char*)cmd->argv[1])[i]);
+
+ if (!strcmp(cmd->argv[1], "GSSAPI")) {
+ pr_response_send(R_334, "Using authentication type %s; ADAT must follow", cmd->argv[1]);
+@@ -2014,7 +2021,7 @@ MODRET gss_prot(cmd_rec *cmd) {
+
+ /* Convert the parameter to upper case */
+ for (i = 0; i < strlen(cmd->argv[1]); i++)
+- (cmd->argv[1])[i] = toupper((cmd->argv[1])[i]);
++ ((char*)cmd->argv[1])[i] = toupper(((char*)cmd->argv[1])[i]);
+
+ /* Only PROT S , PROT C or PROT P is valid with respect to GSS. */
+ if (!strcmp(cmd->argv[1], "C")) {
+@@ -2098,7 +2105,7 @@ MODRET set_gsskeytab(cmd_rec *cmd) {
+ if (!file_exists(cmd->argv[1]))
+ CONF_ERROR(cmd, "file does not exist");
+
+- if (*cmd->argv[1] != '/')
++ if (((char*)(*cmd->argv))[1] != '/')
+ CONF_ERROR(cmd, "parameter must be an absolute path");
+
+ add_config_param_str(cmd->argv[0], 1, cmd->argv[1]);
diff --git a/net-ftp/proftpd/files/proftpd-1.3.6_rc4-msg-refresh-api.patch b/net-ftp/proftpd/files/proftpd-1.3.6_rc4-msg-refresh-api.patch
new file mode 100644
index 00000000000..2e90be254cb
--- /dev/null
+++ b/net-ftp/proftpd/files/proftpd-1.3.6_rc4-msg-refresh-api.patch
@@ -0,0 +1,29 @@
+diff --git a/mod_msg.c b/mod_msg.c
+index 70bce69..4ce6bd7 100644
+--- a/mod_msg.c
++++ b/mod_msg.c
+@@ -52,10 +52,14 @@ extern pid_t mpid;
+
+ module msg_module;
+
+-#ifndef USE_CTRLS
++#ifndef PR_USE_CTRLS
+ # error "mod_msg requires Controls support (--enable-ctrls)"
+ #endif /* USE_CTRLS */
+
++#define pr_scoreboard_read_entry pr_scoreboard_entry_read
++#define DECLINED PR_DECLINED
++#define HANDLED PR_HANDLED
++
+ static ctrls_acttab_t msg_acttab[];
+
+ static int msg_engine = FALSE;
+@@ -709,7 +713,7 @@ static int msg_handle_msg(pr_ctrls_t *ctrl, int reqargc, char **reqargv) {
+ if (msg_send_msg(score->sce_pid, msgstr) < 0) {
+ msg_errno = errno;
+ (void) pr_log_writefile(msg_logfd, MOD_MSG_VERSION,
+- "error sending message to all (pid %u): %s", reqargv[1],
++ "error sending message to all (pid %u): %s",
+ score->sce_pid, strerror(errno));
+
+ } else
diff --git a/net-ftp/proftpd/files/proftpd-1.3.6_rc4-open-tests.patch b/net-ftp/proftpd/files/proftpd-1.3.6_rc4-open-tests.patch
new file mode 100644
index 00000000000..f65a2cc3fbb
--- /dev/null
+++ b/net-ftp/proftpd/files/proftpd-1.3.6_rc4-open-tests.patch
@@ -0,0 +1,24 @@
+gcc-6.3 + glibc-2.25 now can detect 2-argument open that is supposed to created new files.
+diff --git a/tests/api/fsio.c b/tests/api/fsio.c
+index 2041f43..18d173b 100644
+--- a/tests/api/fsio.c
++++ b/tests/api/fsio.c
+@@ -1058,3 +1058,3 @@ START_TEST (fsio_sys_access_file_test) {
+ /* Make the file to check; we want it to have perms 664.*/
+- fd = open(fsio_test_path, O_CREAT|O_EXCL|O_WRONLY);
++ fd = open(fsio_test_path, O_CREAT|O_EXCL|O_WRONLY, S_IRUSR | S_IWUSR);
+ fail_if(fd < 0, "Unable to create file '%s': %s", fsio_test_path,
+diff --git a/tests/api/scoreboard.c b/tests/api/scoreboard.c
+index f0ffdbc..f26d833 100644
+--- a/tests/api/scoreboard.c
++++ b/tests/api/scoreboard.c
+@@ -267,3 +267,3 @@ START_TEST (scoreboard_lock_test) {
+
+- fd = open(test_file2, O_CREAT|O_EXCL|O_RDWR);
++ fd = open(test_file2, O_CREAT|O_EXCL|O_RDWR, S_IRUSR | S_IWUSR);
+ fail_unless(fd >= 0, "Failed to open '%s': %s", test_file2, strerror(errno));
+@@ -911,3 +911,3 @@ START_TEST (scoreboard_entry_lock_test) {
+
+- fd = open(test_file2, O_CREAT|O_EXCL|O_RDWR);
++ fd = open(test_file2, O_CREAT|O_EXCL|O_RDWR, S_IRUSR | S_IWUSR);
+ fail_unless(fd >= 0, "Failed to open '%s': %s", test_file2, strerror(errno));
diff --git a/net-ftp/proftpd/files/proftpd-1.3.6_rc4-vroot-refresh-api.patch b/net-ftp/proftpd/files/proftpd-1.3.6_rc4-vroot-refresh-api.patch
new file mode 100644
index 00000000000..59b96ce9002
--- /dev/null
+++ b/net-ftp/proftpd/files/proftpd-1.3.6_rc4-vroot-refresh-api.patch
@@ -0,0 +1,23 @@
+diff --git a/mod_vroot.c b/mod_vroot.c
+index b0ce59a..db0df35 100644
+--- a/mod_vroot.c
++++ b/mod_vroot.c
+@@ -1515,7 +1515,7 @@ MODRET set_vrootserverroot(cmd_rec *cmd) {
+ */
+
+ pathlen = strlen(cmd->argv[1]);
+- if (cmd->argv[1][pathlen - 1] != '/') {
++ if (((char*)cmd->argv[1])[pathlen - 1] != '/') {
+ c->argv[0] = pstrcat(c->pool, cmd->argv[1], "/", NULL);
+
+ } else {
+@@ -1648,7 +1648,9 @@ MODRET vroot_pre_pass(cmd_rec *cmd) {
+ fs->rename = vroot_rename;
+ fs->unlink = vroot_unlink;
+ fs->open = vroot_open;
++#if ! PROFTPD_VERSION_NUMBER >= 0x0001030604
+ fs->creat = vroot_creat;
++#endif /* before ProFTPD 1.3.6_rc4 */
+ fs->link = vroot_link;
+ fs->readlink = vroot_readlink;
+ fs->symlink = vroot_symlink;
diff --git a/net-ftp/proftpd/proftpd-1.3.6_rc4.ebuild b/net-ftp/proftpd/proftpd-1.3.6_rc4.ebuild
new file mode 100644
index 00000000000..9adafec9c77
--- /dev/null
+++ b/net-ftp/proftpd/proftpd-1.3.6_rc4.ebuild
@@ -0,0 +1,256 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit multilib systemd
+
+MOD_CASE="0.7"
+MOD_CLAMAV="0.11rc"
+MOD_DISKUSE="0.9"
+MOD_GSS="1.3.6"
+MOD_MSG="0.4.1"
+MOD_VROOT="0.9.4"
+
+DESCRIPTION="An advanced and very configurable FTP server"
+HOMEPAGE="http://www.proftpd.org/
+ http://www.castaglia.org/proftpd/
+ http://www.thrallingpenguin.com/resources/mod_clamav.htm
+ http://gssmod.sourceforge.net/"
+SRC_URI="ftp://ftp.proftpd.org/distrib/source/${P/_/}.tar.gz
+ case? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-case-${MOD_CASE}.tar.gz )
+ clamav? ( https://secure.thrallingpenguin.com/redmine/attachments/download/1/mod_clamav-${MOD_CLAMAV}.tar.gz )
+ diskuse? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-diskuse-${MOD_DISKUSE}.tar.gz )
+ kerberos? ( mirror://sourceforge/gssmod/mod_gss-${MOD_GSS}.tar.gz )
+ msg? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-msg-${MOD_MSG}.tar.gz )
+ vroot? ( https://github.com/Castaglia/${PN}-mod_vroot/archive/v${MOD_VROOT}.tar.gz -> mod_vroot-${MOD_VROOT}.tar.gz )"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="acl authfile ban +caps case clamav copy ctrls deflate diskuse doc dso dynmasq exec ifsession ifversion ident ipv6
+ kerberos ldap libressl linguas_bg_BG linguas_en_US linguas_fr_FR linguas_it_IT linguas_ja_JP linguas_ko_KR
+ linguas_ru_RU linguas_zh_CN linguas_zh_TW log_forensic memcache msg mysql ncurses nls pam +pcre postgres qos radius
+ ratio readme rewrite selinux sftp shaper sitemisc snmp softquota sqlite ssl tcpd test trace unique_id vroot xinetd"
+# TODO: geoip
+REQUIRED_USE="ban? ( ctrls )
+ msg? ( ctrls )
+ sftp? ( ssl )
+ shaper? ( ctrls )"
+
+CDEPEND="acl? ( virtual/acl )
+ caps? ( sys-libs/libcap )
+ clamav? ( app-antivirus/clamav )
+ kerberos? ( virtual/krb5 )
+ ldap? ( net-nds/openldap )
+ memcache? ( >=dev-libs/libmemcached-0.41 )
+ mysql? ( virtual/mysql )
+ nls? ( virtual/libiconv )
+ ncurses? ( sys-libs/ncurses:0= )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:= )
+ )
+ pam? ( virtual/pam )
+ pcre? ( dev-libs/libpcre )
+ postgres? ( dev-db/postgresql:= )
+ sqlite? ( dev-db/sqlite:3 )
+ xinetd? ( virtual/inetd )"
+DEPEND="${CDEPEND}
+ test? ( dev-libs/check )"
+RDEPEND="${CDEPEND}
+ net-ftp/ftpbase
+ selinux? ( sec-policy/selinux-ftp )"
+
+S="${WORKDIR}/${P/_/}"
+
+PATCHES=("${FILESDIR}"/${PN}-1.3.6_rc4-open-tests.patch)
+
+in_dir() {
+ pushd "${WORKDIR}/${1}" || die
+ shift
+ "$@"
+ popd
+}
+
+src_prepare() {
+ # Skip 'install-conf' / Support LINGUAS
+ sed -i -e "/install-all/s/ install-conf//" Makefile.in || die
+ sed -i -e "s/^LANGS=.*$/LANGS=${LINGUAS}/" locale/Makefile.in || die
+
+ # Prepare external modules
+ if use case; then
+ cp -v "${WORKDIR}"/mod_case/mod_case.c contrib || die
+ cp -v "${WORKDIR}"/mod_case/mod_case.html doc/contrib || die
+ fi
+
+ if use clamav ; then
+ cp -v "${WORKDIR}"/mod_clamav-${MOD_CLAMAV}/mod_clamav.{c,h} contrib || die
+ eapply "${WORKDIR}"/mod_clamav-${MOD_CLAMAV}/${PN}.patch
+ fi
+
+ if use diskuse; then
+ in_dir mod_diskuse eapply "${FILESDIR}"/${PN}-1.3.6_rc4-diskuse-refresh-api.patch
+
+ # ./configure will modify files. Symlink them instead of copying
+ ln -sv "${WORKDIR}"/mod_diskuse/mod_diskuse.h "${S}"/contrib || die
+
+ cp -v "${WORKDIR}"/mod_diskuse/mod_diskuse.c "${S}"/contrib || die
+ cp -v "${WORKDIR}"/mod_diskuse/mod_diskuse.html "${S}"/doc/contrib || die
+ fi
+
+ if use msg; then
+ in_dir mod_msg eapply "${FILESDIR}"/${PN}-1.3.6_rc4-msg-refresh-api.patch
+
+ cp -v "${WORKDIR}"/mod_msg/mod_msg.c contrib || die
+ cp -v "${WORKDIR}"/mod_msg/mod_msg.html doc/contrib || die
+ fi
+
+ if use vroot; then
+ in_dir ${PN}-mod_vroot-${MOD_VROOT} eapply "${FILESDIR}"/${PN}-1.3.6_rc4-vroot-refresh-api.patch
+
+ cp -v "${WORKDIR}"/${PN}-mod_vroot-${MOD_VROOT}/mod_vroot.c contrib || die
+ cp -v "${WORKDIR}"/${PN}-mod_vroot-${MOD_VROOT}/mod_vroot.html doc/contrib || die
+ fi
+
+ if use kerberos ; then
+ in_dir mod_gss-${MOD_GSS} eapply "${FILESDIR}"/${PN}-1.3.6_rc4-gss-refresh-api.patch
+
+ # Support app-crypt/heimdal / Gentoo Bug #284853
+ sed -i -e "s/krb5_principal2principalname/_\0/" "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_auth_gss.c.in || die
+
+ # Remove obsolete DES / Gentoo Bug #324903
+ # Replace 'rpm' lookups / Gentoo Bug #391021
+ sed -i -e "/ac_gss_libs/s/ -ldes425//" \
+ -e "s/ac_libdir=\`rpm -q -l.*$/ac_libdir=\/usr\/$(get_libdir)\//" \
+ -e "s/ac_includedir=\`rpm -q -l.*$/ac_includedir=\/usr\/include\//" "${WORKDIR}"/mod_gss-${MOD_GSS}/configure{,.in} || die
+
+ # ./configure will modify files. Symlink them instead of copying
+ ln -sv "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_auth_gss.c "${S}"/contrib || die
+ ln -sv "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_gss.c "${S}"/contrib || die
+ ln -sv "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_gss.h "${S}"/include || die
+
+ cp -v "${WORKDIR}"/mod_gss-${MOD_GSS}/README.mod_{auth_gss,gss} "${S}" || die
+ cp -v "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_gss.html "${S}"/doc/contrib || die
+ cp -v "${WORKDIR}"/mod_gss-${MOD_GSS}/rfc{1509,2228}.txt "${S}"/doc/rfc || die
+ fi
+
+ default
+}
+
+src_configure() {
+ local c m
+
+ use acl && m="${m}:mod_facl"
+ use ban && m="${m}:mod_ban"
+ use case && m="${m}:mod_case"
+ use clamav && m="${m}:mod_clamav"
+ use copy && m="${m}:mod_copy"
+ use ctrls && m="${m}:mod_ctrls_admin"
+ use deflate && m="${m}:mod_deflate"
+ if use diskuse ; then
+ in_dir mod_diskuse econf
+ m="${m}:mod_diskuse"
+ fi
+ use dynmasq && m="${m}:mod_dynmasq"
+ use exec && m="${m}:mod_exec"
+ use ifsession && m="${m}:mod_ifsession"
+ use ifversion && m="${m}:mod_ifversion"
+ if use kerberos ; then
+ in_dir mod_gss-${MOD_GSS} econf
+ m="${m}:mod_gss:mod_auth_gss"
+ fi
+ use ldap && m="${m}:mod_ldap"
+ use log_forensic && m="${m}:mod_log_forensic"
+ use msg && m="${m}:mod_msg"
+ if use mysql || use postgres || use sqlite ; then
+ m="${m}:mod_sql:mod_sql_passwd"
+ use mysql && m="${m}:mod_sql_mysql"
+ use postgres && m="${m}:mod_sql_postgres"
+ use sqlite && m="${m}:mod_sql_sqlite"
+ fi
+ use qos && m="${m}:mod_qos"
+ use radius && m="${m}:mod_radius"
+ use ratio && m="${m}:mod_ratio"
+ use readme && m="${m}:mod_readme"
+ use rewrite && m="${m}:mod_rewrite"
+ if use sftp ; then
+ m="${m}:mod_sftp"
+ use pam && m="${m}:mod_sftp_pam"
+ use mysql || use postgres || use sqlite && m="${m}:mod_sftp_sql"
+ fi
+ use shaper && m="${m}:mod_shaper"
+ use sitemisc && m="${m}:mod_site_misc"
+ use snmp && m="${m}:mod_snmp"
+ if use softquota ; then
+ m="${m}:mod_quotatab:mod_quotatab_file"
+ use ldap && m="${m}:mod_quotatab_ldap"
+ use radius && m="${m}:mod_quotatab_radius"
+ use mysql || use postgres || use sqlite && m="${m}:mod_quotatab_sql"
+ fi
+ if use ssl ; then
+ m="${m}:mod_tls:mod_tls_shmcache"
+ use memcache && m="${m}:mod_tls_memcache"
+ fi
+ if use tcpd ; then
+ m="${m}:mod_wrap2:mod_wrap2_file"
+ use mysql || use postgres || use sqlite && m="${m}:mod_wrap2_sql"
+ fi
+ use unique_id && m="${m}:mod_unique_id"
+ use vroot && m="${m}:mod_vroot"
+
+ if [[ -n ${PROFTP_CUSTOM_MODULES} ]]; then
+ einfo "Adding user-specified extra modules: '${PROFTP_CUSTOM_MODULES}'"
+ m="${m}:${PROFTP_CUSTOM_MODULES}"
+ fi
+
+ [[ -z ${m} ]] || c="${c} --with-modules=${m:1}"
+
+ econf --localstatedir=/var/run/proftpd --sysconfdir=/etc/proftpd --disable-strip \
+ $(use_enable acl facl) \
+ $(use_enable authfile auth-file) \
+ $(use_enable caps cap) \
+ $(use_enable ctrls) \
+ $(use_enable dso) \
+ $(use_enable ident) \
+ $(use_enable ipv6) \
+ $(use_enable memcache) \
+ $(use_enable ncurses) \
+ $(use_enable nls) \
+ $(use_enable ssl openssl) \
+ $(use_enable pam auth-pam) \
+ $(use_enable pcre) \
+ $(use_enable test tests) \
+ $(use_enable trace) \
+ $(use_enable userland_GNU shadow) \
+ $(use_enable userland_GNU autoshadow) \
+ ${c:1}
+}
+
+src_test() {
+ emake api-tests -C tests
+}
+
+src_install() {
+ default
+ [[ -z ${LINGUAS} ]] && rm -r "${ED}"/usr/share/locale
+ rm -rf "${ED}"/var/run
+
+ newinitd "${FILESDIR}"/proftpd.initd proftpd
+ insinto /etc/proftpd
+ doins "${FILESDIR}"/proftpd.conf.sample
+
+ if use xinetd ; then
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/proftpd.xinetd proftpd
+ fi
+
+ dodoc ChangeLog CREDITS INSTALL NEWS README* RELEASE_NOTES
+ if use doc ; then
+ dohtml doc/*.html doc/contrib/*.html doc/howto/*.html doc/modules/*.html
+ docinto rfc
+ dodoc doc/rfc/*.txt
+ fi
+
+ systemd_dounit "${FILESDIR}"/${PN}.service
+ systemd_newtmpfilesd "${FILESDIR}"/${PN}-tmpfiles.d.conf ${PN}.conf
+}
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-ftp/proftpd/files/, net-ftp/proftpd/
@ 2019-08-19 7:43 Sergei Trofimovich
0 siblings, 0 replies; 11+ messages in thread
From: Sergei Trofimovich @ 2019-08-19 7:43 UTC (permalink / raw
To: gentoo-commits
commit: 43eb094f5dfa9abe3c8860eb7f4e1aae7f18dea5
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 19 07:43:33 2019 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Mon Aug 19 07:43:49 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=43eb094f
net-ftp/proftpd: tweak for mysql-8, bug #692434
mysql-8 dropped my_bool in favoud or bool from <stdbool.h>.
Bug: https://bugs.mysql.com/bug.php?id=85131
Bug: https://github.com/proftpd/proftpd/issues/824
Reported-by: Toralf Förster
Closes: https://bugs.gentoo.org/692434
Package-Manager: Portage-2.3.71, Repoman-2.3.17
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
net-ftp/proftpd/files/proftpd-1.3.6-mysql-8.patch | 24 +++++++++++++++++++++++
net-ftp/proftpd/proftpd-1.3.6-r5.ebuild | 1 +
2 files changed, 25 insertions(+)
diff --git a/net-ftp/proftpd/files/proftpd-1.3.6-mysql-8.patch b/net-ftp/proftpd/files/proftpd-1.3.6-mysql-8.patch
new file mode 100644
index 00000000000..4149a654059
--- /dev/null
+++ b/net-ftp/proftpd/files/proftpd-1.3.6-mysql-8.patch
@@ -0,0 +1,24 @@
+https://bugs.gentoo.org/692434
+https://github.com/proftpd/proftpd/issues/824
+--- a/contrib/mod_sql_mysql.c
++++ b/contrib/mod_sql_mysql.c
+@@ -132,6 +132,7 @@
+ #include "../contrib/mod_sql.h"
+
+ #include <mysql.h>
++#include <stdbool.h>
+
+ /* The my_make_scrambled_password{,_323} functions are not part of the public
+ * MySQL API and are not declared in any of the MySQL header files. But the
+@@ -495,7 +495,11 @@ MODRET cmd_open(cmd_rec *cmd) {
+ * http://dev.mysql.com/doc/refman/5.0/en/auto-reconnect.html
+ */
+ if (!(pr_sql_opts & SQL_OPT_NO_RECONNECT)) {
++#if MYSQL_VERSION_ID >= 80000
++ bool reconnect = true;
++#else
+ my_bool reconnect = TRUE;
++#endif
+ mysql_options(conn->mysql, MYSQL_OPT_RECONNECT, &reconnect);
+ }
+ #endif
diff --git a/net-ftp/proftpd/proftpd-1.3.6-r5.ebuild b/net-ftp/proftpd/proftpd-1.3.6-r5.ebuild
index c3a8e165e6f..9fef53a6a6c 100644
--- a/net-ftp/proftpd/proftpd-1.3.6-r5.ebuild
+++ b/net-ftp/proftpd/proftpd-1.3.6-r5.ebuild
@@ -72,6 +72,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-1.3.6-use-trace.patch
"${FILESDIR}"/${PN}-1.3.6-sighup-crash.patch
"${FILESDIR}"/${PN}-1.3.6-mod_copy.patch
+ "${FILESDIR}"/${PN}-1.3.6-mysql-8.patch
)
RESTRICT=test # tests corrupt memory. need to be fixed upstream first
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-ftp/proftpd/files/, net-ftp/proftpd/
@ 2019-10-01 22:16 Sergei Trofimovich
0 siblings, 0 replies; 11+ messages in thread
From: Sergei Trofimovich @ 2019-10-01 22:16 UTC (permalink / raw
To: gentoo-commits
commit: b47b227ea3da7aec35ee5db26ccac8b5be543bda
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 1 22:15:22 2019 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Tue Oct 1 22:16:13 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b47b227e
net-ftp/proftpd: backport EINTR/EAGAIN fix, bug #695972
Reported-by: Dennis Lichtenthäler
Closes: https://bugs.gentoo.org/695972
Package-Manager: Portage-2.3.76, Repoman-2.3.17
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
.../files/proftpd-1.3.6-EINTR-like-EAGAIN.patch | 54 ++++
net-ftp/proftpd/proftpd-1.3.6-r6.ebuild | 277 +++++++++++++++++++++
2 files changed, 331 insertions(+)
diff --git a/net-ftp/proftpd/files/proftpd-1.3.6-EINTR-like-EAGAIN.patch b/net-ftp/proftpd/files/proftpd-1.3.6-EINTR-like-EAGAIN.patch
new file mode 100644
index 00000000000..43608d96492
--- /dev/null
+++ b/net-ftp/proftpd/files/proftpd-1.3.6-EINTR-like-EAGAIN.patch
@@ -0,0 +1,54 @@
+https://bugs.gentoo.org/695972
+https://github.com/proftpd/proftpd/commit/f09f0c661621eb22cb1ce579194478007ba62866
+
+From f09f0c661621eb22cb1ce579194478007ba62866 Mon Sep 17 00:00:00 2001
+From: Justin Maggard <jmaggard@netgear.com>
+Date: Tue, 10 Oct 2017 18:20:06 -0700
+Subject: [PATCH] Bug #4319: Treat EINTR like EAGAIN
+
+This bug described a situation where an ongoing transfer would be
+prematurely aborted when one of our timers fired. The timer could have
+fired for an unrelated reason, but if we were in the process of reading
+or writing with pr_netio_read() or pr_netio_write(), those calls would
+be interrupted with errno set to EINTR, and an error would be returned.
+Then pr_data_xfer() would abort the transfer.
+
+EAGAIN was already being handled properly, and we can just use the same
+treatment for EINTR so that we only respond to the timers we should
+actually care about.
+---
+ src/data.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/src/data.c
++++ b/src/data.c
+@@ -1143,7 +1143,7 @@ int pr_data_xfer(char *cl_buf, size_t cl_size) {
+ while (len < 0) {
+ int xerrno = errno;
+
+- if (xerrno == EAGAIN) {
++ if (xerrno == EAGAIN || xerrno == EINTR) {
+ /* Since our socket is in non-blocking mode, read(2) can return
+ * EAGAIN if there is no data yet for us. Handle this by
+ * delaying temporarily, then trying again.
+@@ -1265,7 +1265,7 @@ int pr_data_xfer(char *cl_buf, size_t cl_size) {
+ while (len < 0) {
+ int xerrno = errno;
+
+- if (xerrno == EAGAIN) {
++ if (xerrno == EAGAIN || xerrno == EINTR) {
+ /* Since our socket is in non-blocking mode, read(2) can return
+ * EAGAIN if there is no data yet for us. Handle this by
+ * delaying temporarily, then trying again.
+@@ -1362,7 +1362,7 @@ int pr_data_xfer(char *cl_buf, size_t cl_size) {
+ while (bwrote < 0) {
+ int xerrno = errno;
+
+- if (xerrno == EAGAIN) {
++ if (xerrno == EAGAIN || xerrno == EINTR) {
+ /* Since our socket is in non-blocking mode, write(2) can return
+ * EAGAIN if there is not enough from for our data yet. Handle
+ * this by delaying temporarily, then trying again.
+--
+2.23.0
+
diff --git a/net-ftp/proftpd/proftpd-1.3.6-r6.ebuild b/net-ftp/proftpd/proftpd-1.3.6-r6.ebuild
new file mode 100644
index 00000000000..ca63d580cfc
--- /dev/null
+++ b/net-ftp/proftpd/proftpd-1.3.6-r6.ebuild
@@ -0,0 +1,277 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit multilib systemd tmpfiles
+
+MOD_CASE="0.7"
+MOD_CLAMAV="0.11rc"
+MOD_DISKUSE="0.9"
+MOD_GSS="1.3.6"
+MOD_MSG="0.4.1"
+MOD_VROOT="0.9.4"
+
+DESCRIPTION="An advanced and very configurable FTP server"
+HOMEPAGE="http://www.proftpd.org/
+ http://www.castaglia.org/proftpd/
+ http://www.thrallingpenguin.com/resources/mod_clamav.htm
+ http://gssmod.sourceforge.net/"
+SRC_URI="ftp://ftp.proftpd.org/distrib/source/${P/_/}.tar.gz
+ case? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-case-${MOD_CASE}.tar.gz )
+ clamav? ( https://secure.thrallingpenguin.com/redmine/attachments/download/1/mod_clamav-${MOD_CLAMAV}.tar.gz )
+ diskuse? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-diskuse-${MOD_DISKUSE}.tar.gz )
+ kerberos? ( mirror://sourceforge/gssmod/mod_gss-${MOD_GSS}.tar.gz )
+ msg? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-msg-${MOD_MSG}.tar.gz )
+ vroot? ( https://github.com/Castaglia/${PN}-mod_vroot/archive/v${MOD_VROOT}.tar.gz -> mod_vroot-${MOD_VROOT}.tar.gz )"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="acl authfile ban +caps case clamav copy ctrls deflate diskuse dso dynmasq exec ifsession ifversion ident ipv6
+ kerberos ldap libressl log-forensic memcache msg mysql ncurses nls pam +pcre postgres qos radius
+ ratio readme rewrite selinux sftp shaper sitemisc snmp sodium softquota sqlite ssl tcpd test unique-id vroot"
+# TODO: geoip
+REQUIRED_USE="ban? ( ctrls )
+ msg? ( ctrls )
+ sftp? ( ssl )
+ shaper? ( ctrls )
+
+ mysql? ( ssl )
+ postgres? ( ssl )
+ sqlite? ( ssl )
+"
+
+CDEPEND="acl? ( virtual/acl )
+ caps? ( sys-libs/libcap )
+ clamav? ( app-antivirus/clamav )
+ kerberos? ( virtual/krb5 )
+ ldap? ( net-nds/openldap )
+ memcache? ( >=dev-libs/libmemcached-0.41 )
+ mysql? ( dev-db/mysql-connector-c:0= )
+ nls? ( virtual/libiconv )
+ ncurses? ( sys-libs/ncurses:0= )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:= )
+ )
+ pam? ( virtual/pam )
+ pcre? ( dev-libs/libpcre )
+ postgres? ( dev-db/postgresql:= )
+ sodium? ( dev-libs/libsodium:0= )
+ sqlite? ( dev-db/sqlite:3 )
+"
+DEPEND="${CDEPEND}
+ test? ( dev-libs/check )"
+RDEPEND="${CDEPEND}
+ net-ftp/ftpbase
+ selinux? ( sec-policy/selinux-ftp )"
+
+S="${WORKDIR}/${P/_/}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.3.6-use-trace.patch
+ "${FILESDIR}"/${PN}-1.3.6-sighup-crash.patch
+ "${FILESDIR}"/${PN}-1.3.6-mod_copy.patch
+ "${FILESDIR}"/${PN}-1.3.6-mysql-8.patch
+ "${FILESDIR}"/${PN}-1.3.6-EINTR-like-EAGAIN.patch
+)
+
+RESTRICT=test # tests corrupt memory. need to be fixed upstream first
+
+in_dir() {
+ pushd "${WORKDIR}/${1}" || die
+ shift
+ "$@"
+ popd
+}
+
+src_prepare() {
+ # Skip 'install-conf' / Support LINGUAS
+ sed -i -e "/install-all/s/ install-conf//" Makefile.in || die
+ sed -i -e "s/^LANGS=.*$/LANGS=${LINGUAS}/" locale/Makefile.in || die
+
+ # Prepare external modules
+ if use case; then
+ cp -v "${WORKDIR}"/mod_case/mod_case.c contrib || die
+ cp -v "${WORKDIR}"/mod_case/mod_case.html doc/contrib || die
+ fi
+
+ if use clamav ; then
+ cp -v "${WORKDIR}"/mod_clamav-${MOD_CLAMAV}/mod_clamav.{c,h} contrib || die
+ eapply "${WORKDIR}"/mod_clamav-${MOD_CLAMAV}/${PN}.patch
+ fi
+
+ if use diskuse; then
+ in_dir mod_diskuse eapply "${FILESDIR}"/${PN}-1.3.6_rc4-diskuse-refresh-api.patch
+
+ # ./configure will modify files. Symlink them instead of copying
+ ln -sv "${WORKDIR}"/mod_diskuse/mod_diskuse.h "${S}"/contrib || die
+
+ cp -v "${WORKDIR}"/mod_diskuse/mod_diskuse.c "${S}"/contrib || die
+ cp -v "${WORKDIR}"/mod_diskuse/mod_diskuse.html "${S}"/doc/contrib || die
+ fi
+
+ if use msg; then
+ in_dir mod_msg eapply "${FILESDIR}"/${PN}-1.3.6_rc4-msg-refresh-api.patch
+
+ cp -v "${WORKDIR}"/mod_msg/mod_msg.c contrib || die
+ cp -v "${WORKDIR}"/mod_msg/mod_msg.html doc/contrib || die
+ fi
+
+ if use vroot; then
+ in_dir ${PN}-mod_vroot-${MOD_VROOT} eapply "${FILESDIR}"/${PN}-1.3.6_rc4-vroot-refresh-api.patch
+
+ cp -v "${WORKDIR}"/${PN}-mod_vroot-${MOD_VROOT}/mod_vroot.c contrib || die
+ cp -v "${WORKDIR}"/${PN}-mod_vroot-${MOD_VROOT}/mod_vroot.html doc/contrib || die
+ fi
+
+ if use kerberos ; then
+ in_dir mod_gss-${MOD_GSS} eapply "${FILESDIR}"/${PN}-1.3.6_rc4-gss-refresh-api.patch
+
+ # Support app-crypt/heimdal / Gentoo Bug #284853
+ sed -i -e "s/krb5_principal2principalname/_\0/" "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_auth_gss.c.in || die
+
+ # Remove obsolete DES / Gentoo Bug #324903
+ # Replace 'rpm' lookups / Gentoo Bug #391021
+ sed -i -e "/ac_gss_libs/s/ -ldes425//" \
+ -e "s/ac_libdir=\`rpm -q -l.*$/ac_libdir=\/usr\/$(get_libdir)\//" \
+ -e "s/ac_includedir=\`rpm -q -l.*$/ac_includedir=\/usr\/include\//" "${WORKDIR}"/mod_gss-${MOD_GSS}/configure{,.in} || die
+
+ # ./configure will modify files. Symlink them instead of copying
+ ln -sv "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_auth_gss.c "${S}"/contrib || die
+ ln -sv "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_gss.c "${S}"/contrib || die
+ ln -sv "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_gss.h "${S}"/include || die
+
+ cp -v "${WORKDIR}"/mod_gss-${MOD_GSS}/README.mod_{auth_gss,gss} "${S}" || die
+ cp -v "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_gss.html "${S}"/doc/contrib || die
+ cp -v "${WORKDIR}"/mod_gss-${MOD_GSS}/rfc{1509,2228}.txt "${S}"/doc/rfc || die
+ fi
+
+ default
+}
+
+src_configure() {
+ local c m
+
+ use acl && m="${m}:mod_facl"
+ use ban && m="${m}:mod_ban"
+ use case && m="${m}:mod_case"
+ use clamav && m="${m}:mod_clamav"
+ use copy && m="${m}:mod_copy"
+ use ctrls && m="${m}:mod_ctrls_admin"
+ use deflate && m="${m}:mod_deflate"
+ if use diskuse ; then
+ in_dir mod_diskuse econf
+ m="${m}:mod_diskuse"
+ fi
+ use dynmasq && m="${m}:mod_dynmasq"
+ use exec && m="${m}:mod_exec"
+ use ifsession && m="${m}:mod_ifsession"
+ use ifversion && m="${m}:mod_ifversion"
+ if use kerberos ; then
+ in_dir mod_gss-${MOD_GSS} econf
+ m="${m}:mod_gss:mod_auth_gss"
+ fi
+ use ldap && m="${m}:mod_ldap"
+ use log-forensic && m="${m}:mod_log_forensic"
+ use msg && m="${m}:mod_msg"
+ if use mysql || use postgres || use sqlite ; then
+ m="${m}:mod_sql:mod_sql_passwd"
+ use mysql && m="${m}:mod_sql_mysql"
+ use postgres && m="${m}:mod_sql_postgres"
+ use sqlite && m="${m}:mod_sql_sqlite"
+ fi
+ use qos && m="${m}:mod_qos"
+ use radius && m="${m}:mod_radius"
+ use ratio && m="${m}:mod_ratio"
+ use readme && m="${m}:mod_readme"
+ use rewrite && m="${m}:mod_rewrite"
+ if use sftp ; then
+ m="${m}:mod_sftp"
+ use pam && m="${m}:mod_sftp_pam"
+ use mysql || use postgres || use sqlite && m="${m}:mod_sftp_sql"
+ fi
+ use shaper && m="${m}:mod_shaper"
+ use sitemisc && m="${m}:mod_site_misc"
+ use snmp && m="${m}:mod_snmp"
+ if use softquota ; then
+ m="${m}:mod_quotatab:mod_quotatab_file"
+ use ldap && m="${m}:mod_quotatab_ldap"
+ use radius && m="${m}:mod_quotatab_radius"
+ use mysql || use postgres || use sqlite && m="${m}:mod_quotatab_sql"
+ fi
+ if use ssl ; then
+ m="${m}:mod_tls:mod_tls_shmcache"
+ use memcache && m="${m}:mod_tls_memcache"
+ fi
+ if use tcpd ; then
+ m="${m}:mod_wrap2:mod_wrap2_file"
+ use mysql || use postgres || use sqlite && m="${m}:mod_wrap2_sql"
+ fi
+ use unique-id && m="${m}:mod_unique_id"
+ use vroot && m="${m}:mod_vroot"
+
+ if [[ -n ${PROFTP_CUSTOM_MODULES} ]]; then
+ einfo "Adding user-specified extra modules: '${PROFTP_CUSTOM_MODULES}'"
+ m="${m}:${PROFTP_CUSTOM_MODULES}"
+ fi
+
+ [[ -z ${m} ]] || c="${c} --with-modules=${m:1}"
+
+ econf --localstatedir=/var/run/proftpd --sysconfdir=/etc/proftpd --disable-strip \
+ $(use_enable acl facl) \
+ $(use_enable authfile auth-file) \
+ $(use_enable caps cap) \
+ $(use_enable ctrls) \
+ $(use_enable dso) \
+ $(use_enable ident) \
+ $(use_enable ipv6) \
+ $(use_enable memcache) \
+ $(use_enable ncurses) \
+ $(use_enable nls) \
+ $(use_enable ssl openssl) \
+ $(use_enable pam auth-pam) \
+ $(use_enable pcre) \
+ $(use_enable sodium) \
+ $(use_enable test tests) \
+ --enable-trace \
+ $(use_enable userland_GNU shadow) \
+ $(use_enable userland_GNU autoshadow) \
+ ${c:1}
+}
+
+src_test() {
+ emake api-tests -C tests
+}
+
+src_install() {
+ default
+ [[ -z ${LINGUAS-set} ]] && rm -r "${ED}"/usr/share/locale
+ rm -rf "${ED}"/var/run
+
+ newinitd "${FILESDIR}"/proftpd.initd proftpd
+ insinto /etc/proftpd
+ doins "${FILESDIR}"/proftpd.conf.sample
+
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/proftpd.xinetd proftpd
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/${PN}.logrotate ${PN}
+
+ dodoc ChangeLog CREDITS INSTALL NEWS README* RELEASE_NOTES
+
+ docinto html
+ dodoc doc/*.html doc/contrib/*.html doc/howto/*.html doc/modules/*.html
+
+ docinto rfc
+ dodoc doc/rfc/*.txt
+
+ systemd_dounit "${FILESDIR}"/${PN}.service
+ systemd_newtmpfilesd "${FILESDIR}"/${PN}-tmpfiles.d.conf ${PN}.conf
+}
+
+pkg_postinst() {
+ # Create /var/run files at package merge time: bug #650000
+ tmpfiles_process ${PN}.conf
+}
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-ftp/proftpd/files/, net-ftp/proftpd/
@ 2019-12-02 22:52 Sergei Trofimovich
0 siblings, 0 replies; 11+ messages in thread
From: Sergei Trofimovich @ 2019-12-02 22:52 UTC (permalink / raw
To: gentoo-commits
commit: e2c36f1aded32d1feee68284b3823a77a027ff04
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 2 22:52:15 2019 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Mon Dec 2 22:52:42 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e2c36f1a
net-ftp/proftpd: CVE-2019-19269 fix, bug #701814
Pick upstream commit be8e1687819cb6 ("Issue #859, #861: Fix handling of
CRL lookups by properly using issuer for lookups, and guarding against
null pointers.")
Bug: https://bugs.gentoo.org/701814
Package-Manager: Portage-2.3.80, Repoman-2.3.19
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
.../files/proftpd-1.3.6b-tls-crl-crash.patch | 40 +++
net-ftp/proftpd/proftpd-1.3.6b-r1.ebuild | 275 +++++++++++++++++++++
2 files changed, 315 insertions(+)
diff --git a/net-ftp/proftpd/files/proftpd-1.3.6b-tls-crl-crash.patch b/net-ftp/proftpd/files/proftpd-1.3.6b-tls-crl-crash.patch
new file mode 100644
index 00000000000..3cfd8186721
--- /dev/null
+++ b/net-ftp/proftpd/files/proftpd-1.3.6b-tls-crl-crash.patch
@@ -0,0 +1,40 @@
+https://bugs.gentoo.org/701814
+https://github.com/proftpd/proftpd/commit/be8e1687819cb665359bd62b4c896ff4b1a09c3f
+
+From be8e1687819cb665359bd62b4c896ff4b1a09c3f Mon Sep 17 00:00:00 2001
+From: TJ Saunders <tj@castaglia.org>
+Date: Sun, 24 Nov 2019 14:03:54 -0800
+Subject: [PATCH] Issue #859, #861: Fix handling of CRL lookups by properly
+ using issuer for lookups, and guarding against null pointers.
+
+---
+ contrib/mod_tls.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+--- a/contrib/mod_tls.c
++++ b/contrib/mod_tls.c
+@@ -9066,10 +9066,10 @@ static int tls_verify_crl(int ok, X509_STORE_CTX *ctx) {
+
+ #if OPENSSL_VERSION_NUMBER >= 0x10100000L && \
+ !defined(HAVE_LIBRESSL)
+- crls = X509_STORE_CTX_get1_crls(store_ctx, subject);
++ crls = X509_STORE_CTX_get1_crls(store_ctx, issuer);
+ #elif OPENSSL_VERSION_NUMBER >= 0x10000000L && \
+ !defined(HAVE_LIBRESSL)
+- crls = X509_STORE_get1_crls(store_ctx, subject);
++ crls = X509_STORE_get1_crls(store_ctx, issuer);
+ #else
+ /* Your OpenSSL is before 1.0.0. You really need to upgrade. */
+ crls = NULL;
+@@ -9088,6 +9088,9 @@ static int tls_verify_crl(int ok, X509_STORE_CTX *ctx) {
+ ASN1_INTEGER *sn;
+
+ revoked = sk_X509_REVOKED_value(X509_CRL_get_REVOKED(crl), j);
++ if (revoked == NULL) {
++ continue;
++ }
+ #if OPENSSL_VERSION_NUMBER >= 0x10100000L && \
+ !defined(HAVE_LIBRESSL)
+ sn = X509_REVOKED_get0_serialNumber(revoked);
+--
+2.24.0
diff --git a/net-ftp/proftpd/proftpd-1.3.6b-r1.ebuild b/net-ftp/proftpd/proftpd-1.3.6b-r1.ebuild
new file mode 100644
index 00000000000..a7cb7a64d24
--- /dev/null
+++ b/net-ftp/proftpd/proftpd-1.3.6b-r1.ebuild
@@ -0,0 +1,275 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit multilib systemd tmpfiles
+
+MOD_CASE="0.7"
+MOD_CLAMAV="0.14rc2"
+MOD_DISKUSE="0.9"
+MOD_GSS="1.3.9"
+MOD_MSG="0.4.1"
+MOD_VROOT="0.9.4"
+
+DESCRIPTION="An advanced and very configurable FTP server"
+HOMEPAGE="http://www.proftpd.org/
+ http://www.castaglia.org/proftpd/
+ https://github.com/jbenden/mod_clamav
+ http://gssmod.sourceforge.net/"
+SRC_URI="ftp://ftp.proftpd.org/distrib/source/${P/_/}.tar.gz
+ case? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-case-${MOD_CASE}.tar.gz )
+ clamav? ( https://github.com/jbenden/mod_clamav/archive/v${MOD_CLAMAV}.tar.gz -> ${PN}-mod_clamav-${MOD_CLAMAV}.tar.gz )
+ diskuse? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-diskuse-${MOD_DISKUSE}.tar.gz )
+ kerberos? ( mirror://sourceforge/gssmod/mod_gss-${MOD_GSS}.tar.gz )
+ msg? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-msg-${MOD_MSG}.tar.gz )
+ vroot? ( https://github.com/Castaglia/${PN}-mod_vroot/archive/v${MOD_VROOT}.tar.gz -> mod_vroot-${MOD_VROOT}.tar.gz )"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="acl authfile ban +caps case clamav copy ctrls deflate diskuse dso dynmasq exec ifsession ifversion ident ipv6
+ kerberos ldap libressl log-forensic memcache msg mysql ncurses nls pam +pcre postgres qos radius
+ ratio readme rewrite selinux sftp shaper sitemisc snmp sodium softquota sqlite ssl tcpd test unique-id vroot"
+# TODO: geoip
+REQUIRED_USE="ban? ( ctrls )
+ msg? ( ctrls )
+ sftp? ( ssl )
+ shaper? ( ctrls )
+
+ mysql? ( ssl )
+ postgres? ( ssl )
+ sqlite? ( ssl )
+"
+
+CDEPEND="acl? ( virtual/acl )
+ caps? ( sys-libs/libcap )
+ clamav? ( app-antivirus/clamav )
+ kerberos? ( virtual/krb5 )
+ ldap? ( net-nds/openldap )
+ memcache? ( >=dev-libs/libmemcached-0.41 )
+ mysql? ( dev-db/mysql-connector-c:0= )
+ nls? ( virtual/libiconv )
+ ncurses? ( sys-libs/ncurses:0= )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:= )
+ )
+ pam? ( sys-libs/pam )
+ pcre? ( dev-libs/libpcre )
+ postgres? ( dev-db/postgresql:= )
+ sodium? ( dev-libs/libsodium:0= )
+ sqlite? ( dev-db/sqlite:3 )
+"
+DEPEND="${CDEPEND}
+ test? ( dev-libs/check )"
+RDEPEND="${CDEPEND}
+ net-ftp/ftpbase
+ selinux? ( sec-policy/selinux-ftp )"
+
+S="${WORKDIR}/${P/_/}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.3.6-use-trace.patch
+ "${FILESDIR}"/${PN}-1.3.6a-fix-libcheck.patch
+ "${FILESDIR}"/${PN}-1.3.6b-tls-crl-crash.patch
+)
+
+RESTRICT=test # tests corrupt memory. need to be fixed upstream first
+
+in_dir() {
+ pushd "${WORKDIR}/${1}" || die
+ shift
+ "$@"
+ popd
+}
+
+src_prepare() {
+ # Skip 'install-conf' / Support LINGUAS
+ sed -i -e "/install-all/s/ install-conf//" Makefile.in || die
+ sed -i -e "s/^LANGS=.*$/LANGS=${LINGUAS}/" locale/Makefile.in || die
+
+ # Prepare external modules
+ if use case; then
+ cp -v "${WORKDIR}"/mod_case/mod_case.c contrib || die
+ cp -v "${WORKDIR}"/mod_case/mod_case.html doc/contrib || die
+ fi
+
+ if use clamav ; then
+ cp -v "${WORKDIR}"/mod_clamav-${MOD_CLAMAV}/mod_clamav.{c,h} contrib || die
+ eapply -p0 "${WORKDIR}"/mod_clamav-${MOD_CLAMAV}/001-add-mod_clamav-to-tests.patch
+ fi
+
+ if use diskuse; then
+ in_dir mod_diskuse eapply "${FILESDIR}"/${PN}-1.3.6_rc4-diskuse-refresh-api.patch
+
+ # ./configure will modify files. Symlink them instead of copying
+ ln -sv "${WORKDIR}"/mod_diskuse/mod_diskuse.h "${S}"/contrib || die
+
+ cp -v "${WORKDIR}"/mod_diskuse/mod_diskuse.c "${S}"/contrib || die
+ cp -v "${WORKDIR}"/mod_diskuse/mod_diskuse.html "${S}"/doc/contrib || die
+ fi
+
+ if use msg; then
+ in_dir mod_msg eapply "${FILESDIR}"/${PN}-1.3.6_rc4-msg-refresh-api.patch
+
+ cp -v "${WORKDIR}"/mod_msg/mod_msg.c contrib || die
+ cp -v "${WORKDIR}"/mod_msg/mod_msg.html doc/contrib || die
+ fi
+
+ if use vroot; then
+ in_dir ${PN}-mod_vroot-${MOD_VROOT} eapply "${FILESDIR}"/${PN}-1.3.6_rc4-vroot-refresh-api.patch
+
+ cp -v "${WORKDIR}"/${PN}-mod_vroot-${MOD_VROOT}/mod_vroot.c contrib || die
+ cp -v "${WORKDIR}"/${PN}-mod_vroot-${MOD_VROOT}/mod_vroot.html doc/contrib || die
+ fi
+
+ if use kerberos ; then
+ # in_dir mod_gss-${MOD_GSS} eapply "${FILESDIR}"/${PN}-1.3.6_rc4-gss-refresh-api.patch
+
+ # Support app-crypt/heimdal / Gentoo Bug #284853
+ sed -i -e "s/krb5_principal2principalname/_\0/" "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_auth_gss.c.in || die
+
+ # Remove obsolete DES / Gentoo Bug #324903
+ # Replace 'rpm' lookups / Gentoo Bug #391021
+ sed -i -e "/ac_gss_libs/s/ -ldes425//" \
+ -e "s/ac_libdir=\`rpm -q -l.*$/ac_libdir=\/usr\/$(get_libdir)\//" \
+ -e "s/ac_includedir=\`rpm -q -l.*$/ac_includedir=\/usr\/include\//" "${WORKDIR}"/mod_gss-${MOD_GSS}/configure{,.ac} || die
+
+ # ./configure will modify files. Symlink them instead of copying
+ ln -sv "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_auth_gss.c "${S}"/contrib || die
+ ln -sv "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_gss.c "${S}"/contrib || die
+ ln -sv "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_gss.h "${S}"/include || die
+
+ cp -v "${WORKDIR}"/mod_gss-${MOD_GSS}/README.mod_{auth_gss,gss} "${S}" || die
+ cp -v "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_gss.html "${S}"/doc/contrib || die
+ cp -v "${WORKDIR}"/mod_gss-${MOD_GSS}/rfc{1509,2228}.txt "${S}"/doc/rfc || die
+ fi
+
+ default
+}
+
+src_configure() {
+ local c m
+
+ use acl && m="${m}:mod_facl"
+ use ban && m="${m}:mod_ban"
+ use case && m="${m}:mod_case"
+ use clamav && m="${m}:mod_clamav"
+ use copy && m="${m}:mod_copy"
+ use ctrls && m="${m}:mod_ctrls_admin"
+ use deflate && m="${m}:mod_deflate"
+ if use diskuse ; then
+ in_dir mod_diskuse econf
+ m="${m}:mod_diskuse"
+ fi
+ use dynmasq && m="${m}:mod_dynmasq"
+ use exec && m="${m}:mod_exec"
+ use ifsession && m="${m}:mod_ifsession"
+ use ifversion && m="${m}:mod_ifversion"
+ if use kerberos ; then
+ in_dir mod_gss-${MOD_GSS} econf
+ m="${m}:mod_gss:mod_auth_gss"
+ fi
+ use ldap && m="${m}:mod_ldap"
+ use log-forensic && m="${m}:mod_log_forensic"
+ use msg && m="${m}:mod_msg"
+ if use mysql || use postgres || use sqlite ; then
+ m="${m}:mod_sql:mod_sql_passwd"
+ use mysql && m="${m}:mod_sql_mysql"
+ use postgres && m="${m}:mod_sql_postgres"
+ use sqlite && m="${m}:mod_sql_sqlite"
+ fi
+ use qos && m="${m}:mod_qos"
+ use radius && m="${m}:mod_radius"
+ use ratio && m="${m}:mod_ratio"
+ use readme && m="${m}:mod_readme"
+ use rewrite && m="${m}:mod_rewrite"
+ if use sftp ; then
+ m="${m}:mod_sftp"
+ use pam && m="${m}:mod_sftp_pam"
+ use mysql || use postgres || use sqlite && m="${m}:mod_sftp_sql"
+ fi
+ use shaper && m="${m}:mod_shaper"
+ use sitemisc && m="${m}:mod_site_misc"
+ use snmp && m="${m}:mod_snmp"
+ if use softquota ; then
+ m="${m}:mod_quotatab:mod_quotatab_file"
+ use ldap && m="${m}:mod_quotatab_ldap"
+ use radius && m="${m}:mod_quotatab_radius"
+ use mysql || use postgres || use sqlite && m="${m}:mod_quotatab_sql"
+ fi
+ if use ssl ; then
+ m="${m}:mod_tls:mod_tls_shmcache"
+ use memcache && m="${m}:mod_tls_memcache"
+ fi
+ if use tcpd ; then
+ m="${m}:mod_wrap2:mod_wrap2_file"
+ use mysql || use postgres || use sqlite && m="${m}:mod_wrap2_sql"
+ fi
+ use unique-id && m="${m}:mod_unique_id"
+ use vroot && m="${m}:mod_vroot"
+
+ if [[ -n ${PROFTP_CUSTOM_MODULES} ]]; then
+ einfo "Adding user-specified extra modules: '${PROFTP_CUSTOM_MODULES}'"
+ m="${m}:${PROFTP_CUSTOM_MODULES}"
+ fi
+
+ [[ -z ${m} ]] || c="${c} --with-modules=${m:1}"
+
+ econf --localstatedir=/var/run/proftpd --sysconfdir=/etc/proftpd --disable-strip \
+ $(use_enable acl facl) \
+ $(use_enable authfile auth-file) \
+ $(use_enable caps cap) \
+ $(use_enable ctrls) \
+ $(use_enable dso) \
+ $(use_enable ident) \
+ $(use_enable ipv6) \
+ $(use_enable memcache) \
+ $(use_enable ncurses) \
+ $(use_enable nls) \
+ $(use_enable ssl openssl) \
+ $(use_enable pam auth-pam) \
+ $(use_enable pcre) \
+ $(use_enable sodium) \
+ $(use_enable test tests) \
+ --enable-trace \
+ $(use_enable userland_GNU shadow) \
+ $(use_enable userland_GNU autoshadow) \
+ ${c:1}
+}
+
+src_test() {
+ emake api-tests -C tests
+}
+
+src_install() {
+ default
+ [[ -z ${LINGUAS-set} ]] && rm -r "${ED}"/usr/share/locale
+ rm -rf "${ED}"/var/run
+
+ newinitd "${FILESDIR}"/proftpd.initd proftpd
+ insinto /etc/proftpd
+ doins "${FILESDIR}"/proftpd.conf.sample
+
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/proftpd.xinetd proftpd
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/${PN}.logrotate ${PN}
+
+ dodoc ChangeLog CREDITS INSTALL NEWS README* RELEASE_NOTES
+
+ docinto html
+ dodoc doc/*.html doc/contrib/*.html doc/howto/*.html doc/modules/*.html
+
+ docinto rfc
+ dodoc doc/rfc/*.txt
+
+ systemd_dounit "${FILESDIR}"/${PN}.service
+ systemd_newtmpfilesd "${FILESDIR}"/${PN}-tmpfiles.d.conf ${PN}.conf
+}
+
+pkg_postinst() {
+ # Create /var/run files at package merge time: bug #650000
+ tmpfiles_process ${PN}.conf
+}
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-ftp/proftpd/files/, net-ftp/proftpd/
@ 2020-03-02 23:40 Sergei Trofimovich
0 siblings, 0 replies; 11+ messages in thread
From: Sergei Trofimovich @ 2020-03-02 23:40 UTC (permalink / raw
To: gentoo-commits
commit: 3153e9afab90ac5741c621bad7e6c39c72764181
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 2 23:40:18 2020 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Mon Mar 2 23:40:49 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3153e9af
net-ftp/proftpd: tweak for gcc-10
Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
net-ftp/proftpd/files/proftpd-1.3.6c-gcc-10.patch | 21 +++++++++++++++++++++
net-ftp/proftpd/proftpd-1.3.6c.ebuild | 1 +
2 files changed, 22 insertions(+)
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
new file mode 100644
index 00000000000..c3ee704c085
--- /dev/null
+++ b/net-ftp/proftpd/files/proftpd-1.3.6c-gcc-10.patch
@@ -0,0 +1,21 @@
+--- 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/proftpd-1.3.6c.ebuild b/net-ftp/proftpd/proftpd-1.3.6c.ebuild
index 5c8f9eb610d..d2441f41e29 100644
--- a/net-ftp/proftpd/proftpd-1.3.6c.ebuild
+++ b/net-ftp/proftpd/proftpd-1.3.6c.ebuild
@@ -71,6 +71,7 @@ S="${WORKDIR}/${P/_/}"
PATCHES=(
"${FILESDIR}"/${PN}-1.3.6-use-trace.patch
"${FILESDIR}"/${PN}-1.3.6a-fix-libcheck.patch
+ "${FILESDIR}"/${PN}-1.3.6c-gcc-10.patch
)
RESTRICT=test # tests corrupt memory. need to be fixed upstream first
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-ftp/proftpd/files/, net-ftp/proftpd/
@ 2020-05-31 17:18 Sergei Trofimovich
0 siblings, 0 replies; 11+ messages in thread
From: Sergei Trofimovich @ 2020-05-31 17:18 UTC (permalink / raw
To: gentoo-commits
commit: f676fd7463f36c8a9860677295731fc2f3e93460
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun May 31 17:15:07 2020 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun May 31 17:17:40 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f676fd74
net-ftp/proftpd: fix mod_ldap SIGSEGV
Closes: https://bugs.gentoo.org/726460
Package-Manager: Portage-2.3.100, Repoman-2.3.22
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
.../files/proftpd-1.3.7_rc4-ldap_mod-SEGV.patch | 38 +++
.../files/proftpd-1.3.7_rc4-str-sentinel.patch | 43 ++++
net-ftp/proftpd/proftpd-1.3.7_rc4-r1.ebuild | 277 +++++++++++++++++++++
3 files changed, 358 insertions(+)
diff --git a/net-ftp/proftpd/files/proftpd-1.3.7_rc4-ldap_mod-SEGV.patch b/net-ftp/proftpd/files/proftpd-1.3.7_rc4-ldap_mod-SEGV.patch
new file mode 100644
index 00000000000..2f50a28b87f
--- /dev/null
+++ b/net-ftp/proftpd/files/proftpd-1.3.7_rc4-ldap_mod-SEGV.patch
@@ -0,0 +1,38 @@
+https://github.com/proftpd/proftpd/issues/1027
+https://bugs.gentoo.org/726460
+
+From 6ac1c727ddfd70080b38097e5484390ec84ef9be Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Sun, 31 May 2020 17:55:08 +0100
+Subject: [PATCH 1/2] contrib/mod_ldap.c: fix SIGSEGV in mod_ldap:ldap_mod_init
+ ()
+
+The crash happens due to missing sentinel value in `pstrcat()`
+
+```c
+ feats = pstrcat(tmp_pool, feats, i != 0 ? ", " : "",
+ api_info.ldapai_extensions[i]);
+```
+
+The change is to add sentinel to `pstrcat()` call.
+
+Bug: https://github.com/proftpd/proftpd/issues/1027
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+---
+ contrib/mod_ldap.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/contrib/mod_ldap.c
++++ b/contrib/mod_ldap.c
+@@ -3218,7 +3218,7 @@ static int ldap_mod_init(void) {
+
+ for (i = 0; api_info.ldapai_extensions[i]; i++) {
+ feats = pstrcat(tmp_pool, feats, i != 0 ? ", " : "",
+- api_info.ldapai_extensions[i]);
++ api_info.ldapai_extensions[i], NULL);
+ ldap_memfree(api_info.ldapai_extensions[i]);
+ }
+
+--
+2.26.2
+
diff --git a/net-ftp/proftpd/files/proftpd-1.3.7_rc4-str-sentinel.patch b/net-ftp/proftpd/files/proftpd-1.3.7_rc4-str-sentinel.patch
new file mode 100644
index 00000000000..cf1e4e91d41
--- /dev/null
+++ b/net-ftp/proftpd/files/proftpd-1.3.7_rc4-str-sentinel.patch
@@ -0,0 +1,43 @@
+https://github.com/proftpd/proftpd/issues/1027
+https://bugs.gentoo.org/726460
+
+From c5f98b6e047e0e5ca841372d78d06c05fe8770c6 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Sun, 31 May 2020 18:03:29 +0100
+Subject: [PATCH 2/2] include/str.h: add __attribute__((sentinel)) to variadic
+ concats
+
+`pstrcat()` needs to always have literal trailing `NULL`.
+
+Bug: https://github.com/proftpd/proftpd/issues/1027
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+---
+ include/str.h | 14 ++++++++++++--
+ 1 file changed, 12 insertions(+), 2 deletions(-)
+
+--- a/include/str.h
++++ b/include/str.h
+@@ -39,8 +39,18 @@ const char *quote_dir(pool *p, char *dir);
+ char *sstrcat(char *, const char *, size_t);
+ const char *sreplace(pool *, const char *, ...);
+
+-char *pdircat(pool *, ...);
+-char *pstrcat(pool *, ...);
++char *pdircat(pool *, ...)
++#ifdef __GNUC__
++ __attribute__ ((sentinel));
++#else
++ ;
++#endif
++char *pstrcat(pool *, ...)
++#ifdef __GNUC__
++ __attribute__ ((sentinel));
++#else
++ ;
++#endif
+ char *pstrdup(pool *, const char *);
+ char *pstrndup(pool *, const char *, size_t);
+
+--
+2.26.2
+
diff --git a/net-ftp/proftpd/proftpd-1.3.7_rc4-r1.ebuild b/net-ftp/proftpd/proftpd-1.3.7_rc4-r1.ebuild
new file mode 100644
index 00000000000..9f1b1ca53ed
--- /dev/null
+++ b/net-ftp/proftpd/proftpd-1.3.7_rc4-r1.ebuild
@@ -0,0 +1,277 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit multilib systemd tmpfiles toolchain-funcs
+
+MOD_CASE="0.7"
+MOD_CLAMAV="0.14rc2"
+MOD_DISKUSE="0.9"
+MOD_GSS="1.3.9"
+MOD_MSG="0.4.1"
+MOD_VROOT="0.9.4"
+
+DESCRIPTION="An advanced and very configurable FTP server"
+HOMEPAGE="http://www.proftpd.org/
+ http://www.castaglia.org/proftpd/
+ https://github.com/jbenden/mod_clamav
+ http://gssmod.sourceforge.net/"
+SRC_URI="ftp://ftp.proftpd.org/distrib/source/${P/_/}.tar.gz
+ case? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-case-${MOD_CASE}.tar.gz )
+ clamav? ( https://github.com/jbenden/mod_clamav/archive/v${MOD_CLAMAV}.tar.gz -> ${PN}-mod_clamav-${MOD_CLAMAV}.tar.gz )
+ diskuse? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-diskuse-${MOD_DISKUSE}.tar.gz )
+ kerberos? ( mirror://sourceforge/gssmod/mod_gss-${MOD_GSS}.tar.gz )
+ msg? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-msg-${MOD_MSG}.tar.gz )
+ vroot? ( https://github.com/Castaglia/${PN}-mod_vroot/archive/v${MOD_VROOT}.tar.gz -> mod_vroot-${MOD_VROOT}.tar.gz )"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="acl authfile ban +caps case clamav copy ctrls deflate diskuse dso dynmasq exec ifsession ifversion ident ipv6
+ kerberos ldap libressl log-forensic memcache msg mysql ncurses nls pam +pcre postgres qos radius
+ ratio readme rewrite selinux sftp shaper sitemisc snmp sodium softquota sqlite ssl tcpd test unique-id vroot"
+# TODO: geoip
+REQUIRED_USE="ban? ( ctrls )
+ msg? ( ctrls )
+ sftp? ( ssl )
+ shaper? ( ctrls )
+
+ mysql? ( ssl )
+ postgres? ( ssl )
+ sqlite? ( ssl )
+"
+
+CDEPEND="acl? ( virtual/acl )
+ caps? ( sys-libs/libcap )
+ clamav? ( app-antivirus/clamav )
+ kerberos? ( virtual/krb5 )
+ ldap? ( net-nds/openldap )
+ memcache? ( >=dev-libs/libmemcached-0.41 )
+ mysql? ( dev-db/mysql-connector-c:0= )
+ nls? ( virtual/libiconv )
+ ncurses? ( sys-libs/ncurses:0= )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:= )
+ )
+ pam? ( sys-libs/pam )
+ pcre? ( dev-libs/libpcre )
+ postgres? ( dev-db/postgresql:= )
+ sodium? ( dev-libs/libsodium:0= )
+ sqlite? ( dev-db/sqlite:3 )
+"
+DEPEND="${CDEPEND}
+ test? ( dev-libs/check )"
+RDEPEND="${CDEPEND}
+ net-ftp/ftpbase
+ selinux? ( sec-policy/selinux-ftp )"
+
+S="${WORKDIR}/${P/_/}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.3.6-use-trace.patch
+ "${FILESDIR}"/${PN}-1.3.7_rc4-ldap_mod-SEGV.patch
+ "${FILESDIR}"/${PN}-1.3.7_rc4-str-sentinel.patch
+)
+
+RESTRICT=test # Some tests are ran in chroot. Confuse sandbox.
+
+in_dir() {
+ pushd "${WORKDIR}/${1}" || die
+ shift
+ "$@"
+ popd
+}
+
+src_prepare() {
+ # Skip 'install-conf' / Support LINGUAS
+ sed -i -e "/install-all/s/ install-conf//" Makefile.in || die
+ sed -i -e "s/^LANGS=.*$/LANGS=${LINGUAS}/" locale/Makefile.in || die
+
+ # Prepare external modules
+ if use case; then
+ cp -v "${WORKDIR}"/mod_case/mod_case.c contrib || die
+ cp -v "${WORKDIR}"/mod_case/mod_case.html doc/contrib || die
+ fi
+
+ if use clamav ; then
+ cp -v "${WORKDIR}"/mod_clamav-${MOD_CLAMAV}/mod_clamav.{c,h} contrib || die
+ eapply -p0 "${WORKDIR}"/mod_clamav-${MOD_CLAMAV}/001-add-mod_clamav-to-tests.patch
+ fi
+
+ if use diskuse; then
+ in_dir mod_diskuse eapply "${FILESDIR}"/${PN}-1.3.6_rc4-diskuse-refresh-api.patch
+
+ # ./configure will modify files. Symlink them instead of copying
+ ln -sv "${WORKDIR}"/mod_diskuse/mod_diskuse.h "${S}"/contrib || die
+
+ cp -v "${WORKDIR}"/mod_diskuse/mod_diskuse.c "${S}"/contrib || die
+ cp -v "${WORKDIR}"/mod_diskuse/mod_diskuse.html "${S}"/doc/contrib || die
+ fi
+
+ if use msg; then
+ in_dir mod_msg eapply "${FILESDIR}"/${PN}-1.3.6_rc4-msg-refresh-api.patch
+
+ cp -v "${WORKDIR}"/mod_msg/mod_msg.c contrib || die
+ cp -v "${WORKDIR}"/mod_msg/mod_msg.html doc/contrib || die
+ fi
+
+ if use vroot; then
+ in_dir ${PN}-mod_vroot-${MOD_VROOT} eapply "${FILESDIR}"/${PN}-1.3.6_rc4-vroot-refresh-api.patch
+
+ cp -v "${WORKDIR}"/${PN}-mod_vroot-${MOD_VROOT}/mod_vroot.c contrib || die
+ cp -v "${WORKDIR}"/${PN}-mod_vroot-${MOD_VROOT}/mod_vroot.html doc/contrib || die
+ fi
+
+ if use kerberos ; then
+ # in_dir mod_gss-${MOD_GSS} eapply "${FILESDIR}"/${PN}-1.3.6_rc4-gss-refresh-api.patch
+
+ # Support app-crypt/heimdal / Gentoo Bug #284853
+ sed -i -e "s/krb5_principal2principalname/_\0/" "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_auth_gss.c.in || die
+
+ # Remove obsolete DES / Gentoo Bug #324903
+ # Replace 'rpm' lookups / Gentoo Bug #391021
+ sed -i -e "/ac_gss_libs/s/ -ldes425//" \
+ -e "s/ac_libdir=\`rpm -q -l.*$/ac_libdir=\/usr\/$(get_libdir)\//" \
+ -e "s/ac_includedir=\`rpm -q -l.*$/ac_includedir=\/usr\/include\//" "${WORKDIR}"/mod_gss-${MOD_GSS}/configure{,.ac} || die
+
+ # ./configure will modify files. Symlink them instead of copying
+ ln -sv "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_auth_gss.c "${S}"/contrib || die
+ ln -sv "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_gss.c "${S}"/contrib || die
+ ln -sv "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_gss.h "${S}"/include || die
+
+ cp -v "${WORKDIR}"/mod_gss-${MOD_GSS}/README.mod_{auth_gss,gss} "${S}" || die
+ cp -v "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_gss.html "${S}"/doc/contrib || die
+ cp -v "${WORKDIR}"/mod_gss-${MOD_GSS}/rfc{1509,2228}.txt "${S}"/doc/rfc || die
+ fi
+
+ default
+
+ tc-export CC
+}
+
+src_configure() {
+ local c m
+
+ use acl && m="${m}:mod_facl"
+ use ban && m="${m}:mod_ban"
+ use case && m="${m}:mod_case"
+ use clamav && m="${m}:mod_clamav"
+ use copy && m="${m}:mod_copy"
+ use ctrls && m="${m}:mod_ctrls_admin"
+ use deflate && m="${m}:mod_deflate"
+ if use diskuse ; then
+ in_dir mod_diskuse econf
+ m="${m}:mod_diskuse"
+ fi
+ use dynmasq && m="${m}:mod_dynmasq"
+ use exec && m="${m}:mod_exec"
+ use ifsession && m="${m}:mod_ifsession"
+ use ifversion && m="${m}:mod_ifversion"
+ if use kerberos ; then
+ in_dir mod_gss-${MOD_GSS} econf
+ m="${m}:mod_gss:mod_auth_gss"
+ fi
+ use ldap && m="${m}:mod_ldap"
+ use log-forensic && m="${m}:mod_log_forensic"
+ use msg && m="${m}:mod_msg"
+ if use mysql || use postgres || use sqlite ; then
+ m="${m}:mod_sql:mod_sql_passwd"
+ use mysql && m="${m}:mod_sql_mysql"
+ use postgres && m="${m}:mod_sql_postgres"
+ use sqlite && m="${m}:mod_sql_sqlite"
+ fi
+ use qos && m="${m}:mod_qos"
+ use radius && m="${m}:mod_radius"
+ use ratio && m="${m}:mod_ratio"
+ use readme && m="${m}:mod_readme"
+ use rewrite && m="${m}:mod_rewrite"
+ if use sftp ; then
+ m="${m}:mod_sftp"
+ use pam && m="${m}:mod_sftp_pam"
+ use mysql || use postgres || use sqlite && m="${m}:mod_sftp_sql"
+ fi
+ use shaper && m="${m}:mod_shaper"
+ use sitemisc && m="${m}:mod_site_misc"
+ use snmp && m="${m}:mod_snmp"
+ if use softquota ; then
+ m="${m}:mod_quotatab:mod_quotatab_file"
+ use ldap && m="${m}:mod_quotatab_ldap"
+ use radius && m="${m}:mod_quotatab_radius"
+ use mysql || use postgres || use sqlite && m="${m}:mod_quotatab_sql"
+ fi
+ if use ssl ; then
+ m="${m}:mod_tls:mod_tls_shmcache"
+ use memcache && m="${m}:mod_tls_memcache"
+ fi
+ if use tcpd ; then
+ m="${m}:mod_wrap2:mod_wrap2_file"
+ use mysql || use postgres || use sqlite && m="${m}:mod_wrap2_sql"
+ fi
+ use unique-id && m="${m}:mod_unique_id"
+ use vroot && m="${m}:mod_vroot"
+
+ if [[ -n ${PROFTP_CUSTOM_MODULES} ]]; then
+ einfo "Adding user-specified extra modules: '${PROFTP_CUSTOM_MODULES}'"
+ m="${m}:${PROFTP_CUSTOM_MODULES}"
+ fi
+
+ [[ -z ${m} ]] || c="${c} --with-modules=${m:1}"
+
+ econf --localstatedir=/run/proftpd --sysconfdir=/etc/proftpd --disable-strip \
+ $(use_enable acl facl) \
+ $(use_enable authfile auth-file) \
+ $(use_enable caps cap) \
+ $(use_enable ctrls) \
+ $(use_enable dso) \
+ $(use_enable ident) \
+ $(use_enable ipv6) \
+ $(use_enable memcache) \
+ $(use_enable ncurses) \
+ $(use_enable nls) \
+ $(use_enable ssl openssl) \
+ $(use_enable pam auth-pam) \
+ $(use_enable pcre) \
+ $(use_enable sodium) \
+ $(use_enable test tests) \
+ --enable-trace \
+ $(use_enable userland_GNU shadow) \
+ $(use_enable userland_GNU autoshadow) \
+ ${c:1}
+}
+
+src_test() {
+ emake api-tests -C tests
+}
+
+src_install() {
+ default
+ [[ -z ${LINGUAS-set} ]] && rm -r "${ED}"/usr/share/locale
+ rm -rf "${ED}"/run "${ED}"/var/run
+
+ newinitd "${FILESDIR}"/proftpd.initd-r1 proftpd
+ insinto /etc/proftpd
+ doins "${FILESDIR}"/proftpd.conf.sample
+
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/proftpd.xinetd proftpd
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/${PN}.logrotate ${PN}
+
+ dodoc ChangeLog CREDITS INSTALL NEWS README* RELEASE_NOTES
+
+ docinto html
+ dodoc doc/*.html doc/contrib/*.html doc/howto/*.html doc/modules/*.html
+
+ docinto rfc
+ dodoc doc/rfc/*.txt
+
+ systemd_dounit "${FILESDIR}"/${PN}.service
+ systemd_newtmpfilesd "${FILESDIR}"/${PN}-tmpfiles.d.conf-r1 ${PN}.conf
+}
+
+pkg_postinst() {
+ # Create /var/run files at package merge time: bug #650000
+ tmpfiles_process ${PN}.conf
+}
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-ftp/proftpd/files/, net-ftp/proftpd/
@ 2021-03-21 9:45 Sergei Trofimovich
0 siblings, 0 replies; 11+ messages in thread
From: Sergei Trofimovich @ 2021-03-21 9:45 UTC (permalink / raw
To: gentoo-commits
commit: 610d1127a422e8efb8869e9bcb83982ce04d3a2d
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 21 09:41:34 2021 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Mar 21 09:45:14 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=610d1127
net-ftp/proftpd: fix tinfo/tinfow mix crash
Picked upstream commit as is.
Reported-by: Sam James
Closes: https://bugs.gentoo.org/777432
Package-Manager: Portage-3.0.17, Repoman-3.0.2
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
.../proftpd/files/proftpd-1.3.7a-tinfow-segv.patch | 197 +++++++++++++++
net-ftp/proftpd/proftpd-1.3.7a-r1.ebuild | 276 +++++++++++++++++++++
2 files changed, 473 insertions(+)
diff --git a/net-ftp/proftpd/files/proftpd-1.3.7a-tinfow-segv.patch b/net-ftp/proftpd/files/proftpd-1.3.7a-tinfow-segv.patch
new file mode 100644
index 00000000000..b904c5dbe5a
--- /dev/null
+++ b/net-ftp/proftpd/files/proftpd-1.3.7a-tinfow-segv.patch
@@ -0,0 +1,197 @@
+https://github.com/proftpd/proftpd/commit/ff413723328da726d1042c7d2067d088765eca57
+https://bugs.gentoo.org/777432
+
+From ff413723328da726d1042c7d2067d088765eca57 Mon Sep 17 00:00:00 2001
+From: TJ Saunders <tj@castaglia.org>
+Date: Sun, 14 Mar 2021 10:08:02 -0700
+Subject: [PATCH] Issue #1174: Check for the libtinfow library when ncursesw is
+ being used.
+
+On some systems, such as Gentoo, linking against libtinfo with libncursesw,
+rather than libtinfow, leads to segfaults.
+---
+ config.h.in | 3 ++
+ configure | 98 +++++++++++++++++++++++++++++++++++++++++++++++++---
+ configure.in | 24 +++++++++----
+ 3 files changed, 114 insertions(+), 11 deletions(-)
+
+diff --git a/config.h.in b/config.h.in
+index 1ba33caf9..775b7a294 100644
+--- a/config.h.in
++++ b/config.h.in
+@@ -966,6 +966,9 @@
+ /* Define if you have the libtinfo library (-ltinfo). */
+ #undef HAVE_LIBTINFO
+
++/* Define if you have the libtinfow library (-ltinfow). */
++#undef HAVE_LIBTINFOW
++
+ /* Define if you have the addrinfo struct. */
+ #undef HAVE_STRUCT_ADDRINFO
+
+diff --git a/configure b/configure
+index 64080483f..86cf1360e 100755
+--- a/configure
++++ b/configure
+@@ -23169,18 +23169,106 @@ $as_echo "#define PR_USE_CURSES 1" >>confdefs.h
+ fi
+
+ if test x"$enable_ncurses" != xno ; then
++
+ if test x"$pr_have_ncursesw" = xyes ; then
+
+ $as_echo "#define PR_USE_NCURSESW 1" >>confdefs.h
+
+- else
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for halfdelay in -ltinfow" >&5
++$as_echo_n "checking for halfdelay in -ltinfow... " >&6; }
++if ${ac_cv_lib_tinfow_halfdelay+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-ltinfow $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h. */
+
+-$as_echo "#define PR_USE_NCURSES 1" >>confdefs.h
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char halfdelay ();
++int
++main ()
++{
++return halfdelay ();
++ ;
++ return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++ ac_cv_lib_tinfow_halfdelay=yes
++else
++ ac_cv_lib_tinfow_halfdelay=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tinfow_halfdelay" >&5
++$as_echo "$ac_cv_lib_tinfow_halfdelay" >&6; }
++if test "x$ac_cv_lib_tinfow_halfdelay" = xyes; then :
++ UTILS_LIBS="$UTILS_LIBS -ltinfow"
+
+- fi
++$as_echo "#define HAVE_LIBTINFOW 1" >>confdefs.h
++
++
++else
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for halfdelay in -ltinfo" >&5
++$as_echo_n "checking for halfdelay in -ltinfo... " >&6; }
++if ${ac_cv_lib_tinfo_halfdelay+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-ltinfo $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char halfdelay ();
++int
++main ()
++{
++return halfdelay ();
++ ;
++ return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++ ac_cv_lib_tinfo_halfdelay=yes
++else
++ ac_cv_lib_tinfo_halfdelay=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
+ fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tinfo_halfdelay" >&5
++$as_echo "$ac_cv_lib_tinfo_halfdelay" >&6; }
++if test "x$ac_cv_lib_tinfo_halfdelay" = xyes; then :
++ UTILS_LIBS="$UTILS_LIBS -ltinfo"
++
++$as_echo "#define HAVE_LIBTINFO 1" >>confdefs.h
+
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for halfdelay in -ltinfo" >&5
++
++fi
++
++
++fi
++
++ else
++
++$as_echo "#define PR_USE_NCURSES 1" >>confdefs.h
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for halfdelay in -ltinfo" >&5
+ $as_echo_n "checking for halfdelay in -ltinfo... " >&6; }
+ if ${ac_cv_lib_tinfo_halfdelay+:} false; then :
+ $as_echo_n "(cached) " >&6
+@@ -23224,6 +23312,8 @@ $as_echo "#define HAVE_LIBTINFO 1" >>confdefs.h
+
+ fi
+
++ fi
++fi
+
+ if test x"$enable_nonblocking_log_open" != xno; then
+
+diff --git a/configure.in b/configure.in
+index 59793a00c..4bd0f7c19 100644
+--- a/configure.in
++++ b/configure.in
+@@ -2789,20 +2789,30 @@ if test x"$enable_curses" != xno ; then
+ fi
+
+ if test x"$enable_ncurses" != xno ; then
++ dnl Check for the libtinfo library, which contains the halfdelay() curses
++ dnl function on some systems (e.g. OpenSuSE); see Bug#3718. Note that on
++ dnl some systems, this may need to be libtinfow instead; see Issue #1174.
++
+ if test x"$pr_have_ncursesw" = xyes ; then
+ AC_DEFINE(PR_USE_NCURSESW, 1, [Define if using ncursesw support])
++ AC_CHECK_LIB(tinfow, halfdelay,
++ [ UTILS_LIBS="$UTILS_LIBS -ltinfow"
++ AC_DEFINE(HAVE_LIBTINFOW, 1, [Define if you have libtinfow])
++ ],
++ [ AC_CHECK_LIB(tinfo, halfdelay,
++ [ UTILS_LIBS="$UTILS_LIBS -ltinfo"
++ AC_DEFINE(HAVE_LIBTINFO, 1, [Define if you have libtinfo])
++ ])
++ ])
+ else
+ AC_DEFINE(PR_USE_NCURSES, 1, [Define if using ncurses support])
++ AC_CHECK_LIB(tinfo, halfdelay,
++ [ UTILS_LIBS="$UTILS_LIBS -ltinfo"
++ AC_DEFINE(HAVE_LIBTINFO, 1, [Define if you have libtinfo])
++ ])
+ fi
+ fi
+
+-dnl Check for the libtinfo library, which contains the halfdelay() curses
+-dnl function on some systems (e.g. OpenSuSE); see Bug#3718.
+-AC_CHECK_LIB(tinfo, halfdelay,
+- [ UTILS_LIBS="$UTILS_LIBS -ltinfo"
+- AC_DEFINE(HAVE_LIBTINFO, 1, [Define if you have libtinfo])
+- ])
+-
+ if test x"$enable_nonblocking_log_open" != xno; then
+ AC_DEFINE(PR_USE_NONBLOCKING_LOG_OPEN, 1, [Define if using nonblocking open of log files])
+ fi
diff --git a/net-ftp/proftpd/proftpd-1.3.7a-r1.ebuild b/net-ftp/proftpd/proftpd-1.3.7a-r1.ebuild
new file mode 100644
index 00000000000..17be3df4415
--- /dev/null
+++ b/net-ftp/proftpd/proftpd-1.3.7a-r1.ebuild
@@ -0,0 +1,276 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit multilib systemd tmpfiles toolchain-funcs
+
+MOD_CASE="0.7"
+MOD_CLAMAV="0.14rc2"
+MOD_DISKUSE="0.9"
+MOD_GSS="1.3.9"
+MOD_MSG="0.4.1"
+MOD_VROOT="0.9.4"
+
+DESCRIPTION="An advanced and very configurable FTP server"
+HOMEPAGE="http://www.proftpd.org/
+ http://www.castaglia.org/proftpd/
+ https://github.com/jbenden/mod_clamav
+ http://gssmod.sourceforge.net/"
+SRC_URI="ftp://ftp.proftpd.org/distrib/source/${P/_/}.tar.gz
+ case? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-case-${MOD_CASE}.tar.gz )
+ clamav? ( https://github.com/jbenden/mod_clamav/archive/v${MOD_CLAMAV}.tar.gz -> ${PN}-mod_clamav-${MOD_CLAMAV}.tar.gz )
+ diskuse? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-diskuse-${MOD_DISKUSE}.tar.gz )
+ kerberos? ( mirror://sourceforge/gssmod/mod_gss-${MOD_GSS}.tar.gz )
+ msg? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-msg-${MOD_MSG}.tar.gz )
+ vroot? ( https://github.com/Castaglia/${PN}-mod_vroot/archive/v${MOD_VROOT}.tar.gz -> mod_vroot-${MOD_VROOT}.tar.gz )"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="acl authfile ban +caps case clamav copy ctrls deflate diskuse dso dynmasq exec ifsession ifversion ident ipv6
+ kerberos ldap libressl log-forensic memcache msg mysql ncurses nls pam +pcre postgres qos radius
+ ratio readme rewrite selinux sftp shaper sitemisc snmp sodium softquota sqlite ssl tcpd test unique-id vroot"
+# TODO: geoip
+REQUIRED_USE="ban? ( ctrls )
+ msg? ( ctrls )
+ sftp? ( ssl )
+ shaper? ( ctrls )
+
+ mysql? ( ssl )
+ postgres? ( ssl )
+ sqlite? ( ssl )
+"
+
+CDEPEND="acl? ( virtual/acl )
+ caps? ( sys-libs/libcap )
+ clamav? ( app-antivirus/clamav )
+ kerberos? ( virtual/krb5 )
+ ldap? ( net-nds/openldap )
+ memcache? ( >=dev-libs/libmemcached-0.41 )
+ mysql? ( dev-db/mysql-connector-c:0= )
+ nls? ( virtual/libiconv )
+ ncurses? ( sys-libs/ncurses:0= )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:= )
+ )
+ pam? ( sys-libs/pam )
+ pcre? ( dev-libs/libpcre )
+ postgres? ( dev-db/postgresql:= )
+ sodium? ( dev-libs/libsodium:0= )
+ sqlite? ( dev-db/sqlite:3 )
+"
+DEPEND="${CDEPEND}
+ test? ( dev-libs/check )"
+RDEPEND="${CDEPEND}
+ net-ftp/ftpbase
+ selinux? ( sec-policy/selinux-ftp )"
+
+S="${WORKDIR}/${P/_/}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.3.6-use-trace.patch
+ "${FILESDIR}"/${P}-tinfow-segv.patch
+)
+
+RESTRICT=test # Some tests are ran in chroot. Confuse sandbox.
+
+in_dir() {
+ pushd "${WORKDIR}/${1}" || die
+ shift
+ "$@"
+ popd
+}
+
+src_prepare() {
+ # Skip 'install-conf' / Support LINGUAS
+ sed -i -e "/install-all/s/ install-conf//" Makefile.in || die
+ sed -i -e "s/^LANGS=.*$/LANGS=${LINGUAS}/" locale/Makefile.in || die
+
+ # Prepare external modules
+ if use case; then
+ cp -v "${WORKDIR}"/mod_case/mod_case.c contrib || die
+ cp -v "${WORKDIR}"/mod_case/mod_case.html doc/contrib || die
+ fi
+
+ if use clamav ; then
+ cp -v "${WORKDIR}"/mod_clamav-${MOD_CLAMAV}/mod_clamav.{c,h} contrib || die
+ eapply -p0 "${WORKDIR}"/mod_clamav-${MOD_CLAMAV}/001-add-mod_clamav-to-tests.patch
+ fi
+
+ if use diskuse; then
+ in_dir mod_diskuse eapply "${FILESDIR}"/${PN}-1.3.6_rc4-diskuse-refresh-api.patch
+
+ # ./configure will modify files. Symlink them instead of copying
+ ln -sv "${WORKDIR}"/mod_diskuse/mod_diskuse.h "${S}"/contrib || die
+
+ cp -v "${WORKDIR}"/mod_diskuse/mod_diskuse.c "${S}"/contrib || die
+ cp -v "${WORKDIR}"/mod_diskuse/mod_diskuse.html "${S}"/doc/contrib || die
+ fi
+
+ if use msg; then
+ in_dir mod_msg eapply "${FILESDIR}"/${PN}-1.3.6_rc4-msg-refresh-api.patch
+
+ cp -v "${WORKDIR}"/mod_msg/mod_msg.c contrib || die
+ cp -v "${WORKDIR}"/mod_msg/mod_msg.html doc/contrib || die
+ fi
+
+ if use vroot; then
+ in_dir ${PN}-mod_vroot-${MOD_VROOT} eapply "${FILESDIR}"/${PN}-1.3.6_rc4-vroot-refresh-api.patch
+
+ cp -v "${WORKDIR}"/${PN}-mod_vroot-${MOD_VROOT}/mod_vroot.c contrib || die
+ cp -v "${WORKDIR}"/${PN}-mod_vroot-${MOD_VROOT}/mod_vroot.html doc/contrib || die
+ fi
+
+ if use kerberos ; then
+ # in_dir mod_gss-${MOD_GSS} eapply "${FILESDIR}"/${PN}-1.3.6_rc4-gss-refresh-api.patch
+
+ # Support app-crypt/heimdal / Gentoo Bug #284853
+ sed -i -e "s/krb5_principal2principalname/_\0/" "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_auth_gss.c.in || die
+
+ # Remove obsolete DES / Gentoo Bug #324903
+ # Replace 'rpm' lookups / Gentoo Bug #391021
+ sed -i -e "/ac_gss_libs/s/ -ldes425//" \
+ -e "s/ac_libdir=\`rpm -q -l.*$/ac_libdir=\/usr\/$(get_libdir)\//" \
+ -e "s/ac_includedir=\`rpm -q -l.*$/ac_includedir=\/usr\/include\//" "${WORKDIR}"/mod_gss-${MOD_GSS}/configure{,.ac} || die
+
+ # ./configure will modify files. Symlink them instead of copying
+ ln -sv "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_auth_gss.c "${S}"/contrib || die
+ ln -sv "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_gss.c "${S}"/contrib || die
+ ln -sv "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_gss.h "${S}"/include || die
+
+ cp -v "${WORKDIR}"/mod_gss-${MOD_GSS}/README.mod_{auth_gss,gss} "${S}" || die
+ cp -v "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_gss.html "${S}"/doc/contrib || die
+ cp -v "${WORKDIR}"/mod_gss-${MOD_GSS}/rfc{1509,2228}.txt "${S}"/doc/rfc || die
+ fi
+
+ default
+
+ tc-export CC
+}
+
+src_configure() {
+ local c m
+
+ use acl && m="${m}:mod_facl"
+ use ban && m="${m}:mod_ban"
+ use case && m="${m}:mod_case"
+ use clamav && m="${m}:mod_clamav"
+ use copy && m="${m}:mod_copy"
+ use ctrls && m="${m}:mod_ctrls_admin"
+ use deflate && m="${m}:mod_deflate"
+ if use diskuse ; then
+ in_dir mod_diskuse econf
+ m="${m}:mod_diskuse"
+ fi
+ use dynmasq && m="${m}:mod_dynmasq"
+ use exec && m="${m}:mod_exec"
+ use ifsession && m="${m}:mod_ifsession"
+ use ifversion && m="${m}:mod_ifversion"
+ if use kerberos ; then
+ in_dir mod_gss-${MOD_GSS} econf
+ m="${m}:mod_gss:mod_auth_gss"
+ fi
+ use ldap && m="${m}:mod_ldap"
+ use log-forensic && m="${m}:mod_log_forensic"
+ use msg && m="${m}:mod_msg"
+ if use mysql || use postgres || use sqlite ; then
+ m="${m}:mod_sql:mod_sql_passwd"
+ use mysql && m="${m}:mod_sql_mysql"
+ use postgres && m="${m}:mod_sql_postgres"
+ use sqlite && m="${m}:mod_sql_sqlite"
+ fi
+ use qos && m="${m}:mod_qos"
+ use radius && m="${m}:mod_radius"
+ use ratio && m="${m}:mod_ratio"
+ use readme && m="${m}:mod_readme"
+ use rewrite && m="${m}:mod_rewrite"
+ if use sftp ; then
+ m="${m}:mod_sftp"
+ use pam && m="${m}:mod_sftp_pam"
+ use mysql || use postgres || use sqlite && m="${m}:mod_sftp_sql"
+ fi
+ use shaper && m="${m}:mod_shaper"
+ use sitemisc && m="${m}:mod_site_misc"
+ use snmp && m="${m}:mod_snmp"
+ if use softquota ; then
+ m="${m}:mod_quotatab:mod_quotatab_file"
+ use ldap && m="${m}:mod_quotatab_ldap"
+ use radius && m="${m}:mod_quotatab_radius"
+ use mysql || use postgres || use sqlite && m="${m}:mod_quotatab_sql"
+ fi
+ if use ssl ; then
+ m="${m}:mod_tls:mod_tls_shmcache"
+ use memcache && m="${m}:mod_tls_memcache"
+ fi
+ if use tcpd ; then
+ m="${m}:mod_wrap2:mod_wrap2_file"
+ use mysql || use postgres || use sqlite && m="${m}:mod_wrap2_sql"
+ fi
+ use unique-id && m="${m}:mod_unique_id"
+ use vroot && m="${m}:mod_vroot"
+
+ if [[ -n ${PROFTP_CUSTOM_MODULES} ]]; then
+ einfo "Adding user-specified extra modules: '${PROFTP_CUSTOM_MODULES}'"
+ m="${m}:${PROFTP_CUSTOM_MODULES}"
+ fi
+
+ [[ -z ${m} ]] || c="${c} --with-modules=${m:1}"
+
+ econf --localstatedir=/run/proftpd --sysconfdir=/etc/proftpd --disable-strip \
+ $(use_enable acl facl) \
+ $(use_enable authfile auth-file) \
+ $(use_enable caps cap) \
+ $(use_enable ctrls) \
+ $(use_enable dso) \
+ $(use_enable ident) \
+ $(use_enable ipv6) \
+ $(use_enable memcache) \
+ $(use_enable ncurses) \
+ $(use_enable nls) \
+ $(use_enable ssl openssl) \
+ $(use_enable pam auth-pam) \
+ $(use_enable pcre) \
+ $(use_enable sodium) \
+ $(use_enable test tests) \
+ --enable-trace \
+ $(use_enable userland_GNU shadow) \
+ $(use_enable userland_GNU autoshadow) \
+ ${c:1}
+}
+
+src_test() {
+ emake api-tests -C tests
+}
+
+src_install() {
+ default
+ [[ -z ${LINGUAS-set} ]] && rm -r "${ED}"/usr/share/locale
+ rm -rf "${ED}"/run "${ED}"/var/run
+
+ newinitd "${FILESDIR}"/proftpd.initd-r1 proftpd
+ insinto /etc/proftpd
+ doins "${FILESDIR}"/proftpd.conf.sample
+
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/proftpd.xinetd proftpd
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/${PN}.logrotate ${PN}
+
+ dodoc ChangeLog CREDITS INSTALL NEWS README* RELEASE_NOTES
+
+ docinto html
+ dodoc doc/*.html doc/contrib/*.html doc/howto/*.html doc/modules/*.html
+
+ docinto rfc
+ dodoc doc/rfc/*.txt
+
+ systemd_dounit "${FILESDIR}"/${PN}.service
+ newtmpfiles "${FILESDIR}"/${PN}-tmpfiles.d.conf-r1 ${PN}.conf
+}
+
+pkg_postinst() {
+ # Create /var/run files at package merge time: bug #650000
+ tmpfiles_process ${PN}.conf
+}
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-ftp/proftpd/files/, net-ftp/proftpd/
@ 2021-04-28 21:25 Sergei Trofimovich
0 siblings, 0 replies; 11+ messages in thread
From: Sergei Trofimovich @ 2021-04-28 21:25 UTC (permalink / raw
To: gentoo-commits
commit: 8af307971f9af69a21d9a423650a5db5b9857ed2
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 28 21:25:45 2021 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Wed Apr 28 21:25:55 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8af30797
net-ftp/proftpd: backport upstream slibtool workaround
Reported-by: Toralf Förster
Closes: https://bugs.gentoo.org/778332
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
.../proftpd/files/proftpd-1.3.7a-slibtool.patch | 34 ++++++++++++++++++++++
net-ftp/proftpd/proftpd-1.3.7a-r1.ebuild | 1 +
2 files changed, 35 insertions(+)
diff --git a/net-ftp/proftpd/files/proftpd-1.3.7a-slibtool.patch b/net-ftp/proftpd/files/proftpd-1.3.7a-slibtool.patch
new file mode 100644
index 00000000000..35676777da0
--- /dev/null
+++ b/net-ftp/proftpd/files/proftpd-1.3.7a-slibtool.patch
@@ -0,0 +1,34 @@
+https://bugs.gentoo.org/778332
+https://github.com/proftpd/proftpd/commit/4ffe04158840130e023ed3d3e558b8d70e28e20e
+
+From 2a15ce409f70c67ba9b1e09de67c3fca0b38eff8 Mon Sep 17 00:00:00 2001
+From: orbea <orbea@riseup.net>
+Date: Sun, 21 Mar 2021 12:38:52 -0700
+Subject: [PATCH] build: Fix linking the static libsupp.a library.
+
+---
+ configure.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/configure.in
++++ b/configure.in
+@@ -88,7 +88,7 @@ if test $ac_cv_prog_gcc = no -a "$OSTYPE" = "-DHPUX10"; then
+ CFLAGS="$CFLAGS -Ae"
+ fi
+
+-LDFLAGS="-L\$(top_srcdir)/lib -L\$(top_builddir)/lib $LDFLAGS"
++LDFLAGS="-Wl,-L\$(top_srcdir)/lib,-L\$(top_builddir)/lib $LDFLAGS"
+
+ # AIX has issues with the -rdynamic linker flag. How many different AIX
+ # versions should we support here?
+--- a/configure
++++ b/configure
+@@ -14932,7 +14944,7 @@ if test $ac_cv_c_compiler_gnu = no -a "$OSTYPE" = "-DHPUX10"; then
+ CFLAGS="$CFLAGS -Ae"
+ fi
+
+-LDFLAGS="-L\$(top_srcdir)/lib -L\$(top_builddir)/lib $LDFLAGS"
++LDFLAGS="-Wl,-L\$(top_srcdir)/lib,-L\$(top_builddir)/lib $LDFLAGS"
+
+ # AIX has issues with the -rdynamic linker flag. How many different AIX
+ # versions should we support here?
diff --git a/net-ftp/proftpd/proftpd-1.3.7a-r1.ebuild b/net-ftp/proftpd/proftpd-1.3.7a-r1.ebuild
index 249498784d2..7bef13f65e4 100644
--- a/net-ftp/proftpd/proftpd-1.3.7a-r1.ebuild
+++ b/net-ftp/proftpd/proftpd-1.3.7a-r1.ebuild
@@ -72,6 +72,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-1.3.6-use-trace.patch
"${FILESDIR}"/${P}-tinfow-segv.patch
"${FILESDIR}"/${P}-no-ncurses.patch
+ "${FILESDIR}"/${P}-slibtool.patch
)
RESTRICT=test # Some tests are ran in chroot. Confuse sandbox.
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-ftp/proftpd/files/, net-ftp/proftpd/
@ 2023-05-07 7:21 Sam James
0 siblings, 0 replies; 11+ messages in thread
From: Sam James @ 2023-05-07 7:21 UTC (permalink / raw
To: gentoo-commits
commit: 278b1e2a39273b072681f15b75fa6e9ee17030ab
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun May 7 07:20:41 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun May 7 07:21:05 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=278b1e2a
net-ftp/proftpd: fix configure w/ clang 16
Still seeing some suspicious ones so keeping it open for now.
Bug: https://bugs.gentoo.org/881709
Bug: https://bugs.gentoo.org/900066
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/proftpd-1.3.8-configure-clang16.patch | 255 +++++++++++++++++++
net-ftp/proftpd/proftpd-1.3.8-r1.ebuild | 275 +++++++++++++++++++++
2 files changed, 530 insertions(+)
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/proftpd-1.3.8-r1.ebuild b/net-ftp/proftpd/proftpd-1.3.8-r1.ebuild
new file mode 100644
index 000000000000..67887804453b
--- /dev/null
+++ b/net-ftp/proftpd/proftpd-1.3.8-r1.ebuild
@@ -0,0 +1,275 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit multilib systemd tmpfiles toolchain-funcs
+
+MOD_CASE="0.7"
+MOD_CLAMAV="0.14rc2"
+MOD_DISKUSE="0.9"
+MOD_GSS="1.3.9"
+MOD_MSG="0.4.1"
+MOD_VROOT="0.9.4"
+
+DESCRIPTION="An advanced and very configurable FTP server"
+HOMEPAGE="http://www.proftpd.org/
+ http://www.castaglia.org/proftpd/
+ https://github.com/jbenden/mod_clamav
+ http://gssmod.sourceforge.net/"
+SRC_URI="ftp://ftp.proftpd.org/distrib/source/${P/_/}.tar.gz
+ case? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-case-${MOD_CASE}.tar.gz )
+ clamav? ( https://github.com/jbenden/mod_clamav/archive/v${MOD_CLAMAV}.tar.gz -> ${PN}-mod_clamav-${MOD_CLAMAV}.tar.gz )
+ diskuse? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-diskuse-${MOD_DISKUSE}.tar.gz )
+ kerberos? ( mirror://sourceforge/gssmod/mod_gss-${MOD_GSS}.tar.gz )
+ msg? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-msg-${MOD_MSG}.tar.gz )
+ vroot? ( https://github.com/Castaglia/${PN}-mod_vroot/archive/v${MOD_VROOT}.tar.gz -> mod_vroot-${MOD_VROOT}.tar.gz )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
+IUSE="acl authfile ban +caps case clamav copy ctrls deflate diskuse dso dynmasq exec ifsession ifversion ident ipv6
+ kerberos ldap log-forensic memcache msg mysql ncurses nls pam +pcre postgres qos radius
+ ratio readme rewrite selinux sftp shaper sitemisc snmp sodium softquota sqlite ssl tcpd test unique-id vroot"
+# TODO: geoip
+REQUIRED_USE="ban? ( ctrls )
+ msg? ( ctrls )
+ sftp? ( ssl )
+ shaper? ( ctrls )
+
+ mysql? ( ssl )
+ postgres? ( ssl )
+ sqlite? ( ssl )
+"
+
+CDEPEND="virtual/libcrypt:=
+ acl? ( virtual/acl )
+ caps? ( sys-libs/libcap )
+ clamav? ( app-antivirus/clamav )
+ kerberos? ( virtual/krb5 )
+ ldap? ( net-nds/openldap:= )
+ memcache? ( >=dev-libs/libmemcached-0.41 )
+ mysql? ( dev-db/mysql-connector-c:0= )
+ nls? ( virtual/libiconv )
+ ncurses? ( sys-libs/ncurses:0= )
+ ssl? ( dev-libs/openssl:0= )
+ pam? ( sys-libs/pam )
+ pcre? ( dev-libs/libpcre )
+ postgres? ( dev-db/postgresql:= )
+ sodium? ( dev-libs/libsodium:0= )
+ sqlite? ( dev-db/sqlite:3 )
+"
+DEPEND="${CDEPEND}
+ test? ( dev-libs/check )"
+RDEPEND="${CDEPEND}
+ net-ftp/ftpbase
+ selinux? ( sec-policy/selinux-ftp )"
+
+S="${WORKDIR}/${P/_/}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.3.6-use-trace.patch
+ "${FILESDIR}"/${P}-configure-clang16.patch
+)
+
+RESTRICT=test # Some tests are ran in chroot. Confuse sandbox.
+
+in_dir() {
+ pushd "${WORKDIR}/${1}" || die
+ shift
+ "$@"
+ popd
+}
+
+src_prepare() {
+ # Skip 'install-conf' / Support LINGUAS
+ sed -i -e "/install-all/s/ install-conf//" Makefile.in || die
+ sed -i -e "s/^LANGS=.*$/LANGS=${LINGUAS}/" locale/Makefile.in || die
+
+ # Prepare external modules
+ if use case; then
+ cp -v "${WORKDIR}"/mod_case/mod_case.c contrib || die
+ cp -v "${WORKDIR}"/mod_case/mod_case.html doc/contrib || die
+ fi
+
+ if use clamav ; then
+ cp -v "${WORKDIR}"/mod_clamav-${MOD_CLAMAV}/mod_clamav.{c,h} contrib || die
+ eapply -p0 "${WORKDIR}"/mod_clamav-${MOD_CLAMAV}/001-add-mod_clamav-to-tests.patch
+ fi
+
+ if use diskuse; then
+ in_dir mod_diskuse eapply "${FILESDIR}"/${PN}-1.3.6_rc4-diskuse-refresh-api.patch
+
+ # ./configure will modify files. Symlink them instead of copying
+ ln -sv "${WORKDIR}"/mod_diskuse/mod_diskuse.h "${S}"/contrib || die
+
+ cp -v "${WORKDIR}"/mod_diskuse/mod_diskuse.c "${S}"/contrib || die
+ cp -v "${WORKDIR}"/mod_diskuse/mod_diskuse.html "${S}"/doc/contrib || die
+ fi
+
+ if use msg; then
+ in_dir mod_msg eapply "${FILESDIR}"/${PN}-1.3.6_rc4-msg-refresh-api.patch
+
+ cp -v "${WORKDIR}"/mod_msg/mod_msg.c contrib || die
+ cp -v "${WORKDIR}"/mod_msg/mod_msg.html doc/contrib || die
+ fi
+
+ if use vroot; then
+ in_dir ${PN}-mod_vroot-${MOD_VROOT} eapply "${FILESDIR}"/${PN}-1.3.6_rc4-vroot-refresh-api.patch
+
+ cp -v "${WORKDIR}"/${PN}-mod_vroot-${MOD_VROOT}/mod_vroot.c contrib || die
+ cp -v "${WORKDIR}"/${PN}-mod_vroot-${MOD_VROOT}/mod_vroot.html doc/contrib || die
+ fi
+
+ if use kerberos ; then
+ # in_dir mod_gss-${MOD_GSS} eapply "${FILESDIR}"/${PN}-1.3.6_rc4-gss-refresh-api.patch
+
+ # Support app-crypt/heimdal / Gentoo Bug #284853
+ sed -i -e "s/krb5_principal2principalname/_\0/" "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_auth_gss.c.in || die
+
+ # Remove obsolete DES / Gentoo Bug #324903
+ # Replace 'rpm' lookups / Gentoo Bug #391021
+ sed -i -e "/ac_gss_libs/s/ -ldes425//" \
+ -e "s/ac_libdir=\`rpm -q -l.*$/ac_libdir=\/usr\/$(get_libdir)\//" \
+ -e "s/ac_includedir=\`rpm -q -l.*$/ac_includedir=\/usr\/include\//" "${WORKDIR}"/mod_gss-${MOD_GSS}/configure{,.ac} || die
+
+ # ./configure will modify files. Symlink them instead of copying
+ ln -sv "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_auth_gss.c "${S}"/contrib || die
+ ln -sv "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_gss.c "${S}"/contrib || die
+ ln -sv "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_gss.h "${S}"/include || die
+
+ cp -v "${WORKDIR}"/mod_gss-${MOD_GSS}/README.mod_{auth_gss,gss} "${S}" || die
+ cp -v "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_gss.html "${S}"/doc/contrib || die
+ cp -v "${WORKDIR}"/mod_gss-${MOD_GSS}/rfc{1509,2228}.txt "${S}"/doc/rfc || die
+ fi
+
+ default
+
+ tc-export CC
+}
+
+src_configure() {
+ local c m
+
+ use acl && m="${m}:mod_facl"
+ use ban && m="${m}:mod_ban"
+ use case && m="${m}:mod_case"
+ use clamav && m="${m}:mod_clamav"
+ use copy && m="${m}:mod_copy"
+ use ctrls && m="${m}:mod_ctrls_admin"
+ use deflate && m="${m}:mod_deflate"
+ if use diskuse ; then
+ in_dir mod_diskuse econf
+ m="${m}:mod_diskuse"
+ fi
+ use dynmasq && m="${m}:mod_dynmasq"
+ use exec && m="${m}:mod_exec"
+ use ifsession && m="${m}:mod_ifsession"
+ use ifversion && m="${m}:mod_ifversion"
+ if use kerberos ; then
+ in_dir mod_gss-${MOD_GSS} econf
+ m="${m}:mod_gss:mod_auth_gss"
+ fi
+ use ldap && m="${m}:mod_ldap"
+ use log-forensic && m="${m}:mod_log_forensic"
+ use msg && m="${m}:mod_msg"
+ if use mysql || use postgres || use sqlite ; then
+ m="${m}:mod_sql:mod_sql_passwd"
+ use mysql && m="${m}:mod_sql_mysql"
+ use postgres && m="${m}:mod_sql_postgres"
+ use sqlite && m="${m}:mod_sql_sqlite"
+ fi
+ use qos && m="${m}:mod_qos"
+ use radius && m="${m}:mod_radius"
+ use ratio && m="${m}:mod_ratio"
+ use readme && m="${m}:mod_readme"
+ use rewrite && m="${m}:mod_rewrite"
+ if use sftp ; then
+ m="${m}:mod_sftp"
+ use pam && m="${m}:mod_sftp_pam"
+ use mysql || use postgres || use sqlite && m="${m}:mod_sftp_sql"
+ fi
+ use shaper && m="${m}:mod_shaper"
+ use sitemisc && m="${m}:mod_site_misc"
+ use snmp && m="${m}:mod_snmp"
+ if use softquota ; then
+ m="${m}:mod_quotatab:mod_quotatab_file"
+ use ldap && m="${m}:mod_quotatab_ldap"
+ use radius && m="${m}:mod_quotatab_radius"
+ use mysql || use postgres || use sqlite && m="${m}:mod_quotatab_sql"
+ fi
+ if use ssl ; then
+ m="${m}:mod_tls:mod_tls_shmcache"
+ use memcache && m="${m}:mod_tls_memcache"
+ fi
+ if use tcpd ; then
+ m="${m}:mod_wrap2:mod_wrap2_file"
+ use mysql || use postgres || use sqlite && m="${m}:mod_wrap2_sql"
+ fi
+ use unique-id && m="${m}:mod_unique_id"
+ use vroot && m="${m}:mod_vroot"
+
+ if [[ -n ${PROFTP_CUSTOM_MODULES} ]]; then
+ einfo "Adding user-specified extra modules: '${PROFTP_CUSTOM_MODULES}'"
+ m="${m}:${PROFTP_CUSTOM_MODULES}"
+ fi
+
+ [[ -z ${m} ]] || c="${c} --with-modules=${m:1}"
+
+ econf --localstatedir=/run/proftpd --sysconfdir=/etc/proftpd --disable-strip \
+ $(use_enable acl facl) \
+ $(use_enable authfile auth-file) \
+ $(use_enable caps cap) \
+ $(use_enable ctrls) \
+ $(use_enable dso) \
+ $(use_enable ident) \
+ $(use_enable ipv6) \
+ $(use_enable memcache) \
+ $(use_enable ncurses) \
+ $(use_enable nls) \
+ $(use_enable ssl openssl) \
+ $(use_enable pam auth-pam) \
+ $(use_enable pcre) \
+ $(use_enable sodium) \
+ $(use_enable test tests) \
+ --enable-trace \
+ --enable-shadow \
+ --enable-autoshadow \
+ ${c:1}
+}
+
+src_test() {
+ emake api-tests -C tests
+}
+
+src_install() {
+ default
+ [[ -z ${LINGUAS-set} ]] && rm -r "${ED}"/usr/share/locale
+ rm -rf "${ED}"/run "${ED}"/var/run
+
+ newinitd "${FILESDIR}"/proftpd.initd-r1 proftpd
+ insinto /etc/proftpd
+ doins "${FILESDIR}"/proftpd.conf.sample
+
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/proftpd.xinetd proftpd
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/${PN}.logrotate ${PN}
+
+ dodoc ChangeLog CREDITS INSTALL NEWS README* RELEASE_NOTES
+
+ docinto html
+ dodoc doc/*.html doc/contrib/*.html doc/howto/*.html doc/modules/*.html
+
+ docinto rfc
+ dodoc doc/rfc/*.txt
+
+ systemd_dounit "${FILESDIR}"/${PN}.service
+ newtmpfiles "${FILESDIR}"/${PN}-tmpfiles.d.conf-r1 ${PN}.conf
+}
+
+pkg_postinst() {
+ # Create /var/run files at package merge time: bug #650000
+ tmpfiles_process ${PN}.conf
+}
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-ftp/proftpd/files/, net-ftp/proftpd/
@ 2023-12-09 18:11 Sam James
0 siblings, 0 replies; 11+ messages in thread
From: Sam James @ 2023-12-09 18:11 UTC (permalink / raw
To: gentoo-commits
commit: 61e89992642acf9366fdb35efb95ac3132515293
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 9 17:16:33 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Dec 9 18:06:01 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61e89992
net-ftp/proftpd: fix modern C issue in configure
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/proftpd-1.3.8a-configure-c99.patch | 34 +++
net-ftp/proftpd/proftpd-1.3.8a-r1.ebuild | 304 +++++++++++++++++++++
2 files changed, 338 insertions(+)
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/proftpd-1.3.8a-r1.ebuild b/net-ftp/proftpd/proftpd-1.3.8a-r1.ebuild
new file mode 100644
index 000000000000..8e3630ce042f
--- /dev/null
+++ b/net-ftp/proftpd/proftpd-1.3.8a-r1.ebuild
@@ -0,0 +1,304 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit multilib systemd tmpfiles toolchain-funcs
+
+MOD_CASE="0.7"
+MOD_CLAMAV="0.14rc2"
+MOD_DISKUSE="0.9"
+MOD_GSS="1.3.9"
+MOD_MSG="0.4.1"
+MOD_VROOT="0.9.4"
+
+DESCRIPTION="An advanced and very configurable FTP server"
+HOMEPAGE="
+ http://www.proftpd.org/
+ http://www.castaglia.org/proftpd/
+ https://github.com/jbenden/mod_clamav
+ http://gssmod.sourceforge.net/
+"
+SRC_URI="
+ ftp://ftp.proftpd.org/distrib/source/${P/_/}.tar.gz
+ case? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-case-${MOD_CASE}.tar.gz )
+ clamav? ( https://github.com/jbenden/mod_clamav/archive/v${MOD_CLAMAV}.tar.gz -> ${PN}-mod_clamav-${MOD_CLAMAV}.tar.gz )
+ diskuse? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-diskuse-${MOD_DISKUSE}.tar.gz )
+ kerberos? ( mirror://sourceforge/gssmod/mod_gss-${MOD_GSS}.tar.gz )
+ msg? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-msg-${MOD_MSG}.tar.gz )
+ vroot? ( https://github.com/Castaglia/${PN}-mod_vroot/archive/v${MOD_VROOT}.tar.gz -> mod_vroot-${MOD_VROOT}.tar.gz )
+"
+S="${WORKDIR}/${P/_/}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
+IUSE="acl authfile ban +caps case clamav copy ctrls deflate diskuse dso dynmasq exec ifsession ifversion ident ipv6
+ kerberos ldap log-forensic memcache msg mysql ncurses nls pam +pcre postgres qos radius
+ ratio readme rewrite selinux sftp shaper sitemisc snmp sodium softquota sqlite ssl tcpd test unique-id vroot"
+# Some tests are ran in chroot. Confuses sandbox.
+RESTRICT="test"
+# TODO: geoip
+REQUIRED_USE="
+ ban? ( ctrls )
+ msg? ( ctrls )
+ sftp? ( ssl )
+ shaper? ( ctrls )
+
+ mysql? ( ssl )
+ postgres? ( ssl )
+ sqlite? ( ssl )
+"
+
+COMMON_DEPEND="
+ virtual/libcrypt:=
+ acl? ( virtual/acl )
+ caps? ( sys-libs/libcap )
+ clamav? ( app-antivirus/clamav )
+ kerberos? ( virtual/krb5 )
+ ldap? ( net-nds/openldap:= )
+ memcache? ( >=dev-libs/libmemcached-0.41 )
+ mysql? ( dev-db/mysql-connector-c:0= )
+ nls? ( virtual/libiconv )
+ ncurses? ( sys-libs/ncurses:0= )
+ ssl? ( dev-libs/openssl:0= )
+ pam? ( sys-libs/pam )
+ pcre? ( dev-libs/libpcre )
+ postgres? ( dev-db/postgresql:= )
+ sodium? ( dev-libs/libsodium:0= )
+ sqlite? ( dev-db/sqlite:3 )
+"
+DEPEND="
+ ${COMMON_DEPEND}
+ test? ( dev-libs/check )
+"
+RDEPEND="
+ ${COMMON_DEPEND}
+ net-ftp/ftpbase
+ selinux? ( sec-policy/selinux-ftp )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.3.6-use-trace.patch
+ "${FILESDIR}"/${PN}-1.3.8-configure-clang16.patch
+ "${FILESDIR}"/${PN}-1.3.8a-configure-c99.patch
+)
+
+QA_CONFIG_IMPL_DECL_SKIP=(
+ # AIX only
+ authenticate
+ loginfailed
+ loginsuccess
+
+ # Deprecated/removed functions, not actually checking for this anyway
+ SSLeay_add_all_algorithms
+ # Test isn't actually checking for BIO_f_zlib
+ BIO_f_zlib
+)
+
+in_dir() {
+ pushd "${WORKDIR}/${1}" || die
+ shift
+ "$@"
+ popd
+}
+
+src_prepare() {
+ # Skip 'install-conf' / Support LINGUAS
+ sed -i -e "/install-all/s/ install-conf//" Makefile.in || die
+ sed -i -e "s/^LANGS=.*$/LANGS=${LINGUAS}/" locale/Makefile.in || die
+
+ # Prepare external modules
+ if use case; then
+ cp -v "${WORKDIR}"/mod_case/mod_case.c contrib || die
+ cp -v "${WORKDIR}"/mod_case/mod_case.html doc/contrib || die
+ fi
+
+ if use clamav ; then
+ cp -v "${WORKDIR}"/mod_clamav-${MOD_CLAMAV}/mod_clamav.{c,h} contrib || die
+ eapply -p0 "${WORKDIR}"/mod_clamav-${MOD_CLAMAV}/001-add-mod_clamav-to-tests.patch
+ fi
+
+ if use diskuse; then
+ in_dir mod_diskuse eapply "${FILESDIR}"/${PN}-1.3.6_rc4-diskuse-refresh-api.patch
+
+ # ./configure will modify files. Symlink them instead of copying
+ ln -sv "${WORKDIR}"/mod_diskuse/mod_diskuse.h "${S}"/contrib || die
+
+ cp -v "${WORKDIR}"/mod_diskuse/mod_diskuse.c "${S}"/contrib || die
+ cp -v "${WORKDIR}"/mod_diskuse/mod_diskuse.html "${S}"/doc/contrib || die
+ fi
+
+ if use msg; then
+ in_dir mod_msg eapply "${FILESDIR}"/${PN}-1.3.6_rc4-msg-refresh-api.patch
+
+ cp -v "${WORKDIR}"/mod_msg/mod_msg.c contrib || die
+ cp -v "${WORKDIR}"/mod_msg/mod_msg.html doc/contrib || die
+ fi
+
+ if use vroot; then
+ in_dir ${PN}-mod_vroot-${MOD_VROOT} eapply "${FILESDIR}"/${PN}-1.3.6_rc4-vroot-refresh-api.patch
+
+ cp -v "${WORKDIR}"/${PN}-mod_vroot-${MOD_VROOT}/mod_vroot.c contrib || die
+ cp -v "${WORKDIR}"/${PN}-mod_vroot-${MOD_VROOT}/mod_vroot.html doc/contrib || die
+ fi
+
+ if use kerberos ; then
+ # in_dir mod_gss-${MOD_GSS} eapply "${FILESDIR}"/${PN}-1.3.6_rc4-gss-refresh-api.patch
+
+ # Support app-crypt/heimdal / Gentoo Bug #284853
+ sed -i -e "s/krb5_principal2principalname/_\0/" "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_auth_gss.c.in || die
+
+ # Remove obsolete DES / Gentoo Bug #324903
+ # Replace 'rpm' lookups / Gentoo Bug #391021
+ sed -i -e "/ac_gss_libs/s/ -ldes425//" \
+ -e "s/ac_libdir=\`rpm -q -l.*$/ac_libdir=\/usr\/$(get_libdir)\//" \
+ -e "s/ac_includedir=\`rpm -q -l.*$/ac_includedir=\/usr\/include\//" "${WORKDIR}"/mod_gss-${MOD_GSS}/configure{,.ac} || die
+
+ # ./configure will modify files. Symlink them instead of copying
+ ln -sv "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_auth_gss.c "${S}"/contrib || die
+ ln -sv "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_gss.c "${S}"/contrib || die
+ ln -sv "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_gss.h "${S}"/include || die
+
+ cp -v "${WORKDIR}"/mod_gss-${MOD_GSS}/README.mod_{auth_gss,gss} "${S}" || die
+ cp -v "${WORKDIR}"/mod_gss-${MOD_GSS}/mod_gss.html "${S}"/doc/contrib || die
+ cp -v "${WORKDIR}"/mod_gss-${MOD_GSS}/rfc{1509,2228}.txt "${S}"/doc/rfc || die
+ fi
+
+ default
+
+ tc-export CC
+}
+
+src_configure() {
+ local c m
+
+ use acl && m="${m}:mod_facl"
+ use ban && m="${m}:mod_ban"
+ use case && m="${m}:mod_case"
+ use clamav && m="${m}:mod_clamav"
+ use copy && m="${m}:mod_copy"
+ use ctrls && m="${m}:mod_ctrls_admin"
+ use deflate && m="${m}:mod_deflate"
+ if use diskuse ; then
+ in_dir mod_diskuse econf
+ m="${m}:mod_diskuse"
+ fi
+ use dynmasq && m="${m}:mod_dynmasq"
+ use exec && m="${m}:mod_exec"
+ use ifsession && m="${m}:mod_ifsession"
+ use ifversion && m="${m}:mod_ifversion"
+ if use kerberos ; then
+ in_dir mod_gss-${MOD_GSS} econf
+ m="${m}:mod_gss:mod_auth_gss"
+ fi
+ use ldap && m="${m}:mod_ldap"
+ use log-forensic && m="${m}:mod_log_forensic"
+ use msg && m="${m}:mod_msg"
+ if use mysql || use postgres || use sqlite ; then
+ m="${m}:mod_sql:mod_sql_passwd"
+ use mysql && m="${m}:mod_sql_mysql"
+ use postgres && m="${m}:mod_sql_postgres"
+ use sqlite && m="${m}:mod_sql_sqlite"
+ fi
+ use qos && m="${m}:mod_qos"
+ use radius && m="${m}:mod_radius"
+ use ratio && m="${m}:mod_ratio"
+ use readme && m="${m}:mod_readme"
+ use rewrite && m="${m}:mod_rewrite"
+ if use sftp ; then
+ m="${m}:mod_sftp"
+ use pam && m="${m}:mod_sftp_pam"
+ use mysql || use postgres || use sqlite && m="${m}:mod_sftp_sql"
+ fi
+ use shaper && m="${m}:mod_shaper"
+ use sitemisc && m="${m}:mod_site_misc"
+ use snmp && m="${m}:mod_snmp"
+ if use softquota ; then
+ m="${m}:mod_quotatab:mod_quotatab_file"
+ use ldap && m="${m}:mod_quotatab_ldap"
+ use radius && m="${m}:mod_quotatab_radius"
+ use mysql || use postgres || use sqlite && m="${m}:mod_quotatab_sql"
+ fi
+ if use ssl ; then
+ m="${m}:mod_tls:mod_tls_shmcache"
+ use memcache && m="${m}:mod_tls_memcache"
+ fi
+ if use tcpd ; then
+ m="${m}:mod_wrap2:mod_wrap2_file"
+ use mysql || use postgres || use sqlite && m="${m}:mod_wrap2_sql"
+ fi
+ use unique-id && m="${m}:mod_unique_id"
+ use vroot && m="${m}:mod_vroot"
+
+ if [[ -n ${PROFTP_CUSTOM_MODULES} ]]; then
+ einfo "Adding user-specified extra modules: '${PROFTP_CUSTOM_MODULES}'"
+ m="${m}:${PROFTP_CUSTOM_MODULES}"
+ fi
+
+ [[ -z ${m} ]] || c="${c} --with-modules=${m:1}"
+
+ local myeconfargs=(
+ --cache-file="${S}"/config.cache
+ --localstatedir=/run/proftpd
+ --sysconfdir=/etc/proftpd
+ --disable-strip
+ $(use_enable acl facl)
+ $(use_enable authfile auth-file)
+ $(use_enable caps cap)
+ $(use_enable ctrls)
+ $(use_enable dso)
+ $(use_enable ident)
+ $(use_enable ipv6)
+ $(use_enable memcache)
+ $(use_enable ncurses)
+ $(use_enable nls)
+ $(use_enable ssl openssl)
+ $(use_enable pam auth-pam)
+ $(use_enable pcre)
+ $(use_enable sodium)
+ $(use_enable test tests)
+ --enable-trace
+ --enable-shadow
+ --enable-autoshadow
+ ${c:1}
+ )
+
+ econf "${myeconfargs[@]}"
+}
+
+src_test() {
+ emake api-tests -C tests
+}
+
+src_install() {
+ default
+ [[ -z ${LINGUAS-set} ]] && rm -r "${ED}"/usr/share/locale
+ rm -rf "${ED}"/run "${ED}"/var/run
+
+ newinitd "${FILESDIR}"/proftpd.initd-r1 proftpd
+ insinto /etc/proftpd
+ doins "${FILESDIR}"/proftpd.conf.sample
+
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/proftpd.xinetd proftpd
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/${PN}.logrotate ${PN}
+
+ dodoc ChangeLog CREDITS INSTALL NEWS README* RELEASE_NOTES
+
+ docinto html
+ dodoc doc/*.html doc/contrib/*.html doc/howto/*.html doc/modules/*.html
+
+ docinto rfc
+ dodoc doc/rfc/*.txt
+
+ systemd_dounit "${FILESDIR}"/${PN}.service
+ newtmpfiles "${FILESDIR}"/${PN}-tmpfiles.d.conf-r1 ${PN}.conf
+}
+
+pkg_postinst() {
+ # Create /var/run files at package merge time: bug #650000
+ tmpfiles_process ${PN}.conf
+}
^ permalink raw reply related [flat|nested] 11+ messages in thread
end of thread, other threads:[~2023-12-09 18:11 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-21 9:45 [gentoo-commits] repo/gentoo:master commit in: net-ftp/proftpd/files/, net-ftp/proftpd/ Sergei Trofimovich
-- strict thread matches above, loose matches on Subject: below --
2023-12-09 18:11 Sam James
2023-05-07 7:21 Sam James
2021-04-28 21:25 Sergei Trofimovich
2020-05-31 17:18 Sergei Trofimovich
2020-03-02 23:40 Sergei Trofimovich
2019-12-02 22:52 Sergei Trofimovich
2019-10-01 22:16 Sergei Trofimovich
2019-08-19 7:43 Sergei Trofimovich
2017-03-26 21:29 Sergei Trofimovich
2015-12-01 22:23 Sergei Trofimovich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox