summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEray Aslan <eras@gentoo.org>2012-06-12 21:26:20 +0000
committerEray Aslan <eras@gentoo.org>2012-06-12 21:26:20 +0000
commit6bfa57b592e1b9e0fa0e5b2e093142bf7532a1e7 (patch)
tree9b54bbc69a7c46f02512b52e31a6663443228bfd /mail-mta
parentDon't use AM_PROG_AR in configure.ac as automake-1.11 does not recognize it (diff)
downloadhistorical-6bfa57b592e1b9e0fa0e5b2e093142bf7532a1e7.tar.gz
historical-6bfa57b592e1b9e0fa0e5b2e093142bf7532a1e7.tar.bz2
historical-6bfa57b592e1b9e0fa0e5b2e093142bf7532a1e7.zip
Fix option parsing - bug #420301
Package-Manager: portage-2.1.10.65/cvs/Linux x86_64
Diffstat (limited to 'mail-mta')
-rw-r--r--mail-mta/nullmailer/ChangeLog8
-rw-r--r--mail-mta/nullmailer/Manifest30
-rw-r--r--mail-mta/nullmailer/files/nullmailer-1.10-fix-sendmail.patch100
-rw-r--r--mail-mta/nullmailer/nullmailer-1.10-r1.ebuild122
4 files changed, 245 insertions, 15 deletions
diff --git a/mail-mta/nullmailer/ChangeLog b/mail-mta/nullmailer/ChangeLog
index 0f0095d2f02c..5c0d5297286a 100644
--- a/mail-mta/nullmailer/ChangeLog
+++ b/mail-mta/nullmailer/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for mail-mta/nullmailer
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/mail-mta/nullmailer/ChangeLog,v 1.48 2012/06/05 13:55:05 eras Exp $
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/nullmailer/ChangeLog,v 1.49 2012/06/12 21:26:19 eras Exp $
+
+*nullmailer-1.10-r1 (12 Jun 2012)
+
+ 12 Jun 2012; Eray Aslan <eras@gentoo.org> +nullmailer-1.10-r1.ebuild,
+ +files/nullmailer-1.10-fix-sendmail.patch:
+ Fix option parsing - bug #420301
*nullmailer-1.10 (05 Jun 2012)
diff --git a/mail-mta/nullmailer/Manifest b/mail-mta/nullmailer/Manifest
index 7561c2f6d462..65c4c3c7e38c 100644
--- a/mail-mta/nullmailer/Manifest
+++ b/mail-mta/nullmailer/Manifest
@@ -3,6 +3,7 @@ Hash: SHA256
AUX init.d-nullmailer 1221 RMD160 9e793a57acc9f2123c75e5a27f4b6123ce1d171a SHA1 154b3c92512151d6d4f9dc63125536c44e207f1e SHA256 279dd0519b62b57b4f5f6a7bcbfcd8337dd3d5e6e785de1d443f2005def64d72
AUX init.d-nullmailer-r1 1220 RMD160 a410c17c4c39962957c5864b6a09f5d0d2159fd3 SHA1 43db6a5addb1726c630a5ca1522f575d35270452 SHA256 53647c3756bdff6b3753f91f1aed61649f35294ae06e757b613ab58b5ca55c85
+AUX nullmailer-1.10-fix-sendmail.patch 3316 RMD160 053b9b072883de7fa746c8c8e6a8bd805fbc9174 SHA1 053f421d935836ffeedbca6565a4e17212c93427 SHA256 18b306f565326813c785acb88303656d966118cfaeea2a5422e89deab42c8b14
AUX remotes.sample-1.04 540 RMD160 41a6f50c7d0cd0423be8d2e485e07148504316f7 SHA1 8aecf00f27f705a28e9c45c2e9807a3a4f4f309a SHA256 d9f756d9a2b21e7f7166c1b29a34c4dda1eb1ab0c57168ded3d0ed225cf692ee
DIST nullmailer-1.05.tar.gz 176800 RMD160 20bd31670be76297a9798282db6186156d4f5124 SHA1 93cc8924cd96bf8a79285ff32bf5b0894de0a9e5 SHA256 90356ed2bd95eef09ed04713fdef1f81c1ab95e02eee333a96a8e3eb230cac2f
DIST nullmailer-1.06.tar.gz 180380 RMD160 a534c9db53f3534e760407dcef6a6b36fdc3bf1b SHA1 4dbede45c727fd32601a90d8332cb9dcff124f0f SHA256 aa5813dae985c412fcb2e185c3dcfac64f581bcf4ce5d480437409c53c16a2bd
@@ -11,23 +12,24 @@ DIST nullmailer_1.04-1.diff.gz 47284 RMD160 0f6ba5985d6b47678f35b090a635630646db
DIST nullmailer_1.10-1.debian.tar.gz 32950 RMD160 7c2194cf3c4a6dd3da9d68485a0dfc4f55602aa9 SHA1 168ead6ab0cf52699d1c016ad39cd38feffa3039 SHA256 97adc0ef257b8185100208d8c4b00b298843683a95c2e04011f424f49873fa03
EBUILD nullmailer-1.05.ebuild 3993 RMD160 f5cd01f40a61a1e5b51480259aec7ef135e63b39 SHA1 94dc56e3fee5a3acddae859c4509f3ddb7ae2f4c SHA256 a85c5dc0b67d0e8fe68b74a0d40ac7d6478712acbf1d8d894a8bb542768274f7
EBUILD nullmailer-1.06.ebuild 3987 RMD160 cb4ba9938d6015ed4075e317e3aec46a87eab907 SHA1 ee9056135f650ad86364ab0179c559d1cc355f25 SHA256 784a8132a6e61cba13532a048d2a9423f468bdfa93698616a9df08aaa7a8af83
+EBUILD nullmailer-1.10-r1.ebuild 3870 RMD160 493a6bf7e448448a5def0d94570878b728155945 SHA1 f4e15fdcf9be9ad8abd32bb977b25f3f53b1ace9 SHA256 d7298c431cb22bb9875c4b38adace3beba6f8a5a9670c7c1e9571715ded4f1a7
EBUILD nullmailer-1.10.ebuild 3805 RMD160 95ca46d81927b4320bff66e65577dcda3ec46d5b SHA1 c0dd95b8d0637cf4bb680ec7f8409dd3139308fa SHA256 0e9c72f06e9adbf295f9a29d6e72ca512ed31b51e2147f6252ad500e07ceb0a1
-MISC ChangeLog 9854 RMD160 3a16d9a043324d63b7fb9b3459b9da64288d4259 SHA1 50674188cdf3260e1ae0954dfe85c3b969994470 SHA256 027b1a436ba2ba831513a3ce65eaabb2296484fbef3a63c716d405e505853862
+MISC ChangeLog 10042 RMD160 4ac1d782aa36c8fe42098872cdc3f833af2c590c SHA1 2dc00e428adfd0d06c0ee9ad868b000b0f4429b0 SHA256 6eca1300941edcea99ccc1e3c6ab0e0b9873a4086cd77f26d7323adfee001caf
MISC metadata.xml 280 RMD160 9f5cd4ae71c9c7e45161110dd38d67f6604cd7b8 SHA1 4b9a055d510dca2f97d61f7df74fcefbc0cc0a2c SHA256 1e7cf6dbb378d12f4d6569350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V3ci9evdAnBadgyQOdkwty84XqH
+5eGBJURBvwbz6mkwFimmzXBczCiIbvvFvuA4DVngTQWLDipCOjoxnxFFdarrQRzn
+dx/UJME1sv1/N9Ht/P3TtbGMpLWFdUzuZbXf3tOijSS6vZc054G2zNkLCkp2tFYN
+eJTFGIf2mPLxgpEVBdnCv0p6j+jFtvy5qO1nBKvSrKKSrDbI3sXMJrwkbarlgIF/
+3bEqYM5xVoW5kn3ugyLpFDT9fMX/52WCvF1uSmavYMjQuQgbs+A74IXsOSCZCQD6
+0HjsWJB5GbmZMlHvXiVda0dDUtcRffjbuuDwFbdxI+rEVil1lxV1d3cy0TsXviKj
+9EmR2aosl5mEAOFuPPDZYClwMsjHP7p88JffUlBitgyo3aj9a1Pn9qdN8//+P1hr
+Acc/WSXlMinVGeTbb6xiFOKzc6Xx4gQDOTSfPYeXwcn6CFcwSmCPBQd99PTsW2Ai
+e7qwrnqKkG08gVniSqAT
+=7+ku
-----END PGP SIGNATURE-----
diff --git a/mail-mta/nullmailer/files/nullmailer-1.10-fix-sendmail.patch b/mail-mta/nullmailer/files/nullmailer-1.10-fix-sendmail.patch
new file mode 100644
index 000000000000..98669a64c777
--- /dev/null
+++ b/mail-mta/nullmailer/files/nullmailer-1.10-fix-sendmail.patch
@@ -0,0 +1,100 @@
+diff --git a/lib/cli++/main.cc b/lib/cli++/main.cc
+index f0eb014..406e990 100644
+--- a/lib/cli++/main.cc
++++ b/lib/cli++/main.cc
+@@ -36,6 +36,7 @@ static cli_option help_option = { 'h', "help", cli_option::flag,
+
+ static cli_option** options;
+ static unsigned optionc;
++static const char* short_options;
+
+ static void build_options()
+ {
+@@ -47,6 +48,13 @@ static void build_options()
+ for(unsigned i = 0; i < optionc-1; i++)
+ options[i] = &cli_options[i];
+ options[optionc-1] = &help_option;
++
++ char* so;
++ short_options = so = new char[optionc+1];
++ for (unsigned i = 0; i < optionc; i++)
++ if (options[i]->ch != 0)
++ *so++ = options[i]->ch;
++ *so = 0;
+ }
+
+ static inline int max(int a, int b)
+@@ -275,14 +283,6 @@ static int parse_long(int, char* argv[])
+ ++arg;
+ for(unsigned j = 0; j < optionc; j++) {
+ cli_option* o = options[j];
+- if (cli_only_long && o->ch) {
+- if (arg[0] == o->ch) {
+- if (arg[1] == '\0')
+- return o->parse_long_noeq(argv[1], true);
+- else if (arg[1] == '=')
+- return o->parse_long_eq(arg+2, true);
+- }
+- }
+ if(o->name) {
+ size_t len = strlen(o->name);
+ if(!memcmp(arg, o->name, len)) {
+@@ -297,6 +297,13 @@ static int parse_long(int, char* argv[])
+ return -1;
+ }
+
++static int parse_either(int argc, char* argv[])
++{
++ return (strchr(short_options, argv[0][1]) != 0)
++ ? parse_short(argc, argv)
++ : parse_long(argc, argv);
++}
++
+ static int parse_args(int argc, char* argv[])
+ {
+ build_options();
+@@ -312,9 +319,9 @@ static int parse_args(int argc, char* argv[])
+ i++;
+ break;
+ }
+- int j = (!cli_only_long && arg[1] != '-')
+- ? parse_short(argc-i, argv+i)
+- : parse_long(argc-i, argv+i);
++ int j = (arg[1] == '-') ? parse_long(argc-i, argv+i)
++ : cli_only_long ? parse_either(argc-i, argv+i)
++ : parse_short(argc-i, argv+i);
+ if(j < 0)
+ usage(1);
+ else
+diff --git a/src/sendmail.cc b/src/sendmail.cc
+index f245226..2e5615b 100644
+--- a/src/sendmail.cc
++++ b/src/sendmail.cc
+@@ -66,26 +66,13 @@ cli_option cli_options[] = {
+ { 'N', 0, cli_option::string, 0, &o_dummys, "Ignored", 0 },
+ { 'n', 0, cli_option::flag, 0, &o_dummyi, "Ignored", 0 },
+ { 'O', 0, cli_option::string, 0, &o_dummys, "Ignored", 0 },
+- { 0, "odb", cli_option::flag, 0, &o_dummyi,
+- "Deliver in background (always true)", 0 },
+- { 0, "odf", cli_option::flag, 0, &o_dummyi,
+- "Deliver in foreground (ignored)", 0 },
+- { 0, "oem", cli_option::flag, 0, &o_dummyi,
+- "Ignored", 0 },
++ { 'o', 0, cli_option::string, 0, &o_dummys, "Set sendmail flag, ignored", 0 },
+ { 0, "em", cli_option::flag, 0, &o_dummyi,
+ "Ignored", 0 },
+- { 0, "oep", cli_option::flag, 0, &o_dummyi,
+- "Ignored", 0 },
+ { 0, "ep", cli_option::flag, 0, &o_dummyi,
+ "Ignored", 0 },
+- { 0, "oeq", cli_option::flag, 0, &o_dummyi,
+- "Ignored", 0 },
+ { 0, "eq", cli_option::flag, 0, &o_dummyi,
+ "Ignored", 0 },
+- { 0, "oi", cli_option::flag, 0, &o_dummyi,
+- "Ignored", 0 },
+- { 0, "om", cli_option::flag, 0, &o_dummyi,
+- "Ignored", 0 },
+ { 'p', 0, cli_option::string, 0, &o_dummys, "Ignored", 0 },
+ { 'q', 0, cli_option::string, 0, &o_dummys, "Ignored", 0 },
+ { 'R', 0, cli_option::string, 0, &o_dummys, "Ignored", 0 },
diff --git a/mail-mta/nullmailer/nullmailer-1.10-r1.ebuild b/mail-mta/nullmailer/nullmailer-1.10-r1.ebuild
new file mode 100644
index 000000000000..a32746b8ce6b
--- /dev/null
+++ b/mail-mta/nullmailer/nullmailer-1.10-r1.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/nullmailer/nullmailer-1.10-r1.ebuild,v 1.1 2012/06/12 21:26:19 eras Exp $
+
+EAPI=4
+inherit eutils flag-o-matic autotools user multilib
+
+MY_P="${P/_rc/RC}"
+S=${WORKDIR}/${MY_P}
+DEBIAN_PV=1.10
+DEBIAN_PR="1"
+DEBIAN_P="${PN}-${DEBIAN_PV}"
+DEBIAN_PF="${DEBIAN_P/-/_}-${DEBIAN_PR}"
+DEBIAN_SRC="${DEBIAN_PF}.debian.tar.gz"
+DESCRIPTION="Simple relay-only local mail transport agent"
+SRC_URI="http://untroubled.org/${PN}/archive/${MY_P}.tar.gz
+ mirror://debian/pool/main/n/${PN}/${DEBIAN_SRC}"
+HOMEPAGE="http://untroubled.org/nullmailer/"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+IUSE="ssl"
+
+DEPEND="sys-apps/groff
+ ssl? ( net-libs/gnutls )"
+RDEPEND="virtual/shadow
+ virtual/logger
+ ssl? ( net-libs/gnutls )
+ !mail-mta/courier
+ !mail-mta/esmtp
+ !mail-mta/exim
+ !mail-mta/mini-qmail
+ !mail-mta/msmtp
+ !mail-mta/nbsmtp
+ !mail-mta/netqmail
+ !mail-mta/postfix
+ !mail-mta/qmail-ldap
+ !mail-mta/sendmail
+ !mail-mta/ssmtp"
+
+src_prepare() {
+ EPATCH_OPTS="-d ${S} -p1" \
+ epatch "${DISTDIR}"/${DEBIAN_SRC}
+ # why revert? Ask Robin when he is back!
+ EPATCH_OPTS="-d ${WORKDIR} -p0 -R" \
+ epatch "${WORKDIR}"/debian/patches/02_ipv6.diff
+ # this fixes the debian daemon/syslog to actually compile
+ sed -i.orig \
+ -e '/^nullmailer_send_LDADD/s, =, = ../lib/cli++/libcli++.a,' \
+ "${S}"/src/Makefile.am || die "Sed failed"
+ # bug #420301
+ epatch "${FILESDIR}"/"${P}"-fix-sendmail.patch
+ eautoreconf
+}
+
+pkg_setup() {
+ enewgroup nullmail 88
+ enewuser nullmail 88 -1 /var/nullmailer nullmail
+}
+
+src_configure() {
+ # Note that we pass a different directory below due to bugs in the makefile!
+ econf \
+ --localstatedir=/var \
+ $(use_enable ssl tls)
+}
+
+src_install () {
+ einstall localstatedir="${D}"/var/nullmailer
+ dodoc AUTHORS BUGS HOWTO INSTALL ChangeLog NEWS README TODO
+ # A small bit of sample config
+ insinto /etc/nullmailer
+ newins "${FILESDIR}"/remotes.sample-1.04 remotes
+ # daemontools stuff
+ dodir /var/nullmailer/service{,/log}
+ insinto /var/nullmailer/service
+ newins scripts/nullmailer.run run
+ fperms 700 /var/nullmailer/service/run
+ insinto /var/nullmailer/service/log
+ newins scripts/nullmailer-log.run run
+ fperms 700 /var/nullmailer/service/log/run
+ # usablity
+ dodir /usr/$(get_libdir)
+ dosym /usr/sbin/sendmail usr/$(get_libdir)/sendmail
+ # permissions stuff
+ keepdir /var/log/nullmailer /var/nullmailer/{tmp,queue}
+ fperms 770 /var/log/nullmailer /var/nullmailer/{tmp,queue}
+ fowners nullmail:nullmail /usr/sbin/nullmailer-queue /usr/bin/mailq
+ fperms 4711 /usr/sbin/nullmailer-queue /usr/bin/mailq
+ fowners nullmail:nullmail /var/log/nullmailer /var/nullmailer/{tmp,queue,trigger}
+ fperms 660 /var/nullmailer/trigger
+ newinitd "${FILESDIR}"/init.d-nullmailer-r1 nullmailer
+}
+
+pkg_postinst() {
+ [ ! -e "${ROOT}"/var/nullmailer/trigger ] && mkfifo "${ROOT}"/var/nullmailer/trigger
+ chown nullmail:nullmail "${ROOT}"/var/log/nullmailer "${ROOT}"/var/nullmailer/{tmp,queue,trigger}
+ chmod 770 "${ROOT}"/var/log/nullmailer "${ROOT}"/var/nullmailer/{tmp,queue}
+ chmod 660 "${ROOT}"/var/nullmailer/trigger
+
+ elog "To create an initial setup, please do:"
+ elog "emerge --config =${CATEGORY}/${PF}"
+ echo
+ elog "To start nullmailer at boot you may use either the nullmailer init.d"
+ elog "script, or emerge sys-process/supervise-scripts, enable the"
+ elog "svscan init.d script and create the following link:"
+ elog "ln -fs /var/nullmailer/service /service/nullmailer"
+ echo
+}
+
+pkg_config() {
+ if [ ! -s "${ROOT}"/etc/nullmailer/me ]; then
+ einfo "Setting /etc/nullmailer/me"
+ /bin/hostname --fqdn > "${ROOT}"/etc/nullmailer/me
+ fi
+ if [ ! -s "${ROOT}"/etc/nullmailer/defaultdomain ]; then
+ einfo "Setting /etc/nullmailer/defaultdomain"
+ /bin/hostname --domain > "${ROOT}"/etc/nullmailer/defaultdomain
+ fi
+}