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

unFTP: init at 0.14.5 #281588

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rafaelsgirao
Copy link

Description of changes

unFTP is an open-source FTP(S) (not SFTP) server aimed at the Cloud that allows bespoke extension through its pluggable authenticator, storage back-end and user detail store architectures.

https://unftp.rs

Things done

  • Built on platform(s)
    • x86_64-linux
    • [] aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • 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.05 Release Notes (or backporting 23.05 and 23.11 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.

@rafaelsgirao rafaelsgirao force-pushed the rafaelsgirao/package-unFTP branch from 6445b0b to 42c3589 Compare January 17, 2024 17:10
@rafaelsgirao rafaelsgirao marked this pull request as ready for review January 17, 2024 17:11

src = fetchFromGitHub {
owner = "bolcom";
repo = pname;
Copy link
Contributor

Choose a reason for hiding this comment

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

pname and repo are not considered the same and can cause issues down the path.

Suggested change
repo = pname;
repo = "unFTP";

owner = "bolcom";
repo = pname;
rev = "v${version}";
sha256 = "sha256-CPq4CH7reS5AI145l8U1nekm2MKnmoBfVqENR9QOKF4";
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
sha256 = "sha256-CPq4CH7reS5AI145l8U1nekm2MKnmoBfVqENR9QOKF4";
hash = "sha256-CPq4CH7reS5AI145l8U1nekm2MKnmoBfVqENR9QOKF4";

Copy link
Author

Choose a reason for hiding this comment

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

Why is hash preferred over sha256? I used to use hash, but thought being explicit on the hash type was better.

Copy link
Contributor

Choose a reason for hiding this comment

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

The "sha256-" part of the hash is already making it specific (:

Copy link
Member

Choose a reason for hiding this comment

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

I'll provide some more details.

This comes from nix adding support for SRI hashes, using the hash argument. There are several reasons why SRI hashes are preferred to normal hashes, but I believe most of it comes down to compatibility with the rest of the ecosystem. Somewhere along the road, the old to-be-deprecated-at-some-point arguments like sha256 also started accepting SRI hashes, creating a bit of confusion. There has been discussions around disabling this behavior to be more consistent, but nothing has been done at the moment. Also see RFC 131 for some relevant discussions.

You'll frequently see reviewers add this suggestion to both new packages, but also version bumps for packages that still use the "legacy" hashes (with legacy in quotes because AFAIK they haven't been officially deprecated anywhere)

Comment on lines +26841 to +26842
unFTP = callPackage ../servers/unftp { };

Copy link
Contributor

Choose a reason for hiding this comment

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

The package should be placed under the pkgs/by-name/so/some-package/package.nix hierarchy. Which would make this unnecessary.

Suggested change
unFTP = callPackage ../servers/unftp { };

Comment on lines +15381 to +15386
rafaelsgirao = {
email = "git-nixpkgs@rafael.ovh";
github = "rafaelsgirao";
githubId = 7544832;
name = "Rafael Girão";
};
Copy link
Contributor

Choose a reason for hiding this comment

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

The commit adding you as a maintainer should come before the package commit (:


cargoSha256 = "sha256-vFu1D2GYItVGeTmd/rwmZHM/mf4zQ3tzBLux7vb+yZ0=";

meta = with lib; {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add the meta.mainProgram tag.

}:

rustPlatform.buildRustPackage rec {
pname = "unFTP";
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
pname = "unFTP";
pname = "unftp";

pname must not contain uppercase letters.

homepage = "https://unftp.rs";
license = licenses.asl20;
maintainers = with maintainers; [ rafaelsgirao ];
platforms = platforms.unix;
Copy link
Member

Choose a reason for hiding this comment

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

I'm a bit unsure if this is reasonable, considering that we build it with gnu features and use linux-pam. I haven't looked further into it, but it sounds like this package would only run on linux, and not something like OpenBSD.

@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Mar 20, 2024
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 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 10.rebuild-darwin: 1 10.rebuild-linux: 1-10 10.rebuild-linux: 1 11.by: package-maintainer This PR was created by the maintainer of the package it changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants