Skip to content

cvs: use ssh instead of rsh.#347374

Closed
joshuakb2 wants to merge 1 commit intoNixOS:masterfrom
joshuakb2:fix-cvs
Closed

cvs: use ssh instead of rsh.#347374
joshuakb2 wants to merge 1 commit intoNixOS:masterfrom
joshuakb2:fix-cvs

Conversation

@joshuakb2
Copy link

If no ssh executable can be found during the configure phase, CVS defaults to using rsh for remote connections instead. This seems undesirable in 2024.

Things done

  • Added the openssh package to the build inputs so that the ssh executable is found by configure.

  • Built on platform(s)

    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:

  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage

  • Tested basic functionality of all binary files (usually in ./result/bin/)

  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)

    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.


Add a 👍 reaction to pull requests you find important.

@NixOSInfra NixOSInfra added the 12.first-time contribution This PR is the author's first one; please be gentle! label Oct 9, 2024
@AndersonTorres
Copy link
Member

buildInputs?

@ofborg ofborg bot added 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Oct 9, 2024
@joshuakb2
Copy link
Author

buildInputs?

Yes, it seems that if configure doesn't find an ssh executable in $PATH during the build, the built cvs executable won't even try to use ssh even though that's the intended behavior according to the release notes, and it's the behavior on every other Linux distro I've used.

However, it occurs to me now that maybe configure can't tell the difference between a real ssh executable and a fake ssh executable that exists only during the configuration step. The cvs executable seems to run whatever ssh is in the environment at runtime anyway. So maybe there's no need to depend on the real openssh package to fix this.

@joshuakb2
Copy link
Author

Sure enough, it works fine with a fake SSH executable present during the build. So I think I'll amend my pull request to not use the openssh package, it's unnecessary.

@joshuakb2 joshuakb2 force-pushed the fix-cvs branch 2 times, most recently from cd3e0de to fd3b151 Compare October 9, 2024 04:51
If no ssh executable can be found during the configure phase, CVS
defaults to using rsh for remote connections instead.
@AndersonTorres
Copy link
Member

Let me ask:

If I built CVS before your PR, and install both CVS and OpenSSH, then CVS will be unable to find SSH.
Is this correct?

@joshuakb2
Copy link
Author

joshuakb2 commented Oct 9, 2024 via email

@AndersonTorres
Copy link
Member

From what I have understood by reading the source code,

  • there is a configure flag, --with-ssh=<executable> that hard-codes the SSH path
  • at runtime CVS reads $CVS_SSH when set
  • the :extssh: method will use $CVS_SSH if set, or fall back on ssh

It looks like it's possible to use ssh under cvs.

@joshuakb2
Copy link
Author

joshuakb2 commented Oct 9, 2024 via email

@AndersonTorres
Copy link
Member

AndersonTorres commented Oct 9, 2024

Just because it's possible to make it work doesn't mean it makes sense to require an extra environment variable be defined just so that cvs will behave the way its own authors describe.

There are tutorials on the Internet suggesting to set environment variables in order to use CVS:
https://alvinalexander.com/blog/post/cvs/login-cvs-server-using-ssh/

And this is supported by the documentation:
https://www.gnu.org/software/trans-coord/manual/cvs/html_node/Connecting-via-rsh.html

I've just migrated my work computer from Ubuntu to NixOS. Ubuntu's cvs package does not attempt to use rsh.

Nice.
Can I have a look at the build scripts Ubuntu uses to build CVS, so that I can adapt them to Nixpkgs?

@joshuakb2
Copy link
Author

I'm not interested in trying to convince you that this is a worthwhile change. I find it valuable, personally. I was somewhat annoyed when I discovered that cvs doesn't work the same way in NixOS as it works on Ubuntu because it meant that I couldn't get work done until I found a workaround. I thought the community may benefit from this change.

Nice.
Can I have a look at the build scripts Ubuntu uses to build CVS, so that I can adapt them to Nixpkgs?

Be my guest, I've never looked at them personally. I've just used cvs on other systems.

@AndersonTorres AndersonTorres mentioned this pull request Oct 10, 2024
13 tasks
@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Nov 10, 2024
@nixpkgs-ci nixpkgs-ci bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 25, 2025
@joshuakb2 joshuakb2 closed this Dec 3, 2025
@joshuakb2 joshuakb2 deleted the fix-cvs branch December 3, 2025 08:22
@joshuakb2 joshuakb2 mentioned this pull request Dec 3, 2025
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.status: merge conflict This PR has merge conflicts with the target branch 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 12.first-time contribution This PR is the author's first one; please be gentle!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants