Bug 2521510 - Review Request: rust-ssh2 - Bindings to libssh2 for interacting with SSH servers
Summary: Review Request: rust-ssh2 - Bindings to libssh2 for interacting with SSH servers
Keywords:
Status: RELEASE_PENDING
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Ben Beasley
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-08-22 17:08 UTC by Sundaram Krishnan
Modified: 2026-09-01 13:14 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:
code: fedora-review+


Attachments (Terms of Use)

Description Sundaram Krishnan 2026-08-22 17:08:54 UTC
Spec URL: https://download.copr.fedorainfracloud.org/results/sundaram123krishnan/rust-ssh2-test/fedora-rawhide-x86_64/10892541-rust-ssh2/rust-ssh2.spec
SRPM URL: https://packages.redhat.com/api/pulp-content/public-copr/sundaram123krishnan/rust-ssh2-test/fedora-rawhide-aarch64/Packages/r/rust-ssh2-0.9.6-1.fc46.src.rpm
Description: Bindings to libssh2 for interacting with SSH servers and executing
remote commands, forwarding local ports, etc.
Fedora Account System Username: sundaram123krishnan

Comment 1 Ben Beasley 2026-08-29 17:36:06 UTC
Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated

The spec file is generated with rust2rpm, simplifying the review. A few
customizations are noted:

- Tests are disabled, with a sensible and adequate justification.
- The Summary is correctly and necessarily shortened to fit in 80 characters.
- Five files with spurious executable permissions have them removed in %prep.
  This is sensible. The files don’t have executable permissions in the upstream
  git repo, so there isn’t anything obvious to suggest upstream.


Issues:
=======
- Package installs properly.
  Note: Installation errors (see attachment)
  See: https://docs.fedoraproject.org/en-US/packaging-guidelines/

    Problem 1: conflicting requests
      - nothing provides (crate(libssh2-sys/openssl-on-win32) >= 0.3.2 with
	crate(libssh2-sys/openssl-on-win32) < 0.4.0~) needed by
	rust-ssh2+openssl-on-win32-devel-0.9.6-1.fc46.noarch from @commandline
     Problem 2: conflicting requests
      - nothing provides (crate(libssh2-sys/vendored-openssl) >= 0.3.2 with
	crate(libssh2-sys/vendored-openssl) < 0.4.0~) needed by
	rust-ssh2+vendored-openssl-devel-0.9.6-1.fc46.noarch from @commandline

  These two feature metapackages don’t install because they depend on
  libssh2-sys features that aren’t packaged. See
  https://src.fedoraproject.org/rpms/rust-libssh2-sys/blob/rawhide/f/rust2rpm.toml
  for the justification:

    cargo-toml-patch-comments = [
      "drop windows-specific dependencies and features",
      "drop dependency and feature for unused zlib-ng support",
      "drop feature for vendored OpenSSL sources",
    ]

  You therefore need to drop these two features (openssl-on-win32 and
  vendored-openssl) as well. You can do it with a Cargo.toml patch, using
  “rust2rpm -p”, similar to what rust-libssh2-sys does, or you can use the
  “hide” setting in the “[features]” table in rust2rpm.toml. That should work
  well in this case, but see the rust2rpm.toml man page for some general
  caveats.

  This must be fixed one way or another. All subpackages must be installable.

- Package does not contain duplicates in %files.
  Note: warning: File listed twice:
  /usr/share/cargo/registry/ssh2-0.9.6/LICENSE-APACHE
  See: https://docs.fedoraproject.org/en-US/packaging-
  guidelines/#_duplicate_files

  OK: not a serious problem; due to reasonable rust2rpm design decisions


===== MUST items =====

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated", "*No copyright* Apache License 2.0",
     "MIT License". 28 files have unknown license. Detailed output of
     licensecheck in /home/ben/fedora/review/2521510-rust-
     ssh2/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[-]: If the package is under multiple licenses, the licensing breakdown
     must be documented in the spec.
