Bug 2368361 - Review Request: rust-pam-bindings - rust bindings for libpam
Summary: Review Request: rust-pam-bindings - rust bindings for libpam
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Nobody's working on this, feel free to take it
QA Contact: Fedora Extras Quality Assurance
URL: https://crates.io/crates/pam-bindings
Whiteboard:
Depends On:
Blocks: 2404683
TreeView+ depends on / blocked
 
Reported: 2025-05-24 12:08 UTC by Noa Resare
Modified: 2025-10-17 08:39 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)
The .spec file difference from Copr build 9077020 to 9688424 (1.22 KB, patch)
2025-10-14 18:11 UTC, Fedora Review Service
no flags Details | Diff

Description Noa Resare 2025-05-24 12:08:37 UTC
Spec URL: https://download.copr.fedorainfracloud.org/results/noa/rust/fedora-rawhide-x86_64/09076976-rust-pam-bindings/rust-pam-bindings.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/noa/rust/fedora-rawhide-x86_64/09076976-rust-pam-bindings/rust-pam-bindings-0.1.1-1.fc43.src.rpm
Description: Rust interface to the pluggable authentication module framework (PAM).
Fedora Account System Username: noa

I dabbled in Fedora packaging once a long time ago, but I think I need a sponsor again.

This package is a dependency needed to package pam-ssh-agent which I am the upstream author of and I would like to package as soon as its deps are available.

As per the Rust packaging guidelines this spec file is generated using rust2rpm with minimal configuration. The repository that COPR uses to build the srpm can be viewed here: https://github.com/nresare/rpm-packaging/tree/main/pam-bindings

Comment 1 Fedora Review Service 2025-05-24 12:12:36 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/9077020
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2368361-rust-pam-bindings/fedora-rawhide-x86_64/09077020-rust-pam-bindings/fedora-review/review.txt

Please take a look if any issues were found.


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 2 Fabio Valentini 2025-07-30 13:39:53 UTC
It looks like you still need to address this:

> # FIXME: no license files detected

Comment 3 Noa Resare 2025-08-03 09:46:57 UTC
It is not entirely clear to me how to add the LICENSE file to the .src.rpm while keeping it generated using rust2rpm. I made an attempt in this commit https://github.com/nresare/rpm-packaging/commit/8327fcb2e4c4cfce137ccfee754e6a97048aca47 which in turn resulted in the following output:

Spec URL: https://download.copr.fedorainfracloud.org/results/noa/rust/fedora-rawhide-aarch64/09366875-rust-pam-bindings/rust-pam-bindings.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/noa/rust/fedora-rawhide-aarch64/09366875-rust-pam-bindings/rust-pam-bindings-0.1.1-1.fc43.src.rpm

The reason for these files missing in the .crate is that the upstream repository is a cargo workspace, where the LICENSE and README.md lives in the top level directory. I have opened an upstream issue[1], in the interim I am happy to go with whatever workaround seems best to you


1) https://github.com/anowell/pam-rs/issues/17

Comment 4 Ben Beasley 2025-10-04 22:17:43 UTC
I assume you noticed that there doesn’t seem to have been any activity upstream in the last three years? I also found a report of unsoundness in https://github.com/anowell/pam-rs/issues/16, which seems concerning for authentication-related code.

----

Ignoring the above for now, we can fix https://github.com/anowell/pam-rs/issues/17 upstream with https://github.com/anowell/pam-rs/pull/18. (Copies of the workspace LICENSE file would have worked as well; symbolic links are a common pattern.)

It’s OK if there is no README.md in the crates.

Until upstream makes a new release, you can add the license downstream via rust2rpm something like this:

[package.license-files]
include = [ "LICENSE"]

[[package.extra-sources]]
number = 10
file = "https://github.com/anowell/pam-rs/raw/3d9318b5b812d9142595928deec23e5843a60995/LICENSE"
comments = [
    "README.md and LICENSE missing from published pam-bindings crate",
    "https://github.com/anowell/pam-rs/issues/17",
    "Fix missing license files in published crates",
    "https://github.com/anowell/pam-rs/pull/18",
]

[scripts.prep]
pre = [
    "# Copy in the workspace license file",
    "cp -p '%{SOURCE10}' ."
]

Comment 5 Noa Resare 2025-10-13 20:58:09 UTC
Thank you for the rust2rpm.toml hints, this looks a lot better. I have landed an updated version here

https://github.com/nresare/rpm-packaging/blob/main/pam-bindings/rust2rpm.toml

and rebuilt the COPR packages from this.

Stable links for the newly built spec and .src.rpm:
https://github.com/nresare/rpm-packaging/releases/download/v20251013/rust-pam-bindings.spec
https://github.com/nresare/rpm-packaging/releases/download/v20251013/rust-pam-bindings-0.1.1-1.el10.src.rpm

--

It is true that upstream seems to have found better things to do with their time. I will reach out 
and hear if they are interested in some shared ownership

Comment 6 Fedora Review Service 2025-10-14 18:11:19 UTC
Created attachment 2109718 [details]
The .spec file difference from Copr build 9077020 to 9688424

Comment 7 Fedora Review Service 2025-10-14 18:11:22 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/9688424
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2368361-rust-pam-bindings/fedora-rawhide-x86_64/09688424-rust-pam-bindings/fedora-review/review.txt

Please take a look if any issues were found.


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.


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