1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-24 04:33:24 +00:00

Remove mail/fetchmail64, use mail/fetchmail instead.

fixes up incomplete r513169, and follows
PR: 240908
This commit is contained in:
Matthias Andree 2019-09-28 21:30:48 +00:00
parent 1ecd682659
commit 57cd12fda9
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=513170
9 changed files with 0 additions and 483 deletions

View File

@ -1,88 +0,0 @@
# Created by: Ville Eerola <ve@sci.fi>
# $FreeBSD$
PORTNAME?= fetchmail
DISTVERSION= 6.4.1
CATEGORIES= mail ipv6
MASTER_SITES= SF/${PORTNAME}/branch_6.4/
PKGNAMESUFFIX= 64
# chalpin@cs.wisc.edu has full permissions to this port except overriding MAINTAINER line.
MAINTAINER= mandree@FreeBSD.org
COMMENT?= Batch mail retrieval utility for IMAP/POP3/ETRN/ODMR - release candidate
LICENSE= GPLv2 LGPL21
LICENSE_COMB= dual
.if empty(MASTERDIR)
PATCH_STRIP= -p1
RUN_DEPENDS= ${LOCALBASE}/share/certs/ca-root-nss.crt:security/ca_root_nss
USES= cpe gmake tar:xz ssl
USERS= ${PORTNAME}
GROUPS= ${USERS}
USE_RC_SUBR= fetchmail
SUB_FILES= pkg-message
CONFLICTS_INSTALL= fetchmail-6.3*
GNU_CONFIGURE= yes
# the added PYTHON=: suppresses python builds,
# see ../../mail/fetchmailconf/ for the configuration tool
CONFIGURE_ARGS= --enable-opie --enable-RPA --enable-SDPS \
--without-hesiod --enable-fallback=no \
--with-ssl=${OPENSSLBASE} PYTHON=:
# -Wl,--as-needed suppresses unneeded library references,
# for instance, libcom_err.so on GSSAPI_NONE builds:
LDFLAGS+= -L${LOCALBASE}/lib -Wl,--as-needed
OPTIONS_DEFINE= NLS DOCS
OPTIONS_SINGLE= GSSAPI
OPTIONS_SINGLE_GSSAPI= GSSAPI_BASE GSSAPI_HEIMDAL GSSAPI_MIT GSSAPI_NONE
OPTIONS_DEFAULT= GSSAPI_BASE
OPTIONS_SUB= yes
GSSAPI_BASE_USES= gssapi
GSSAPI_BASE_CONFIGURE_ON= --with-gssapi=${GSSAPIBASEDIR} ${GSSAPI_CONFIGURE_ARGS}
GSSAPI_HEIMDAL_USES= gssapi:heimdal
GSSAPI_HEIMDAL_CONFIGURE_ON= --with-gssapi=${GSSAPIBASEDIR} ${GSSAPI_CONFIGURE_ARGS}
GSSAPI_MIT_USES= gssapi:mit
GSSAPI_MIT_CONFIGURE_ON= --with-kerberos5=${GSSAPIBASEDIR} ${GSSAPI_CONFIGURE_ARGS}
GSSAPI_NONE_CONFIGURE_ON= --without-gssapi
NLS_USES= gettext
NLS_CONFIGURE_ENABLE= nls
PORTDOCS= FAQ FEATURES NEWS NOTES OLDNEWS \
README README.SSL README.SSL-SERVER \
design-notes.html fetchmail-FAQ.html fetchmail-features.html \
esrs-design-notes.html todo.html
post-patch:
.if !exists(/usr/lib/libcom_err.so)
@${REINPLACE_CMD} -e "s,-lcom_err,,g" ${WRKSRC}/configure
.endif
.endif
.if empty(MASTERDIR)
post-build:
${MAKE_CMD} -C ${WRKSRC} check
post-install:
${INSTALL} -d ${STAGEDIR}/var/run/fetchmail
${INSTALL_DATA} ${FILESDIR}/fetchmailrc.sample \
${STAGEDIR}${PREFIX}/etc/fetchmailrc.sample
${RM} ${STAGEDIR}${PREFIX}/bin/fetchmailconf
${RM} ${STAGEDIR}${PREFIX}/man/man1/fetchmailconf.1*
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
.endif
.include <bsd.port.mk>

View File

@ -1,3 +0,0 @@
TIMESTAMP = 1569667212
SHA256 (fetchmail-6.4.1.tar.xz) = 3f33f11dd08c3e8cc3e9d18eec686b1626d4818f4d5a72791507bbc4dce6a9a0
SIZE (fetchmail-6.4.1.tar.xz) = 1257488

View File

@ -1,150 +0,0 @@
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: fetchmail
# REQUIRE: LOGIN mail
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to fetchmail in daemon
# mode.
#
# fetchmail_enable="YES"
#
# There are two variants:
#
# * Single system-wide fetchmail daemon:
# - It is run as user `fetchmail_user' (default: fetchmail)
# Note: The directory /var/run/fetchmail must be writable for
# 'fetchmail_user'.
# - All configuration is contained in one global file
# 'fetchmail_config' (default: %%PREFIX%%/etc/fetchmailrc)
# that must be owned by 'fetchmail_user' (mode 700)
# - The fetchmail daemon awakes to fetch mail every
# 'fetchmail_polling_interval' seconds (default: 900).
#
# * Per-user daemon
# - Users for which a fetchmail daemon is to be started must be
# listed in 'fetchmail_users', e.g. fetchmail_users="user1 user2"
# The 'fetchmail_user' (sic!) variable is ignored in this
# configuration variant.
# - The config files for the individual users must be located at
# ${fetchmail_home_prefix}/${user}/${fetchmail_config_name}. The
# default for 'fetchmail_home_prefix' is "/home", and that for
# 'fetchmail_config_name' is ".fetchmailrc".
# - Note that "${fetchmail_home_prefix}/${user}" must be writable
# for ${user} since it is used to store the per-user PID files!
# - There are user-specific versions of 'fetchmail_config' and
# 'fetchmail_polling_interval' that can be used to override the
# defaults, i.e. for the user 'user1' there are variables
# 'fetchmail_user1_config' and 'fetchmail_user1_polling_interval'
# - All commands (e.g. start, stop, awaken (see below)) can be either
# passed to all instances of the daemon (if %%PREFIX%%/etc/rc.d/fetchmail)
# is run as root), or just to the instance belonging to the respective
# user.
#
# Extra commands:
#
# * 'awaken': Sends a signal to the daemon(s) to check for new mail
# immediately
#
# Fetchmail configuration:
#
# In any case, you will need a working fetchmailrc file. Please consult
# the man page fetchmail(1), the documentation in %%PREFIX%%/share/doc/fetchmail/
# and/or the material found at <http://www.fetchmail.info/>.
. /etc/rc.subr
name=fetchmail
rcvar=fetchmail_enable
command=%%PREFIX%%/bin/${name}
pidfile=/var/run/fetchmail/${name}.pid
extra_commands="awaken"
awaken_cmd="fetchmail_awaken"
fetchmail_script=%%PREFIX%%/etc/rc.d/$name
# read settings, set default values
load_rc_config "$name"
: ${fetchmail_enable="NO"}
: ${fetchmail_user="fetchmail"}
: ${fetchmail_config="%%PREFIX%%/etc/fetchmailrc"}
: ${fetchmail_polling_interval="900"}
: ${fetchmail_logging_facility="--syslog"}
: ${fetchmail_home_prefix="/home"}
: ${fetchmail_config_name=".fetchmailrc"}
# send signal to fetchmail process(es) to check for new mail immediately
fetchmail_awaken()
{
if [ $rc_pid ]; then
echo "Forcing fetchmail to check mailbox(es)..."
kill -USR1 $rc_pid
else
echo "$name not running? (check $pidfile)"
fi
return
}
if [ -n "$2" ]; then
# perform action for an instance of fetchmail daemon
user="$2"
if [ "x${fetchmail_users}" != "x" -o "x$3" = "xGLOBALCONFIG" ]; then
if [ "x${fetchmail_users}" != "x" ]; then
# multiuser setup: determine user specific config and pid file
eval fetchmail_config="\${fetchmail_${user}_config:-${fetchmail_home_prefix}/${user}}/${fetchmail_config_name}"
eval pidfile="${fetchmail_home_prefix}/${user}/.fetchmail.pid"
eval fetchmail_user=$user
else
eval pidfile=/var/run/fetchmail/fetchmail.pid
fi
required_files=${fetchmail_config}
eval fetchmail_polling_interval="\${fetchmail_${user}_polling_interval:-${fetchmail_polling_interval}}"
fetchmail_flags="-f ${fetchmail_config} \
--pidfile ${pidfile} \
-d ${fetchmail_polling_interval} \
${fetchmail_logging_facility}"
else
echo "$0: extra argument ignored"
fi
else
uid=`id -u`
if [ "x${fetchmail_users}" != "x" -a "x$1" != "x" -a "$uid" = "0" ]; then
# root mode: multiple user profiles are handled by recursive
# calls of this script
for user in ${fetchmail_users}; do
echo "===> fetchmail user: ${user}"
$fetchmail_script $1 ${user}
retcode="$?"
if [ "0${retcode}" -ne 0 ]; then
failed="${user} (${retcode}) ${failed:-}"
else
success="${user} ${success:-}"
fi
done
exit 0
else
if [ "x${fetchmail_users}" = "x" ]; then
# There is only one global configuration file
globalconfig=GLOBALCONFIG
fi
$fetchmail_script $1 `id -u -n` $globalconfig
retcode="$?"
if [ "0${retcode}" -ne 0 ]; then
failed="${user} (${retcode}) ${failed:-}"
exit 1
else
success="${user} ${success:-}"
fi
exit 0
fi
fi
# actually execute the fetchmail program
export FETCHMAILUSER=$fetchmail_user
run_rc_command "$1"

View File

@ -1,3 +0,0 @@
# Your fetchmail configuration goes here.
#
# See fetchmail(1).

View File

@ -1,159 +0,0 @@
From 87626c2707cc0d82e49e160ab3c85430ff33534f Mon Sep 17 00:00:00 2001
From: Matthias Andree <matthias.andree@gmx.de>
Date: Sat, 24 Aug 2019 17:53:08 +0200
Subject: [PATCH] Properly report size of mailboxes of 2 GibiB or above.
To fix Debian Bug#873668, reported by Andreas Schmidt.
This requires C99's new long long type.
---
NEWS | 7 +++++++
driver.c | 7 ++++---
etrn.c | 2 +-
fetchmail.h | 2 +-
imap.c | 2 +-
odmr.c | 2 +-
pop2.c | 2 +-
pop3.c | 4 ++--
8 files changed, 18 insertions(+), 10 deletions(-)
diff --git a/NEWS b/NEWS
index c01f9df9..9485edca 100644
--- a/NEWS
+++ b/NEWS
@@ -63,5 +63,12 @@
--------------------------------------------------------------------------------
+## BUG FIXES
+* fetchmail can now report mailbox sizes of 2^31 octets and beyond.
+ This requires C99 support (for the long long type).
+ Fixes Debian Bug#873668, reported by Andreas Schmidt.
+
+--------------------------------------------------------------------------------
+
fetchmail-6.4.1 (released 2019-09-28, 27473 LoC):
diff --git a/driver.c b/driver.c
index d21a32ab..a5033729 100644
--- a/driver.c
+++ b/driver.c
@@ -932,7 +932,7 @@ static int do_session(
{
/* sigsetjmp returned zero -> normal operation */
char buf[MSGBUFSIZE+1], *realhost;
- int count, newm, bytes;
+ int count, newm;
int fetches, dispatches, transient_errors, oldphase;
struct idlist *idp;
@@ -1306,6 +1306,7 @@ is restored."));
/* compute # of messages and number of new messages waiting */
stage = STAGE_GETRANGE;
+ unsigned long long bytes;
err = (ctl->server.base_protocol->getrange)(mailserver_socket, ctl, idp->id, &count, &newm, &bytes);
if (err != 0)
goto cleanUp;
@@ -1335,10 +1336,10 @@ is restored."));
"%d messages for %s",
count),
count, buf);
- if (bytes == -1)
+ if (bytes == (unsigned long long)-1) // mailbox size unsupported
report_complete(stdout, ".\n");
else
- report_complete(stdout, GT_(" (%d octets).\n"), bytes);
+ report_complete(stdout, GT_(" (%llu octets).\n"), bytes);
}
else
{
diff --git a/etrn.c b/etrn.c
index f3fab0ce..12b9d3fd 100644
--- a/etrn.c
+++ b/etrn.c
@@ -31,7 +31,7 @@ static int etrn_ok (int sock, char *argbuf)
}
static int etrn_getrange(int sock, struct query *ctl, const char *id,
- int *countp, int *newp, int *bytes)
+ int *countp, int *newp, unsigned long long *bytes)
/* send ETRN and interpret the response */
{
int ok, opts;
diff --git a/fetchmail.h b/fetchmail.h
index 23ba6e6e..72259e10 100644
--- a/fetchmail.h
+++ b/fetchmail.h
@@ -210,7 +210,7 @@ struct method /* describe methods for protocol state machine */
/* response_parsing function */
int (*getauth)(int, struct query *, char *);
/* authorization fetcher */
- int (*getrange)(int, struct query *, const char *, int *, int *, int *);
+ int (*getrange)(int, struct query *, const char *, int *, int *, unsigned long long *);
/* get message range to fetch */
int (*getsizes)(int, int, int *);
/* get sizes of messages */
diff --git a/imap.c b/imap.c
index 7b80679a..7836acd7 100644
--- a/imap.c
+++ b/imap.c
@@ -883,7 +883,7 @@ static int imap_search(int sock, struct query *ctl, int count)
static int imap_getrange(int sock,
struct query *ctl,
const char *folder,
- int *countp, int *newp, int *bytes)
+ int *countp, int *newp, unsigned long long *bytes)
/* get range of messages to be fetched */
{
int ok;
diff --git a/odmr.c b/odmr.c
index 85decb6d..d1c011c4 100644
--- a/odmr.c
+++ b/odmr.c
@@ -36,7 +36,7 @@ static int odmr_ok (int sock, char *argbuf)
}
static int odmr_getrange(int sock, struct query *ctl, const char *id,
- int *countp, int *newp, int *bytes)
+ int *countp, int *newp, unsigned long long *bytes)
/* send ODMR and then run a reverse SMTP session */
{
int ok, opts, smtp_sock;
diff --git a/pop2.c b/pop2.c
index 7c843616..5a5a1bd1 100644
--- a/pop2.c
+++ b/pop2.c
@@ -80,7 +80,7 @@ static int pop2_getauth(int sock, struct query *ctl, char *buf)
}
static int pop2_getrange(int sock, struct query *ctl, const char *folder,
- int *countp, int *newp, int *bytes)
+ int *countp, int *newp, unsigned long long *bytes)
/* get range of messages to be fetched */
{
(void)ctl;
diff --git a/pop3.c b/pop3.c
index 6efe1b7e..25efbaad 100644
--- a/pop3.c
+++ b/pop3.c
@@ -969,7 +969,7 @@ static int pop3_slowuidl( int sock, struct query *ctl, int *countp, int *newp)
static int pop3_getrange(int sock,
struct query *ctl,
const char *folder,
- int *countp, int *newp, int *bytes)
+ int *countp, int *newp, unsigned long long *bytes)
/* get range of messages to be fetched */
{
int ok;
@@ -992,7 +992,7 @@ static int pop3_getrange(int sock,
if (ok == 0) {
int asgn;
- asgn = sscanf(buf,"%d %d", countp, bytes);
+ asgn = sscanf(buf,"%d %llu", countp, bytes);
if (asgn != 2)
return PS_PROTOCOL;
} else
--
2.22.0

View File

@ -1,30 +0,0 @@
--- configure.orig 2013-04-23 21:36:55 UTC
+++ configure
@@ -9552,11 +9552,11 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
-char krb5_des_string_to_key ();
+char krb5int_des_string_to_key ();
int
main ()
{
-return krb5_des_string_to_key ();
+return krb5int_des_string_to_key ();
;
return 0;
}
@@ -9591,11 +9591,11 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
-char krb5_des_string_to_key ();
+char krb5int_des_string_to_key ();
int
main ()
{
-return krb5_des_string_to_key ();
+return krb5int_des_string_to_key ();
;
return 0;
}

View File

@ -1,8 +0,0 @@
[
{ type: install
message: <<EOM
For pointers how to configure fetchmail in daemon mode
please consult %%PREFIX%%/etc/rc.d/fetchmail.
EOM
}
]

View File

@ -1,14 +0,0 @@
Fetchmail is a full-featured IMAP/POP2/POP3/APOP/KPOP/ETRN/ODMR client with
easy configuration, daemon mode, forwarding via SMTP or local MDA, and
superior reply handling. It is used to handle intermittent email connections
by acting as a coupling that seamlessly batch forwards fetched mail from your
mail server to your local delivery system, allowing you to read it with your
favourite mail user agent. Fetchmail also includes useful spam filtering and
multi-user functions.
A typical use of fetchmail is to connect to your ISP's POP3 server,
downloading your mail into the INBOX on your local computer. You may then
read the mail, offline if you want, using pine, mutt, or any standard mail
user agent.
WWW: http://www.fetchmail.info/

View File

@ -1,28 +0,0 @@
bin/fetchmail
man/man1/fetchmail.1.gz
%%NLS%%share/locale/ca/LC_MESSAGES/fetchmail.mo
%%NLS%%share/locale/cs/LC_MESSAGES/fetchmail.mo
%%NLS%%share/locale/da/LC_MESSAGES/fetchmail.mo
%%NLS%%share/locale/de/LC_MESSAGES/fetchmail.mo
@comment %%NLS%%share/locale/el/LC_MESSAGES/fetchmail.mo
%%NLS%%share/locale/en_GB/LC_MESSAGES/fetchmail.mo
%%NLS%%share/locale/eo/LC_MESSAGES/fetchmail.mo
%%NLS%%share/locale/es/LC_MESSAGES/fetchmail.mo
@comment %%NLS%%share/locale/fi/LC_MESSAGES/fetchmail.mo
%%NLS%%share/locale/fr/LC_MESSAGES/fetchmail.mo
@comment %%NLS%%share/locale/gl/LC_MESSAGES/fetchmail.mo
%%NLS%%share/locale/id/LC_MESSAGES/fetchmail.mo
%%NLS%%share/locale/it/LC_MESSAGES/fetchmail.mo
%%NLS%%share/locale/ja/LC_MESSAGES/fetchmail.mo
%%NLS%%share/locale/nl/LC_MESSAGES/fetchmail.mo
%%NLS%%share/locale/pl/LC_MESSAGES/fetchmail.mo
@comment %%NLS%%share/locale/pt_BR/LC_MESSAGES/fetchmail.mo
%%NLS%%share/locale/ru/LC_MESSAGES/fetchmail.mo
@comment %%NLS%%share/locale/sk/LC_MESSAGES/fetchmail.mo
%%NLS%%share/locale/sq/LC_MESSAGES/fetchmail.mo
%%NLS%%share/locale/sv/LC_MESSAGES/fetchmail.mo
@comment %%NLS%%share/locale/tr/LC_MESSAGES/fetchmail.mo
%%NLS%%share/locale/vi/LC_MESSAGES/fetchmail.mo
%%NLS%%share/locale/zh_CN/LC_MESSAGES/fetchmail.mo
@sample(fetchmail,fetchmail,600) etc/fetchmailrc.sample
@dir(fetchmail,fetchmail,755) /var/run/fetchmail