[x]: %build honors applicable compiler flags or justifies otherwise.
[x]: Package contains no bundled libraries or specifies bundled libraries
     with Provides: bundled(<libname>) if unbundling is not possible.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[x]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Package is not known to require an ExcludeArch tag.
[x]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Rpmlint is run on all rpms the build produces.
     Note: No rpmlint messages.
[x]: If (and only if) the source package includes the text of the
     license(s) in its own file, then that file, containing the text of the
     license(s) for the package is included in %license.
[x]: The License field must be a valid SPDX expression.
[x]: Package requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
[x]: Package does not own files or directories owned by other packages.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Permissions on files are set properly.
[x]: Package must not depend on deprecated() packages.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 0 bytes in 0 files.
[x]: Packages must not store files under /srv, /opt or /usr/local

===== SHOULD items =====

Generic:
[-]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[-]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in rust-
     ssh2-devel , rust-ssh2+default-devel , rust-ssh2+openssl-on-
     win32-devel , rust-ssh2+vendored-openssl-devel
[?]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[x]: Package should compile and build into binary rpms on all supported
     architectures.

     https://koji.fedoraproject.org/koji/taskinfo?taskID=149628385

[!]: %check is present and all tests pass.

     Tests are disabled, with a sensible and adequate justification.

[x]: Packages should try to preserve timestamps of original installed
     files.
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

Generic:
[!]: Rpmlint is run on all installed packages.
     Note: Mock build failed
     See: https://docs.fedoraproject.org/en-US/packaging-
     guidelines/#_use_rpmlint
[x]: Spec file according to URL is the same as in SRPM.


Installation errors
-------------------
INFO: mock.py version 6.8 starting (python version = 3.14.7, NVR = mock-6.8-1.fc44), args: /usr/libexec/mock/mock -r fedora-rawhide-x86_64 --no-cleanup-after --no-clean --plugin-option=tmpfs:keep_mounted=True --resultdir=/home/ben/fedora/review/2521510-rust-ssh2/results install /home/ben/fedora/review/2521510-rust-ssh2/results/rust-ssh2-devel-0.9.6-1.fc46.noarch.rpm /home/ben/fedora/review/2521510-rust-ssh2/results/rust-ssh2+openssl-on-win32-devel-0.9.6-1.fc46.noarch.rpm /home/ben/fedora/review/2521510-rust-ssh2/results/rust-ssh2+default-devel-0.9.6-1.fc46.noarch.rpm /home/ben/fedora/review/2521510-rust-ssh2/results/rust-ssh2+vendored-openssl-devel-0.9.6-1.fc46.noarch.rpm
Start(bootstrap): init plugins
INFO: selinux enabled
Finish(bootstrap): init plugins
Start: init plugins
INFO: selinux enabled
Finish: init plugins
INFO: Signal handler active
Start: run
Mock Version: 6.8
INFO: Mock Version: 6.8
Start(bootstrap): chroot init
INFO: calling preinit hooks
INFO: enabled root cache
INFO: enabled package manager cache
Start(bootstrap): cleaning package manager metadata
Finish(bootstrap): cleaning package manager metadata
INFO: Package manager dnf5 detected and used (fallback)
Finish(bootstrap): chroot init
Start: chroot init
INFO: calling preinit hooks
INFO: enabled root cache
INFO: enabled package manager cache
Start: cleaning package manager metadata
Finish: cleaning package manager metadata
INFO: enabled HW Info plugin
INFO: Package manager dnf5 detected and used (direct choice)
Finish: chroot init
INFO: installing package(s): /builddir/rust-ssh2-devel-0.9.6-1.fc46.noarch.rpm /builddir/rust-ssh2+openssl-on-win32-devel-0.9.6-1.fc46.noarch.rpm /builddir/rust-ssh2+default-devel-0.9.6-1.fc46.noarch.rpm /builddir/rust-ssh2+vendored-openssl-devel-0.9.6-1.fc46.noarch.rpm
ERROR: Command failed: 
 # /usr/bin/systemd-nspawn -q -M 5b4a68bbc9504a6db692ff6b1a039999 -D /var/lib/mock/fedora-rawhide-x86_64-bootstrap/root -a --capability=cap_ipc_lock --resolv-conf=off --console=pipe --setenv=TERM=vt100 --setenv=SHELL=/bin/bash --setenv=HOME=/var/lib/mock/fedora-rawhide-x86_64/root/installation-homedir --setenv=HOSTNAME=mock --setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin '--setenv=PROMPT_COMMAND=printf "\033]0;<mock-chroot>\007"' '--setenv=PS1=<mock-chroot> \s-\v\$ ' --setenv=LANG=C.UTF-8 --setenv=LC_MESSAGES=C.UTF-8 /usr/bin/dnf5 --installroot /var/lib/mock/fedora-rawhide-x86_64/root/ --releasever 46 install /builddir/rust-ssh2-devel-0.9.6-1.fc46.noarch.rpm /builddir/rust-ssh2+openssl-on-win32-devel-0.9.6-1.fc46.noarch.rpm /builddir/rust-ssh2+default-devel-0.9.6-1.fc46.noarch.rpm /builddir/rust-ssh2+vendored-openssl-devel-0.9.6-1.fc46.noarch.rpm --setopt=deltarpm=False --setopt=allow_vendor_change=yes --allowerasing --setopt=tsflags=nocontexts



