Bug 254648 - mail/qmail-tls doesn't compile with spf
Summary: mail/qmail-tls doesn't compile with spf
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-29 23:44 UTC by Charles Lecklider
Modified: 2022-02-09 01:04 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (erdgeist)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Charles Lecklider 2021-03-29 23:44:45 UTC
Fails during patching:


Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff -Nur qmail-1.03.orig/qmail-smtpd.c qmail-1.03/qmail-smtpd.c
|--- qmail-1.03.orig/qmail-smtpd.c      1998-06-15 12:53:16.000000000 +0200
|+++ qmail-1.03/qmail-smtpd.c   2004-10-26 20:59:47.563201720 +0200
--------------------------
Patching file qmail-smtpd.c using Plan A...
Hunk #1 failed at 23.
Hunk #2 succeeded at 90 (offset 27 lines).
Hunk #3 succeeded at 154 (offset 27 lines).
Hunk #4 succeeded at 245 (offset 8 lines).
Hunk #5 succeeded at 293 (offset 36 lines).
Hunk #6 succeeded at 446 (offset 16 lines).
Hunk #7 succeeded at 513 (offset 36 lines).
1 out of 7 hunks failed--saving rejects to qmail-smtpd.c.rej


Tested with no other config options.
Comment 1 Charles Lecklider 2022-02-09 01:04:04 UTC
The problem is with qmail-spf-rc5.patch-tls-20110119. The failing hunk (line 856) is:

diff -Nur qmail-1.03.orig/qmail-smtpd.c qmail-1.03/qmail-smtpd.c
--- qmail-1.03.orig/qmail-smtpd.c       1998-06-15 12:53:16.000000000 +0200
+++ qmail-1.03/qmail-smtpd.c    2004-10-26 20:59:47.563201720 +0200
@@ -23,9 +23,11 @@
 #include "commands.h"
+#include "spf.h"

 #define MAXHOPS 100
 unsigned int databytes = 0;
 int timeout = 1200;
+unsigned int spfbehavior = 0;

 const char *protocol = "SMTP";
 
 #ifdef TLS


There's nothing wrong with the hunk, so I believe the problem is patch(1) itself as this works:

@@ -23,7 +23,9 @@
 #include "commands.h"
+#include "spf.h"

 #define MAXHOPS 100
 unsigned int databytes = 0;
 int timeout = 1200;
+unsigned int spfbehavior = 0;

 const char *protocol = "SMTP";


patch(1) seems to be getting confused by having more context at the end so I'll open a bug on that, but until that's sorted could you update the patch file please?