Compare commits
10 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9470d9791e | ||
|
|
babbcd29c1 | ||
|
|
f5c4fe68e8 | ||
|
|
065775a472 | ||
|
|
d5afef6ce2 | ||
|
|
7e87b23a68 | ||
|
|
435afb7eaf | ||
|
|
10d92ba2fd | ||
|
|
1696f13c85 | ||
|
|
65ff4fb381 |
3 changed files with 123 additions and 19 deletions
89
mimedefang-3.6-tests.patch
Normal file
89
mimedefang-3.6-tests.patch
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
From 7379afce07b19c04a1927172ddd2ebb9213d87fa Mon Sep 17 00:00:00 2001
|
||||
From: Robert Scheck <robert-scheck@users.noreply.github.com>
|
||||
Date: Sat, 1 Mar 2025 15:29:17 +0100
|
||||
Subject: [PATCH] Skip DNS tests without network access (#83)
|
||||
|
||||
$ make test
|
||||
prove -It/lib --recurse t
|
||||
t/actions.t ... ok
|
||||
t/antispam.t .. ok
|
||||
t/arc.t ....... ok
|
||||
t/authres.t ... ok
|
||||
t/core.t ...... ok
|
||||
t/critic.t .... skipped: Author test. Set $ENV{TEST_AUTHOR} to a true value to run.
|
||||
t/dates.t ..... ok
|
||||
t/dkim.t ...... ok
|
||||
t/headers.t ... ok
|
||||
t/mime.t ...... ok
|
||||
t/net.t .......
|
||||
Dubious, test returned 3 (wstat 768, 0x300)
|
||||
Failed 3/15 subtests
|
||||
(less 3 skipped subtests: 9 okay)
|
||||
t/relay.t ..... ok
|
||||
t/sender.t .... ok
|
||||
t/smtp.t ...... ok
|
||||
t/spf.t ....... ok
|
||||
t/utils.t ..... ok
|
||||
Test Summary Report
|
||||
-------------------
|
||||
t/net.t (Wstat: 768 (exited 3) Tests: 15 Failed: 3)
|
||||
Failed tests: 5-6, 11
|
||||
Non-zero exit status: 3
|
||||
Files=16, Tests=130, 680 wallclock secs ( 0.05 usr 0.03 sys + 3.91 cusr 0.71 csys = 4.70 CPU)
|
||||
Result: FAIL
|
||||
make: *** [Makefile:365: test] Error 1
|
||||
---
|
||||
t/net.t | 28 +++++++++++++++++++++++-----
|
||||
1 file changed, 23 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/t/net.t b/t/net.t
|
||||
index 4710ce2..69e1877 100644
|
||||
--- a/t/net.t
|
||||
+++ b/t/net.t
|
||||
@@ -55,7 +55,13 @@ sub t_reverse_ip : Test(2)
|
||||
sub t_get_ptr_record : Test(1)
|
||||
{
|
||||
my $ipv4 = '1.1.1.1';
|
||||
- is(Mail::MIMEDefang::Net::get_ptr_record($ipv4), 'one.one.one.one');
|
||||
+
|
||||
+ SKIP: {
|
||||
+ if ( (not defined $ENV{'NET_TEST'}) or ($ENV{'NET_TEST'} ne 'yes' )) {
|
||||
+ skip "Net test disabled", 1
|
||||
+ }
|
||||
+ is(Mail::MIMEDefang::Net::get_ptr_record($ipv4), 'one.one.one.one');
|
||||
+ }
|
||||
}
|
||||
|
||||
sub t_relay_is_blacklisted_multi : Test(1)
|
||||
@@ -107,15 +113,27 @@ sub t_email_is_blacklisted : Test(1)
|
||||
sub t_md_get_bogus_mx_hosts : Test(1)
|
||||
{
|
||||
my $domain = 'multihomed.dnsbltest.spamassassin.org';
|
||||
- my @res = md_get_bogus_mx_hosts($domain);
|
||||
- is(scalar @res, 1);
|
||||
+
|
||||
+ SKIP: {
|
||||
+ if ( (not defined $ENV{'NET_TEST'}) or ($ENV{'NET_TEST'} ne 'yes' )) {
|
||||
+ skip "Net test disabled", 1
|
||||
+ }
|
||||
+ my @res = md_get_bogus_mx_hosts($domain);
|
||||
+ is(scalar @res, 1);
|
||||
+ }
|
||||
}
|
||||
|
||||
sub t_get_mx_ip_addresses : Test(1)
|
||||
{
|
||||
my $domain = 'mimedefang.org';
|
||||
- my @res = get_mx_ip_addresses($domain);
|
||||
- is(scalar @res, 2);
|
||||
+
|
||||
+ SKIP: {
|
||||
+ if ( (not defined $ENV{'NET_TEST'}) or ($ENV{'NET_TEST'} ne 'yes' )) {
|
||||
+ skip "Net test disabled", 1
|
||||
+ }
|
||||
+ my @res = get_mx_ip_addresses($domain);
|
||||
+ is(scalar @res, 2);
|
||||
+ }
|
||||
}
|
||||
|
||||
__PACKAGE__->runtests();
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
Summary: E-mail filtering framework using Sendmail's Milter interface
|
||||
Name: mimedefang
|
||||
Version: 3.4.1
|
||||
Version: 3.6
|
||||
Release: 3%{?dist}
|
||||
# {event{,_tcp}.{c,h},eventpriv.h} are GPL-2.0-or-later, rest is GPL-2.0-only
|
||||
License: GPL-2.0-only AND GPL-2.0-or-later
|
||||
|
|
@ -14,6 +14,7 @@ Source5: mimedefang-multiplexor.service
|
|||
Source6: mimedefang-wrapper
|
||||
Source7: mimedefang.tmpfilesd
|
||||
Source8: mimedefang.sysusersd
|
||||
Patch0: https://github.com/The-McGrail-Foundation/MIMEDefang/commit/7379afce07b19c04a1927172ddd2ebb9213d87fa.patch#/mimedefang-3.6-tests.patch
|
||||
BuildRequires: gnupg2
|
||||
BuildRequires: gcc
|
||||
BuildRequires: make
|
||||
|
|
@ -33,13 +34,8 @@ BuildRequires: perl(Sys::Hostname)
|
|||
BuildRequires: perl(Sys::Syslog)
|
||||
BuildRequires: systemd-rpm-macros
|
||||
BuildRequires: %{_sbindir}/sendmail
|
||||
%if 0%{?fedora} || 0%{?rhel} > 7
|
||||
BuildRequires: sendmail-milter-devel >= 8.12.0
|
||||
Recommends: perl(Mail::SpamAssassin) >= 1.6
|
||||
%else
|
||||
BuildRequires: sendmail-devel >= 8.12.0
|
||||
Requires: perl(Mail::SpamAssassin) >= 1.6
|
||||
%endif
|
||||
Requires(post): perl(Digest::SHA)
|
||||
%{?systemd_requires}
|
||||
%{?sysusers_requires_compat}
|
||||
|
|
@ -48,9 +44,7 @@ Requires(post): perl(Digest::SHA)
|
|||
%if 0%{!?_without_tests:1}
|
||||
BuildRequires: %{_bindir}/prove
|
||||
BuildRequires: perl(HTML::Parser)
|
||||
%if 0%{?fedora} || 0%{?rhel} > 7
|
||||
BuildRequires: perl(Mail::DKIM::ARC::Signer) >= 0.44
|
||||
%endif
|
||||
BuildRequires: perl(Mail::DKIM::Signer)
|
||||
BuildRequires: perl(Net::SMTP)
|
||||
BuildRequires: perl(Test::Class)
|
||||
|
|
@ -71,15 +65,19 @@ could cause problems, for example, with encrypted or signed messages.
|
|||
|
||||
%prep
|
||||
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
|
||||
%setup -q
|
||||
%autosetup -p1
|
||||
cp -pf %{SOURCE3} .
|
||||
|
||||
%build
|
||||
%if 0%{?fedora} > 41 || 0%{?rhel} > 10
|
||||
export CFLAGS="$CFLAGS -std=gnu17" # RHBZ#2336394, comment #4
|
||||
%endif
|
||||
|
||||
%configure --with-milterlib=%{_libdir} --with-user=defang --disable-anti-virus
|
||||
%make_build
|
||||
|
||||
%install
|
||||
%make_install %{?el7:INSTALL='install -p'} INSTALL_STRIP_FLAG='' install-redhat
|
||||
%make_install INSTALL_STRIP_FLAG='' install-redhat
|
||||
|
||||
# Fix config file, create log directory and remove duplicate
|
||||
sed -e '1d' -i $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name}
|
||||
|
|
@ -103,13 +101,6 @@ touch -c -r gen-ip-validator.pl $RPM_BUILD_ROOT%{_bindir}/gen-ip-validator.pl
|
|||
# Only for regression tests; depends on Test::Class, Test::Most and Net::SMTP
|
||||
find $RPM_BUILD_ROOT \( -name Unit.pm -o -name "*::Unit.3" \) -exec rm -f {} \;
|
||||
|
||||
# ARC (Authenticated Received Chain) support requires Mail::DKIM >= 0.44
|
||||
%if 0%{?rhel} == 7
|
||||
rm -f t/arc.t
|
||||
find $RPM_BUILD_ROOT \( -name ARC.pm -o -name "*::ARC.3" \) -exec rm -f {} \;
|
||||
find $RPM_BUILD_ROOT%{_prefix} -type d -depth -exec rmdir {} 2> /dev/null \;
|
||||
%endif
|
||||
|
||||
%if 0%{!?_without_tests:1}
|
||||
%check
|
||||
make test
|
||||
|
|
@ -172,6 +163,30 @@ fi
|
|||
%dir %attr(0750,defang,defang) %{_localstatedir}/spool/MD-Quarantine/
|
||||
|
||||
%changelog
|
||||
* Thu Jul 24 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.6-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Mon Jul 07 2025 Jitka Plesnikova <jplesnik@redhat.com> - 3.6-2
|
||||
- Perl 5.42 rebuild
|
||||
|
||||
* Sat Mar 01 2025 Robert Scheck <robert@fedoraproject.org> 3.6-1
|
||||
- Upgrade to 3.6 (#2301647)
|
||||
|
||||
* Fri Jan 17 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.1-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||
|
||||
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.1-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
* Tue Jun 11 2024 Jitka Plesnikova <jplesnik@redhat.com> - 3.4.1-6
|
||||
- Perl 5.40 rebuild
|
||||
|
||||
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.1-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.1-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.1-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
|
|
|
|||
4
sources
4
sources
|
|
@ -1,2 +1,2 @@
|
|||
SHA512 (mimedefang-3.4.1.tar.gz) = 2734834774c44d53a4e5632d113385e13e4e2ae8e94d5a766dca4f5a08b974373dbd6ee8a815a5b12d967b485154344ddbc9b70eb5ffe4988f061523e60ac0ab
|
||||
SHA512 (mimedefang-3.4.1.tar.gz.sig) = a0bd1fdd9d3b7037329347673f85ed74ee7071e118081c1eb40a47a056ebce4cc4fc7a1374ed85aa7ee4aaff30b13b6686716737db22eae6e59288ef6c2ca6ea
|
||||
SHA512 (mimedefang-3.6.tar.gz) = ceaf3b4b0d49d04b81e2280217aba5cf6873ec816cd664b379f3f32c10ba01560541cbbf0c269fcee0adc9265b18fb178e3232de3ca83c6b13440d7bd3aab34a
|
||||
SHA512 (mimedefang-3.6.tar.gz.sig) = 177e6bebbae246531bbc56cd76b20fdfd958cee7a3f3081dd78840523afd9cc291478da11d9a6c4bbd9bb3f10e4f68cce25d236abaf4b29433b9c34743996488
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue