[MacPorts] #74197: openssh @10.4p1_0 upgrade fails on macOS 12 due to malformed patch
MacPorts
noreply at macports.org
Thu Jul 9 03:27:42 UTC 2026
#74197: openssh @10.4p1_0 upgrade fails on macOS 12 due to malformed patch
--------------------+-------------------------
Reporter: mark4o | Owner: Schamschula
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.12.5
Keywords: | Port: openssh
--------------------+-------------------------
Upgrading openssh from @10.3p1_2 to @10.4p1_0 on macOS 12.7.6 fails
because the patch file "macports-config.patch" is malformed. The patch
file contains two extraneous lines (line 19 and 20) that cause the version
of /usr/bin/patch that is shipped on macOS 12 to fail.
{{{
% sudo port upgrade openssh
The following port will be upgraded: openssh
Continue? [Y/n]: y
---> Computing dependencies for openssh
---> Fetching archive for openssh
---> Archive not available for openssh, building locally
---> Fetching distfiles for openssh
---> Verifying checksums for openssh
---> Extracting openssh
---> Applying patches to openssh
Error: Failed to patch openssh: command execution failed
Error: See
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_openssh/openssh/main.log
for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe
there is a bug.
%
% tail -44
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_openssh/openssh/main.log
:debug:patch Executing org.macports.patch (openssh)
:notice:patch ---> Applying patches to openssh
:info:patch ---> Applying macports-config.patch
:debug:patch Environment:
:debug:patch CC_PRINT_OPTIONS='YES'
:debug:patch CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/openssh-
6795bd13/work/.CC_PRINT_OPTIONS'
:debug:patch CPATH='/opt/local/include'
:debug:patch DEVELOPER_DIR='/Library/Developer/CommandLineTools'
:debug:patch LIBRARY_PATH='/opt/local/lib'
:debug:patch MACOSX_DEPLOYMENT_TARGET='12.0'
:debug:patch
SDKROOT='/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk'
:debug:patch SOURCE_DATE_EPOCH='1783361229'
:info:patch Executing: cd "/opt/local/var/macports/build/openssh-
6795bd13/work/openssh-10.4p1" && /usr/bin/patch -t -N -p1 <
'/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/net/openssh/files
/macports-config.patch'
:debug:patch system: cd "/opt/local/var/macports/build/openssh-
6795bd13/work/openssh-10.4p1" && /usr/bin/patch -t -N -p1 <
'/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/net/openssh/files
/macports-config.patch'
:info:patch patching file ssh_config
:info:patch Hunk #2 succeeded at 43 (offset -1 lines).
:info:patch missing header for unified diff at line 21 of patch
:info:patch can't find file to patch at input line 21
:info:patch Perhaps you used the wrong -p or --strip option?
:info:patch The text leading up to this was:
:info:patch --------------------------
:info:patch |--- a/ssh_config.5 2019-10-17 01:02:18.000000000 +0200
:info:patch |+++ b/ssh_config.5 2019-10-17 01:11:33.000000000 +0200
:info:patch |--- ssh_config.5.orig 2026-07-06 02:57:12
:info:patch |+++ ssh_config.5 2026-07-06 08:02:38
:info:patch --------------------------
:info:patch No file to patch. Skipping patch.
:info:patch 1 out of 1 hunk ignored
:info:patch patching file sshd_config
:info:patch Hunk #1 succeeded at 107 (offset 2 lines).
:info:patch patching file sshd_config.5
:info:patch Command failed: cd "/opt/local/var/macports/build/openssh-
6795bd13/work/openssh-10.4p1" && /usr/bin/patch -t -N -p1 <
'/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/net/openssh/files
/macports-config.patch'
:info:patch Exit code: 1
:error:patch Failed to patch openssh: command execution failed
:debug:patch Error code: CHILDSTATUS 45593 1
:debug:patch Backtrace: command execution failed
:debug:patch while executing
:debug:patch "system {*}$notty {*}$callback {*}$nice $fullcmdstring"
:debug:patch invoked from within
:debug:patch "command_exec patch "" "< '$patch'""
:debug:patch (procedure "portpatch::patch_main" line 41)
:debug:patch invoked from within
:debug:patch "$procedure $targetname"
:error:patch See
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_openssh/openssh/main.log
for details.
%
}}}
macOS 12.7.6 21H1320 x86_64 \\
Xcode 14.2 14C18
--
Ticket URL: <https://trac.macports.org/ticket/74197>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list