Rpmlint
-------
Checking: rust-ssh2-devel-0.9.6-1.fc46.noarch.rpm
          rust-ssh2+default-devel-0.9.6-1.fc46.noarch.rpm
          rust-ssh2+openssl-on-win32-devel-0.9.6-1.fc46.noarch.rpm
          rust-ssh2+vendored-openssl-devel-0.9.6-1.fc46.noarch.rpm
          rust-ssh2-0.9.6-1.fc46.src.rpm
============================ rpmlint session starts ============================
rpmlint: 2.8.0
configuration:
    /usr/lib/python3.14/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-spdx-licenses.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
rpmlintrc: [PosixPath('/tmp/tmpcm10grq0')]
checks: 32, packages: 5

 5 packages and 0 specfiles checked; 0 errors, 0 warnings, 25 filtered, 0 badness; has taken 0.2 s 




Source checksums
----------------
https://crates.io/api/v1/crates/ssh2/0.9.6/download#/ssh2-0.9.6.crate :
  CHECKSUM(SHA256) this package     : c95eb3c09e378543395a3fa9796f897861862466ee331d59140ade4ea0dcfdfc
  CHECKSUM(SHA256) upstream package : c95eb3c09e378543395a3fa9796f897861862466ee331d59140ade4ea0dcfdfc


Requires
--------
rust-ssh2-devel (rpmlib, GLIBC filtered):
    (crate(bitflags/default) >= 2.0.0 with crate(bitflags/default) < 3.0.0~)
    (crate(libc/default) >= 0.2.0 with crate(libc/default) < 0.3.0~)
    (crate(libssh2-sys/default) >= 0.3.2 with crate(libssh2-sys/default) < 0.4.0~)
    (crate(parking_lot/default) >= 0.12.0 with crate(parking_lot/default) < 0.13.0~)
    /usr/bin/bash
    cargo

rust-ssh2+default-devel (rpmlib, GLIBC filtered):
    cargo
    crate(ssh2)

rust-ssh2+openssl-on-win32-devel (rpmlib, GLIBC filtered):
    (crate(libssh2-sys/openssl-on-win32) >= 0.3.2 with crate(libssh2-sys/openssl-on-win32) < 0.4.0~)
    cargo
    crate(ssh2)

rust-ssh2+vendored-openssl-devel (rpmlib, GLIBC filtered):
    (crate(libssh2-sys/vendored-openssl) >= 0.3.2 with crate(libssh2-sys/vendored-openssl) < 0.4.0~)
    cargo
    crate(ssh2)



