Hi, Trying to install openssh with the hpn variant fails trying to apply patches. If I don't specify +hpn it builds and installs fine. This is with MacPorts 1.60 on Leopard (10.5.1) on a couple of different Intel boxes. At first I thought that it might be related to the following Trac ticket: <http://trac.macports.org/projects/macports/ticket/13091> which contains a patch to update the Portifle to use a new HPN patch. I successfully applied to that patch to a local copy of the Portfile but still got the same errors. I then commented out the "patch.pre_args -p1" command/option in the hpn variant. That allowed some patches specified by patch-pwdup.diff to be applied but not those specified in of the /openssh-4.7p1-hpn12v18.diff.gz patch file or the /openssh-4.7p1-hpn12v19.diff.gz patch file. Finally I went back to the Portfile and instead of commenting out "patch.pre_args -p1" command/option in the hpn variant, I removed the "-p1". This seems to be working, all patches apply and the installed ssh with hpn support seems to be working. Was there a change to patch in Leopard? Last time I did an OpenSSH install on Tiger, back in Oct it ran fine. Haven't had a chance to try it again on Tiger to see if I get the same problem. Thanks - David Here's the full install DEBUG output: $ sudo port -d install openssh +hpn DEBUG: Found port in file:///opt/local/var/macports/sources/rsync.macports.org/release/ports/net/openssh DEBUG: Changing to port directory: /opt/local/var/macports/sources/ rsync.macports.org/release/ports/net/openssh DEBUG: Requested variant i386 is not provided by port openssh. DEBUG: Requested variant macosx is not provided by port openssh. DEBUG: Executing variant hpn provides hpn DEBUG: Executing variant darwin provides darwin DEBUG: Executing variant darwin_9 provides darwin_9 DEBUG: Found port in file:///opt/local/var/macports/sources/rsync.macports.org/release/ports/devel/openssl DEBUG: Changing to port directory: /opt/local/var/macports/sources/ rsync.macports.org/release/ports/devel/openssl DEBUG: Requested variant i386 is not provided by port openssl. DEBUG: Requested variant hpn is not provided by port openssl. DEBUG: Requested variant macosx is not provided by port openssl. DEBUG: Executing variant darwin provides darwin DEBUG: Searching for dependency: openssl DEBUG: Found Dependency: receipt exists for openssl DEBUG: Found port in file:///opt/local/var/macports/sources/rsync.macports.org/release/ports/archivers/zlib DEBUG: Changing to port directory: /opt/local/var/macports/sources/ rsync.macports.org/release/ports/archivers/zlib DEBUG: Requested variant darwin is not provided by port zlib. DEBUG: Requested variant i386 is not provided by port zlib. DEBUG: Requested variant hpn is not provided by port zlib. DEBUG: Requested variant macosx is not provided by port zlib. DEBUG: Searching for dependency: zlib DEBUG: Found Dependency: receipt exists for zlib DEBUG: Executing org.macports.main (openssh) ---> Fetching openssh DEBUG: Executing org.macports.fetch (openssh) ---> Verifying checksum(s) for openssh DEBUG: Executing org.macports.checksum (openssh) ---> Checksumming openssh-4.7p1-hpn12v18.diff.gz DEBUG: Correct (md5) checksum for openssh-4.7p1-hpn12v18.diff.gz DEBUG: Correct (sha1) checksum for openssh-4.7p1-hpn12v18.diff.gz DEBUG: Correct (rmd160) checksum for openssh-4.7p1-hpn12v18.diff.gz ---> Checksumming DVG-5142987_launchd_DISPLAY_for_X11.patch DEBUG: Correct (md5) checksum for DVG-5142987_launchd_DISPLAY_for_X11.patch DEBUG: Correct (sha1) checksum for DVG-5142987_launchd_DISPLAY_for_X11.patch DEBUG: Correct (rmd160) checksum for DVG-5142987_launchd_DISPLAY_for_X11.patch ---> Checksumming openssh-4.7p1.tar.gz DEBUG: Correct (md5) checksum for openssh-4.7p1.tar.gz DEBUG: Correct (sha1) checksum for openssh-4.7p1.tar.gz DEBUG: Correct (rmd160) checksum for openssh-4.7p1.tar.gz ---> Extracting openssh DEBUG: Executing org.macports.extract (openssh) ---> Extracting openssh-4.7p1.tar.gz DEBUG: setting option extract.args to /opt/local/var/macports/ distfiles/openssh/openssh-4.7p1.tar.gz DEBUG: Environment: DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/ _opt_local_var_macports_sources_rsync .macports.org_release_ports_net_openssh/work" && gzip -dc /opt/local/ var/macports/distfiles/openssh/openssh-4.7p1.tar.gz | /usr/bin/gnutar --no-same-owner -xf -' DEBUG: Executing org.macports.patch (openssh) ---> Applying patches to openssh ---> Applying /opt/local/var/macports/distfiles/openssh/openssh-4.7p1- hpn12v18.diff.gz DEBUG: Environment: DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/ _opt_local_var_macports_sources_rsync .macports.org_release_ports_net_openssh/work/openssh-4.7p1" && patch - p1' patching file buffer.c patching file buffer.h patching file channels.c patching file channels.h patching file cipher.c patching file clientloop.c patching file clientloop.h patching file compat.c patching file compat.h patching file HPN12-README patching file kex.c patching file kex.h patching file myproposal.h patching file packet.c patching file packet.h patching file readconf.c patching file readconf.h patching file scp.c patching file servconf.c patching file servconf.h patching file serverloop.c patching file session.c patching file ssh.c patching file sshconnect2.c patching file sshconnect.c patching file sshd.c patching file sshd_config patching file version.h ---> Applying /opt/local/var/macports/distfiles/openssh/ DVG-5142987_launchd_DISPLAY_for_X11.patch DEBUG: Environment: DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/ _opt_local_var_macports_sources_rsync .macports.org_release_ports_net_openssh/work/openssh-4.7p1" && patch - p1' patching file channels.c Hunk #1 succeeded at 3012 (offset 58 lines). Hunk #2 succeeded at 3022 (offset 58 lines). Hunk #3 succeeded at 3030 (offset 58 lines). Hunk #4 succeeded at 3060 (offset 58 lines). ---> Applying /opt/local/var/macports/sources/rsync.macports.org/ release/ports/net/openssh/files/patch-pwdup.diff DEBUG: Environment: DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/ _opt_local_var_macports_sources_rsync .macports.org_release_ports_net_openssh/work/openssh-4.7p1" && patch - p1' missing header for unified diff at line 8 of patch can't find file to patch at input line 8 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: ssh.c |=================================================================== |RCS file: /cvs/src/usr.bin/ssh/ssh.c,v |retrieving revision 1.305 |diff -u -p -r1.305 ssh.c |--- ssh.c 29 Oct 2007 06:54:50 -0000 1.305 |+++ ssh.c 3 Nov 2007 00:32:14 -0000 -------------------------- File to patch: Skip this patch? [y] Skipping patch. 2 out of 2 hunks ignored missing header for unified diff at line 31 of patch can't find file to patch at input line 31 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: misc.c |=================================================================== |RCS file: /cvs/src/usr.bin/ssh/misc.c,v |retrieving revision 1.65 |diff -u -p -r1.65 misc.c |--- misc.c 23 Nov 2006 01:35:11 -0000 1.65 |+++ misc.c 3 Nov 2007 00:32:14 -0000 -------------------------- File to patch: Skip this patch? [y] Skipping patch. 1 out of 1 hunk ignored missing header for unified diff at line 67 of patch can't find file to patch at input line 67 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: misc.h |=================================================================== |RCS file: /cvs/src/usr.bin/ssh/misc.h,v |retrieving revision 1.36 |diff -u -p -r1.36 misc.h |--- misc.h 18 Aug 2006 10:27:16 -0000 1.36 |+++ misc.h 3 Nov 2007 00:32:14 -0000 -------------------------- File to patch: Skip this patch? [y] Skipping patch. 1 out of 1 hunk ignored Error: Target org.macports.patch returned: shell command " cd "/opt/ local/var/macports/build/ _opt_local_var_macports_sources_rsync .macports.org_release_ports_net_openssh/work/openssh-4.7p1" && patch - p1 < '/opt/local/var/macports/sources/rsync.macports.org/release/ports/ net/openssh/files/patch-pwdup.diff'" returned error 1 Command output: -------------------------- |Index: misc.c |=================================================================== |RCS file: /cvs/src/usr.bin/ssh/misc.c,v |retrieving revision 1.65 |diff -u -p -r1.65 misc.c |--- misc.c 23 Nov 2006 01:35:11 -0000 1.65 |+++ misc.c 3 Nov 2007 00:32:14 -0000 -------------------------- File to patch: Skip this patch? [y] Skipping patch. 1 out of 1 hunk ignored missing header for unified diff at line 67 of patch can't find file to patch at input line 67 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: misc.h |=================================================================== |RCS file: /cvs/src/usr.bin/ssh/misc.h,v |retrieving revision 1.36 |diff -u -p -r1.36 misc.h |--- misc.h 18 Aug 2006 10:27:16 -0000 1.36 |+++ misc.h 3 Nov 2007 00:32:14 -0000 -------------------------- File to patch: Skip this patch? [y] Skipping patch. 1 out of 1 hunk ignored Warning: the following items did not execute (for openssh): org.macports.activate org.macports.patch org.macports.configure org.macports.build org.macports.destroot org.macports.install Error: Status 1 encountered during processing. ~
On Dec 27, 2007 10:25 PM, David L Ballenger <dlb@davidlballenger.com> wrote:
I successfully applied to that patch to a local copy of the Portfile but still got the same errors. I then commented out the "patch.pre_args -p1" command/option in the hpn variant. That allowed some patches specified by patch-pwdup.diff to be applied but not those specified in of the /openssh-4.7p1-hpn12v18.diff.gz patch file or the /openssh-4.7p1-hpn12v19.diff.gz patch file. Finally I went back to the Portfile and instead of commenting out "patch.pre_args -p1" command/option in the hpn variant, I removed the "-p1". This seems to be working, all patches apply and the installed ssh with hpn support seems to be working.
I think that removing the -p1 from the patch.pre_args will cause the patch not the be applied, looking at the debug output of the install seems to confirm this.
Was there a change to patch in Leopard? Last time I did an OpenSSH install on Tiger, back in Oct it ran fine. Haven't had a chance to try it again on Tiger to see if I get the same problem.
the patch-pwdup.diff is applied on Leopard to fix the "percent_expand: NULL replacement" error you get when the identify file isn't specified, this is the current upstream proposed fix which unfortunately conflicts with the high-performance patch. So at the moment, the hpn variant won't work on Leopard. I'll see if get the two patches playing nicely together. Cheers Adam
On Dec 28, 2007, at 4:43 AM, Adam Mercer wrote:
On Dec 27, 2007 10:25 PM, David L Ballenger <dlb@davidlballenger.com> wrote:
I successfully applied to that patch to a local copy of the Portfile but still got the same errors. I then commented out the "patch.pre_args -p1" command/option in the hpn variant. That allowed some patches specified by patch-pwdup.diff to be applied but not those specified in of the /openssh-4.7p1-hpn12v18.diff.gz patch file or the /openssh-4.7p1-hpn12v19.diff.gz patch file. Finally I went back to the Portfile and instead of commenting out "patch.pre_args -p1" command/option in the hpn variant, I removed the "-p1". This seems to be working, all patches apply and the installed ssh with hpn support seems to be working.
I think that removing the -p1 from the patch.pre_args will cause the patch not the be applied, looking at the debug output of the install seems to confirm this.
Adam, Sorry, for the confusion, but the debug output was from before I started attempting to fix things, i.e. the patch.pre_args still specified -p1 and was not commented out. Guess I should have put the debug output earlier in the message.
Was there a change to patch in Leopard? Last time I did an OpenSSH install on Tiger, back in Oct it ran fine. Haven't had a chance to try it again on Tiger to see if I get the same problem.
the patch-pwdup.diff is applied on Leopard to fix the "percent_expand: NULL replacement" error you get when the identify file isn't specified, this is the current upstream proposed fix which unfortunately conflicts with the high-performance patch. So at the moment, the hpn variant won't work on Leopard. I'll see if get the two patches playing nicely together.
Changing the patch.pre_args to be empty seems to let both patches be applied and the install work with no errors. Running /opt/local/bin/ ssh -V gives: OpenSSH_4.7p1-hpn12v19, OpenSSL 0.9.8g 19 Oct 2007 If I run the install with the -k option to keep the sources it looks like the patch-pwdup.diff and HPN changes were applied to the source files. Thanks - David
Cheers
Adam
On Dec 28, 2007 6:42 PM, David L Ballenger <dlb@davidlballenger.com> wrote:
Changing the patch.pre_args to be empty seems to let both patches be applied and the install work with no errors. Running /opt/local/bin/ ssh -V gives:
OpenSSH_4.7p1-hpn12v19, OpenSSL 0.9.8g 19 Oct 2007
If I run the install with the -k option to keep the sources it looks like the patch-pwdup.diff and HPN changes were applied to the source files.
I've updated to hpn12v20 in r32433, which seems to apply cleanly: $ port installed | grep openssh openssh @4.7p1_1+darwin_9+hpn (active) $ which ssh /opt/local/bin/ssh $ ssh -V OpenSSH_4.7p1-hpn12v20, OpenSSL 0.9.8g 19 Oct 2007 $ Give it a few hours then do a selfupdate, if you have any problem give me a shout. Cheers Adam
Thanks Adam! Your changes have fixed the patch problems and it builds and installs fine. My ssh -V shows the same version string as yours and I can ssh to my various systems fine. One question, after I did the selfupdate, openssh did not show up as being outdated with a "port outdated". Should it have? I looked at the Portfile and it had been modified to use hpn12v20. So I just did an uninstall and reinstalled openssh and as I said above it built cleanly and is showing the update hpn version info. Thanks again, -David On Dec 31, 2007, at 6:25 AM, Adam Mercer wrote:
I've updated to hpn12v20 in r32433, which seems to apply cleanly:
$ port installed | grep openssh openssh @4.7p1_1+darwin_9+hpn (active) $ which ssh /opt/local/bin/ssh $ ssh -V OpenSSH_4.7p1-hpn12v20, OpenSSL 0.9.8g 19 Oct 2007 $
Give it a few hours then do a selfupdate, if you have any problem give me a shout.
Cheers
Adam
participants (2)
-
Adam Mercer
-
David L Ballenger