Friday, December 29, 2023

Re: postfix stable35->3.5.22, stable->3.7.8

On Fri, Dec 22, 2023 at 10:24:03PM +0000, Stuart Henderson wrote:
> On 2023/12/22 22:20, Stuart Henderson wrote:
> > On 2023/12/19 16:52, Stuart Henderson wrote:
> > > Here are updates to postfix stable and stable35 versions, the latter
> > > from tb@. I've tested both.
> >
> > New ones with smtpd_forbid_bare_newline :
>
> oops, updated on a machine that didn't have the 3.5 openssl
> patch, here are the right ones:
> ...

Hi Stuart,

That's very cool - I'd love to be able to build a new Postfix with that
fix.

Currently I'm running 7.3 (+ postfix-3.7.5p8-sasl2). Should this diff
apply to 7.3?

FYI, I've not used ports much before, well, not in the last 10 years or
so. I was able to download the port tar archive:
> ftp https://cdn.openbsd.org/pub/OpenBSD/$(uname -r)/{ports.tar.gz,SHA256.sig}

And, after some faffing around, I was able to do "make fetch" and "make
extract". However, when I use patch to try to apply the diffs from your
email, I noticed two errors. The first one is a "patch reversed" error:
> dna-ng:postfix 29.12 17:26:00 % patch -i ~robb/obsd_ports_postfix_build_mods_smtp_smuggling_20231222.patch ; echo $?
> Hmm... Looks like a unified diff to me...
> The text leading up to this was:
> --------------------------
> |Index: stable/Makefile
> |===================================================================
> |RCS file: /cvs/ports/mail/postfix/stable/Makefile,v
> |retrieving revision 1.251
> |diff -u -p -r1.251 Makefile
> |--- stable/Makefile 26 Oct 2023 20:17:58 -0000 1.251
> |+++ stable/Makefile 22 Dec 2023 22:22:09 -0000
> --------------------------
> Patching file stable/Makefile using Plan A...
> Reversed (or previously applied) patch detected! Assume -R? [y]
> Hunk #1 succeeded at 2 with fuzz 1 (offset 1 line).
> Can't backup stable/Makefile, output is in /home/robb/tmp/patchoS8gjDYOvpd: Permission denied
> Hmm... The next patch looks like a unified diff to me...
> The text leading up to this was:
> ...
(Not sure how best to answer that question) ...

Then, after several apparently successful patch operations, the patch
command ends with:
> ...
> |Index: stable35/patches/patch-src_tls_tls_misc_c
> |===================================================================
> |RCS file: stable35/patches/patch-src_tls_tls_misc_c
> |diff -N stable35/patches/patch-src_tls_tls_misc_c
> |--- /dev/null 1 Jan 1970 00:00:00 -0000
> |+++ stable35/patches/patch-src_tls_tls_misc_c 22 Dec 2023 22:22:09 -0000
> --------------------------
> (Creating file stable35/patches/patch-src_tls_tls_misc_c...)
> patch: **** can't find stable35/patches/patch-src_tls_tls_misc_c
> 2

At this point the stable35/patches sub-directory contains:
> dna-ng:postfix 29.12 17:47:40 % l stable35/patches/
> -rw-r--r-- 1 root wheel 566 Nov 1 2022 patch-src_util_sys_defs_h
> -rw-r--r-- 1 root wheel 424 Nov 1 2022 patch-src_tls_tls_server_c
> -rw-r--r-- 1 root wheel 415 Nov 1 2022 patch-src_tls_tls_certkey_c
> -rw-r--r-- 1 root wheel 674 Nov 1 2022 patch-makedefs
> -rw-r--r-- 1 root wheel 6248 Nov 1 2022 patch-conf_master_cf
> -rw-r--r-- 1 root wheel 611 Nov 1 2022 patch-conf_main_cf
> drwxr-xr-x 2 root wheel 512 Mar 25 2023 CVS

It seems more likely I'm doing something wrong than there is an issue
with your patch ... but just FYI.

Ironically, I'm only interested in building 3.7.9 + sasl2. If I carry on
regardless :-) ... then I run into some issue(s) around ports and
permissions e.g. "make prepare" starts, runs and then fails with:
> ...
> ===> Building package for metaauto-1.0p4
> Create /home/robb/ports/PACKAGE_REPOSITORY/amd64/no-arch/metaauto-1.0p4.tgz
> Creating package metaauto-1.0p4
> pkg_create: mkdir /usr/ports/plist: Permission denied

After a further (long) period of experimentation, I tried switching from
using sudo to doas in mk.conf ... but now even the fetch command fails
:-/

Cheers,
Robb.

No comments:

Post a Comment