Provides
--------
rust-ssh2-devel:
    crate(ssh2)
    purl(pkg:cargo/ssh2.6)
    rust-ssh2-devel

rust-ssh2+default-devel:
    crate(ssh2/default)
    rust-ssh2+default-devel

rust-ssh2+openssl-on-win32-devel:
    crate(ssh2/openssl-on-win32)
    rust-ssh2+openssl-on-win32-devel

rust-ssh2+vendored-openssl-devel:
    crate(ssh2/vendored-openssl)
    rust-ssh2+vendored-openssl-devel



Generated by fedora-review 0.11.0 (05c5b26) last change: 2025-11-29
Command line :/usr/bin/fedora-review -b 2521510
Buildroot used: fedora-rawhide-x86_64
Active plugins: Shell-api, Generic
Disabled plugins: Python, R, Haskell, SugarActivity, Perl, fonts, PHP, Java, C/C++, Ocaml
Disabled flags: EXARCH, EPEL6, EPEL7, DISTTAG, BATCH

Comment 3 Ben Beasley 2026-08-31 06:32:56 UTC
Looking at the spec-file diff, a properly-documented patch has been added using rust2rpm -p to remove the two mentioned features:

+# Manually created patch for downstream crate metadata changes
+# * drop openssl-on-win32 feature; Windows-only, forwards to a libssh2-sys
+#   feature not built in Fedora
+# * drop vendored-openssl feature; bundled OpenSSL, forwards to a libssh2-sys
+#   feature not built in Fedora
+Patch:          ssh2-fix-metadata.diff

The spec file was re-generated with rust2rpm, and the two feature metapackages are correctly absent from the spec file.

The only other difference is that the command to fix the executable files was lost:

-# Upstream published these plain files with the executable bit set
-chmod -x src/listener.rs tests/all/agent.rs tests/all/knownhosts.rs \
-  LICENSE-APACHE LICENSE-MIT README.md

You can prevent this by adding the lines to rust2rpm.toml

[scripts.prep]
post = [
    """\
# Upstream published these plain files with the executable bit set
chmod -x src/listener.rs tests/all/agent.rs tests/all/knownhosts.rs \
  LICENSE-APACHE LICENSE-MIT README.md\
"""
]

The package is APPROVED; please fix the above on import.

===

Recommended post-import rust-sig tasks:

- set up package on release-monitoring.org:
  project: $crate
  homepage: https://crates.io/crates/$crate
  backend: crates.io
  version scheme: semantic
  version filter (*NOT* pre-release filter): alpha;beta;rc;pre
  distro: Fedora
  Package: rust-$crate

  https://release-monitoring.org/project/392056/

- add @rust-sig with "commit" access as package co-maintainer
  (should happen automatically)

- set bugzilla assignee overrides to @rust-sig (optional)

- track package in koschei for all built branches
  (should happen automatically once rust-sig is co-maintainer)

Comment 4 Sundaram Krishnan 2026-09-01 12:49:26 UTC
Thanks again for the review @code
Oops! That got accidentally removed, made the patch.

Comment 5 Ben Beasley 2026-09-01 12:53:01 UTC
You’re welcome!

Note that when you write @user, it sets the NEEDINFO flag for that user. This emails them a reminder every day until they come back to the bug and clear the flag. That’s probably not what you intended.

Comment 6 Fedora Admin user for bugzilla script actions 2026-09-01 12:56:32 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/rust-ssh2
Monitoring:
Wasn't able to create project in Anitya. You can create it manually on: `https://release-monitoring.org`

Comment 7 Sundaram Krishnan 2026-09-01 13:14:34 UTC
(In reply to Ben Beasley from comment #5)
> You’re welcome!
> 
> Note that when you write @user, it sets the NEEDINFO flag for
> that user. This emails them a reminder every day until they come back to the
> bug and clear the flag. That’s probably not what you intended.

Sorry for the inconvenience! That was not intended at all.


Note You need to log in before you can comment on or make changes to this bug.