From: "Eray Aslan" <eras@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-mail/mailutils/files/, net-mail/mailutils/
Date: Wed, 08 Jan 2025 10:12:42 +0000 (UTC) [thread overview]
Message-ID: <1736331086.81d46f09ae52c28b091e830cb86d2e8ae116fec8.eras@gentoo> (raw)
commit: 81d46f09ae52c28b091e830cb86d2e8ae116fec8
Author: Eray Aslan <eras <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 8 10:11:26 2025 +0000
Commit: Eray Aslan <eras <AT> gentoo <DOT> org>
CommitDate: Wed Jan 8 10:11:26 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=81d46f09
net-mail/mailutils: use the official patch for mbox testing
Signed-off-by: Eray Aslan <eras <AT> gentoo.org>
.../files/mailutils-skip-mbox-tests.patch | 60 -----------
.../mailutils/files/mailutils-tests-use-mbox.patch | 119 +++++++++++++++++++++
net-mail/mailutils/mailutils-3.18.ebuild | 2 +-
3 files changed, 120 insertions(+), 61 deletions(-)
diff --git a/net-mail/mailutils/files/mailutils-skip-mbox-tests.patch b/net-mail/mailutils/files/mailutils-skip-mbox-tests.patch
deleted file mode 100644
index 1443e66ecce1..000000000000
--- a/net-mail/mailutils/files/mailutils-skip-mbox-tests.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-diff --git a/mail/testsuite/mail/Followup.exp b/mail/testsuite/mail/Followup.exp
-index c9f9d11..a7927e9 100644
---- a/mail/testsuite/mail/Followup.exp
-+++ b/mail/testsuite/mail/Followup.exp
-@@ -17,7 +17,9 @@
-
- mail_version
-
--if ![mu_check_capability ENABLE_SENDMAIL] {
-+if { [mu_check_capability SCHEME] == "maildir" } {
-+ unsupported "Does not work when default mailbox type is maildir"
-+} elseif ![mu_check_capability ENABLE_SENDMAIL] {
- unsupported "Support for sendmail not compiled in"
- } else {
- mail_start "--file=%teaparty.mbox" \
-diff --git a/mail/testsuite/mail/Reply.exp b/mail/testsuite/mail/Reply.exp
-index c492aee..543a857 100644
---- a/mail/testsuite/mail/Reply.exp
-+++ b/mail/testsuite/mail/Reply.exp
-@@ -17,7 +17,9 @@
-
- mail_version
-
--if ![mu_check_capability ENABLE_SENDMAIL] {
-+if { [mu_check_capability SCHEME] == "maildir" } {
-+ unsupported "Does not work when default mailbox type is maildir"
-+} elseif ![mu_check_capability ENABLE_SENDMAIL] {
- unsupported "Support for sendmail not compiled in"
- } else {
- mail_start "--file=%teaparty.mbox" \
-diff --git a/mail/testsuite/mail/followup.exp b/mail/testsuite/mail/followup.exp
-index ca15317..ce042b5 100644
---- a/mail/testsuite/mail/followup.exp
-+++ b/mail/testsuite/mail/followup.exp
-@@ -17,7 +17,9 @@
-
- mail_version
-
--if ![mu_check_capability ENABLE_SENDMAIL] {
-+if { [mu_check_capability SCHEME] == "maildir" } {
-+ unsupported "Does not work when default mailbox type is maildir"
-+} elseif ![mu_check_capability ENABLE_SENDMAIL] {
- unsupported "Support for sendmail not compiled in"
- } else {
- mail_start "--file=%teaparty.mbox" \
-diff --git a/mail/testsuite/mail/reply.exp b/mail/testsuite/mail/reply.exp
-index 8d66e99..7b178b3 100644
---- a/mail/testsuite/mail/reply.exp
-+++ b/mail/testsuite/mail/reply.exp
-@@ -17,7 +17,9 @@
-
- mail_version
-
--if ![mu_check_capability ENABLE_SENDMAIL] {
-+if { [mu_check_capability SCHEME] == "maildir" } {
-+ unsupported "Does not work when default mailbox type is maildir"
-+} elseif ![mu_check_capability ENABLE_SENDMAIL] {
- unsupported "Support for sendmail not compiled in"
- } else {
- mail_start "--file=%teaparty.mbox" \
diff --git a/net-mail/mailutils/files/mailutils-tests-use-mbox.patch b/net-mail/mailutils/files/mailutils-tests-use-mbox.patch
new file mode 100644
index 000000000000..0710b880a196
--- /dev/null
+++ b/net-mail/mailutils/files/mailutils-tests-use-mbox.patch
@@ -0,0 +1,119 @@
+From e5ae56618dc2a15b9cff792be7315185bbd96ad2 Mon Sep 17 00:00:00 2001
+From: Sergey Poznyakoff <gray@gnu.org>
+Date: Tue, 7 Jan 2025 11:59:33 +0200
+Subject: Fix testsuite (mda & mail) to work with arbitrary default mailbox
+ type
+
+* mail/testsuite/lib/mail.exp (default_mail_start): Force mbox
+mailbox type.
+* mda/mda/tests/forward.at: Likewise.
+* mda/mda/tests/mda.at: Likewise.
+* mda/tests/mda.sh (dumpmail): Handle only mbox.
+---
+ mail/testsuite/lib/mail.exp | 2 ++
+ mda/mda/tests/forward.at | 2 +-
+ mda/mda/tests/mda.at | 16 +---------------
+ mda/tests/mda.sh | 26 --------------------------
+ 4 files changed, 4 insertions(+), 42 deletions(-)
+
+diff --git a/mail/testsuite/lib/mail.exp b/mail/testsuite/lib/mail.exp
+index b7e68b2..9034d57 100644
+--- a/mail/testsuite/lib/mail.exp
++++ b/mail/testsuite/lib/mail.exp
+@@ -51,6 +51,8 @@ proc default_mail_start {args} {
+ append sw $MU_TOOL_FLAGS
+ }
+
++ append sw " --set mailbox.mailbox-type=mbox"
++
+ if [info exists host_board] {
+ if [board_info $host_board exists top_srcdir] {
+ append sw " --set \"mailbox.mail-spool='[board_info $host_board top_srcdir]/mail/testsuite/spool'\""
+diff --git a/mda/mda/tests/forward.at b/mda/mda/tests/forward.at
+index 08d22ac..d4af639 100644
+--- a/mda/mda/tests/forward.at
++++ b/mda/mda/tests/forward.at
+@@ -19,7 +19,7 @@ AT_KEYWORDS([maidag forward])
+
+ m4_pushdef([TESTMDA_CONF],[cat > testmda.conf <<EOF
+ mailbox {
+- mailbox-pattern "$(pwd)/spool/\${user}";
++ mailbox-pattern "mbox://$(pwd)/spool/\${user}";
+ }
+
+ mailer {
+diff --git a/mda/mda/tests/mda.at b/mda/mda/tests/mda.at
+index b101ae0..5279f15 100644
+--- a/mda/mda/tests/mda.at
++++ b/mda/mda/tests/mda.at
+@@ -16,7 +16,7 @@
+
+ m4_pushdef([TESTMDA_CONF],[cat > testmda.conf <<EOF
+ mailbox {
+- mailbox-pattern "$(pwd)/spool/\${user}";
++ mailbox-pattern "mbox://$(pwd)/spool/\${user}";
+ }
+ EOF
+ ])
+@@ -52,20 +52,6 @@ mkdir spool
+ TESTMDA_CONF
+ testmda --from gulliver@example.net root < msg || exit $?
+ dumpmail spool/root
+-case $MU_DEFAULT_SCHEME in
+-mbox)
+- head -1 spool/root
+- echo "$envelope" >> expout
+- ;;
+-mh)
+- sed -n -e '/^X-Envelope-Date: */s///p' spool/root/1
+- echo "$date" >> expout
+- ;;
+-maildir)
+- sed -n -e '/^X-Envelope-Date: */s///p' $(find spool/root/new -type f | head -n 1)
+- echo "$date" >> expout
+- ;;
+-esac
+ ],
+ [0],
+ [expout])
+diff --git a/mda/tests/mda.sh b/mda/tests/mda.sh
+index 208602a..90a8d6c 100644
+--- a/mda/tests/mda.sh
++++ b/mda/tests/mda.sh
+@@ -16,33 +16,7 @@
+
+ INPUT_MSG=$abs_top_srcdir/mda/tests/input.msg
+ dumpmail() {
+- case $MU_DEFAULT_SCHEME in
+- mbox)
+ sed -e '/^From /d'\
+ -e /^X-IMAPbase:/d\
+ -e /^X-UID:/d $1
+- ;;
+- dotmail)
+- sed -e '/^\.$/d'\
+- -e /^X-IMAPbase:/d\
+- -e /^X-UID:/d $1
+- ;;
+- mh)
+- sed -e /^X-IMAPbase:/d\
+- -e /^X-UID:/d\
+- -e /^X-Envelope-Sender:/d\
+- -e /^X-Envelope-Date:/d $1/1
+- ;;
+- maildir)
+- f=$(find $1/new -type f | head -n 1)
+- if test -n $f; then
+- sed -e /^X-IMAPbase:/d\
+- -e /^X-UID:/d\
+- -e /^X-Envelope-Sender:/d\
+- -e /^X-Envelope-Date:/d $f
+- fi
+- ;;
+- *) # Should not happen
+- echo >&2 "Default mailbox format is uknown"
+- esac
+ }
+--
+cgit v1.1
+
diff --git a/net-mail/mailutils/mailutils-3.18.ebuild b/net-mail/mailutils/mailutils-3.18.ebuild
index 3f9ac446c933..45199633d8cc 100644
--- a/net-mail/mailutils/mailutils-3.18.ebuild
+++ b/net-mail/mailutils/mailutils-3.18.ebuild
@@ -63,7 +63,7 @@ REQUIRED_USE="
DOCS=( ABOUT-NLS AUTHORS COPYING COPYING.LESSER ChangeLog INSTALL NEWS README THANKS TODO )
PATCHES=(
"${FILESDIR}"/${PN}-3.5-add-include.patch
- "${FILESDIR}"/${PN}-skip-mbox-tests.patch
+ "${FILESDIR}"/${PN}-tests-use-mbox.patch
)
pkg_setup() {
next reply other threads:[~2025-01-08 10:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-08 10:12 Eray Aslan [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-07-30 7:08 [gentoo-commits] repo/gentoo:master commit in: net-mail/mailutils/files/, net-mail/mailutils/ Eray Aslan
2021-04-17 9:05 Eray Aslan
2020-03-23 11:51 Eray Aslan
2019-08-08 6:00 Eray Aslan
2019-02-07 13:14 Eray Aslan
2018-06-22 12:21 Eray Aslan
2018-06-19 15:58 Eray Aslan
2015-12-24 7:44 Eray Aslan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1736331086.81d46f09ae52c28b091e830cb86d2e8ae116fec8.eras@gentoo \
--to=eras@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox