Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openssh: update to 9.7p1 #22981

Merged
merged 2 commits into from
Mar 12, 2024
Merged

Conversation

artkiver
Copy link
Contributor

Description

Type(s)
  • bugfix
  • enhancement
  • security fix
Tested on

macOS 14.4 23E214 arm64
Xcode 15.3 15E204a

Verification

Have you

  • followed our Commit Message Guidelines?
  • squashed and minimized your commits?
  • checked that there aren't other open pull requests for the same change?
  • referenced existing tickets on Trac with full URL in commit message?
  • checked your Portfile with port lint --nitpick?
  • tried existing tests with sudo port test?
  • tried a full install with sudo port -vst install?
  • tested basic functionality of all binary files?
  • checked that the Portfile's most important variants haven't been broken?

@herbygillot
Copy link
Member

CI is also running tests. It looks like it built correctly, but is failing the port test phase:

 --->  Testing openssh
  DEBUG: Executing org.macports.test (openssh)
  Error: Failed to test openssh: fopen(/opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_openssh/openssh/work/destroot/opt/local/libexec/ssh-keysign): permission denied
  DEBUG: Error code: POSIX EACCES {permission denied}
  DEBUG: Backtrace: fopen(/opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_openssh/openssh/work/destroot/opt/local/libexec/ssh-keysign): permission denied
      while executing
  "fileIsBinary $fullpath"
      invoked from within
  "fs-traverse -depth fullpath [list [option destpath]] {
          if {[file type $fullpath] ne "file"} {
              continue
          }
          if {[file..."
      (procedure "porttest::test_archs" line 11)
      invoked from within
  "porttest::test_archs"
      (procedure "porttest::test_main" line 5)
      invoked from within
  "$procedure $targetname"

@artkiver
Copy link
Contributor Author

CI is also running tests. It looks like it built correctly, but is failing the port test phase:

 --->  Testing openssh
  DEBUG: Executing org.macports.test (openssh)
  Error: Failed to test openssh: fopen(/opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_openssh/openssh/work/destroot/opt/local/libexec/ssh-keysign): permission denied
  DEBUG: Error code: POSIX EACCES {permission denied}
  DEBUG: Backtrace: fopen(/opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_net_openssh/openssh/work/destroot/opt/local/libexec/ssh-keysign): permission denied
      while executing
  "fileIsBinary $fullpath"
      invoked from within
  "fs-traverse -depth fullpath [list [option destpath]] {
          if {[file type $fullpath] ne "file"} {
              continue
          }
          if {[file..."
      (procedure "porttest::test_archs" line 11)
      invoked from within
  "porttest::test_archs"
      (procedure "porttest::test_main" line 5)
      invoked from within
  "$procedure $targetname"

Yeah, as I mentioned here: https://trac.macports.org/ticket/69478#ticket I had ignored port test failing locally because I am usually accustomed to that failing when it attempts to netcat to sshd (and I have a firewall running so that stalls out/fails) and in my haste I didn't look at the main.log output in detail before submitting the PR.

The permissions error looks similar to something addressed upstream by OpenSMTPD; and I made mentioned of that in the Trac issue as well as tagged OpenSSH developer @djm-google on the FediVerse, but I have not yet looked into this deeply, so my cursory evaluation may be a bit of a red herring.

@djm-google
Copy link

ITYM @djmdjm (same person, different role)

net/openssh/Portfile Outdated Show resolved Hide resolved
Copy link
Contributor Author

@artkiver artkiver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another glaring oversight by me. Thanks for the catch @reneeotten !

@artkiver
Copy link
Contributor Author

As a "sanity check" of sorts, I checked locally to see if 9.6p1 maybe failed similarly? It seems as if that is the case.

Reverting to the previous Portfile and running port -d -v test, it fails as follows:

DEBUG: test phase started at Tue Mar 12 15:43:37 UTC 2024 ---> Testing openssh DEBUG: Executing org.macports.test (openssh) Error: Failed to test openssh: fopen(/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_openssh/openssh/work/destroot/opt/local/libexec/ssh-keysign): permission denied DEBUG: Error code: POSIX EACCES {permission denied} DEBUG: Backtrace: fopen(/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_openssh/openssh/work/destroot/opt/local/libexec/ssh-keysign): permission denied while executing "fileIsBinary $fullpath" invoked from within "fs-traverse -depth fullpath [list [option destpath]] { if {[file type $fullpath] ne "file"} { continue } if {[file..." (procedure "porttest::test_archs" line 11) invoked from within "porttest::test_archs" (procedure "porttest::test_main" line 5) invoked from within "$procedure $targetname" 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. Error: Processing of port openssh failed

I vaguely recall some discussion on the mailing list that MacPorts' tests had changed recently, and I know that whatever CI checks were run when I submitted the PR for 9.6p1 passed OK. (#21834) but that was in December of last year, I think before 2.9.1?

Regardless, I am currently wondering if this might be a MacPorts issue rather than one for handling upstream?

@artkiver
Copy link
Contributor Author

I updated the Trac issue as well with output from %make tests run manually from the OpenSSH 9.7p1 tarball, here:
https://trac.macports.org/ticket/69478#comment:2

As you can see from that, it ends with:

all tests passed

So, I think this is an issue related to this commit from MacPorts 2.9.0: macports/macports-base@ddc2655 ?

Namely, "Added a simple default test phase for all ports, which currently
just checks the architectures of installed files. test.run yes
enables the tests defined by the Portfile, as before. It should
always be safe to run port test now, and if it fails it means
a test didn't pass. (jmr in macports/macports-base@ddc2655)"

I responded to a similar thread on the mailing list that another developer had encountered with some of the R related ports I guess; since I think this probably is not an upstream issue, but has to do with the "simple default test phase" that MacPorts introduced since I last submitted a PR for OpenSSH in December 2023.

Not too sure how to move forward with this yet, but maybe @jmroot has some useful insights?

Thanks!

@herbygillot herbygillot merged commit e3fa34e into macports:master Mar 12, 2024
0 of 4 checks passed
@artkiver artkiver deleted the openssh9.7p1_uno branch March 14, 2024 05:32
i0ntempest pushed a commit to i0ntempest/macports-ports that referenced this pull request Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
5 participants