Bug 2237014

Summary: Review Request: fscrypt - Go tool for managing Linux filesystem encryption
Product: [Fedora] Fedora Reporter: Neal Gompa <ngompa13>
Component: Package ReviewAssignee: Davide Cavalca <davide>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: davide, package-review
Target Milestone: ---Flags: davide: fedora-review+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-09-06 01:19:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Neal Gompa 2023-09-02 20:43:33 UTC
Spec URL: https://ngompa.fedorapeople.org/for-review/fscrypt.spec
SRPM URL: https://ngompa.fedorapeople.org/for-review/fscrypt-0.3.4-1.fc38.src.rpm

Description:
fscrypt is a high-level tool for the management of Linux filesystem encryption.
This tool manages metadata, key generation, key wrapping, PAM integration, and
provides a uniform interface for creating and modifying encrypted directories.

Fedora Account System Username: ngompa

Comment 1 Davide Cavalca 2023-09-02 21:40:57 UTC
Quick pass:

- source package should probably be called golang-github-google-fscrypt for consistency (and use fscrypt for the binary package)
- in godocs and docs cli-tests/README.md will overwrite README.md; if both are needed one needs to be renamed in %prep (but I suspect we can drop the cli-tests one)
- the bash completion stuff either needs a Requires: bash-completion, or it needs to own the various completion paths (most packages do the latter)

Comment 2 Neal Gompa 2023-09-02 21:45:46 UTC
I've updated the spec + srpm based on some of the feedback, rest addressed below:

(In reply to Davide Cavalca from comment #1)
> Quick pass:
> 
> - source package should probably be called golang-github-google-fscrypt for
> consistency (and use fscrypt for the binary package)

Go packaging guidelines apparently state well-known name should be used for the source package name.

Cf. https://docs.fedoraproject.org/en-US/packaging-guidelines/Golang/#_source_packages_src_rpm

> - in godocs and docs cli-tests/README.md will overwrite README.md; if both
> are needed one needs to be renamed in %prep (but I suspect we can drop the
> cli-tests one)

Dropped the cli-tests/README.md.

> - the bash completion stuff either needs a Requires: bash-completion, or it
> needs to own the various completion paths (most packages do the latter)

The bash completion directories are owned by filesystem. I don't need to do anything here.

Comment 3 Davide Cavalca 2023-09-02 21:53:33 UTC
I'm getting test failures in mock for Rawhide:

github.com/google/fscrypt/filesystem
2023/09/02 17:51:33 WARNING: "/tmp/fscrypt2289868573/file" is owned by uid 1000, but expected 4294967295 or 0
2023/09/02 17:51:33 ignoring mountpoint "/proc/filesystems" because it is not a directory
2023/09/02 17:51:33 ignoring mountpoint "/dev/btrfs-control" because it is not a directory
2023/09/02 17:51:33 ignoring mountpoint "/dev/fuse" because it is not a directory
2023/09/02 17:51:33 ignoring mountpoint "/dev/loop-control" because it is not a directory
2023/09/02 17:51:33 ignoring mountpoint "/dev/loop0" because it is not a directory
2023/09/02 17:51:33 ignoring mountpoint "/dev/loop1" because it is not a directory
2023/09/02 17:51:33 ignoring mountpoint "/dev/loop10" because it is not a directory
2023/09/02 17:51:33 ignoring mountpoint "/dev/loop11" because it is not a directory
2023/09/02 17:51:33 ignoring mountpoint "/dev/loop2" because it is not a directory
2023/09/02 17:51:33 ignoring mountpoint "/dev/loop3" because it is not a directory
2023/09/02 17:51:33 ignoring mountpoint "/dev/loop4" because it is not a directory
2023/09/02 17:51:33 ignoring mountpoint "/dev/loop5" because it is not a directory
2023/09/02 17:51:33 ignoring mountpoint "/dev/loop6" because it is not a directory
2023/09/02 17:51:33 ignoring mountpoint "/dev/loop7" because it is not a directory
2023/09/02 17:51:33 ignoring mountpoint "/dev/loop8" because it is not a directory
2023/09/02 17:51:33 ignoring mountpoint "/dev/loop9" because it is not a directory
2023/09/02 17:51:33 ignoring mountpoint "/dev/mapper/control" because it is not a directory
2023/09/02 17:51:33 ignoring mountpoint "/run/host/os-release" because it is not a directory
2023/09/02 17:51:33 ignoring mountpoint "/etc/resolv.conf" because it is not a directory
2023/09/02 17:51:33 ignoring mountpoint "/proc/sys/kernel/random/boot_id" because it is not a directory
2023/09/02 17:51:33 ignoring mountpoint "/proc/sys/kernel/random/boot_id" because it is not a directory
2023/09/02 17:51:33 ignoring mountpoint "/proc/kmsg" because it is not a directory
2023/09/02 17:51:33 ignoring invalid mountinfo line ""
2023/09/02 17:51:33 ignoring invalid mountinfo line ""
--- FAIL: TestLoadSourceDevice (0.00s)
    mountpoint_test.go:112: mnt.Device wasn't set to source device
2023/09/02 17:51:33 ignoring mountpoint "/tmp/fscrypt_regfile2317361102" because it is not a directory
2023/09/02 17:51:33 ignoring invalid mountinfo line ""
2023/09/02 17:51:33 ignoring invalid mountinfo line "a"
2023/09/02 17:51:33 ignoring invalid mountinfo line "a a a a a a a a a a a a a a a"
2023/09/02 17:51:33 ignoring invalid mountinfo line "a a a a a a a a a a a a - a a"
2023/09/02 17:51:33 ignoring invalid mountinfo line "15 0 BAD:3 / / rw,relatime shared:1 - ext4 /dev/root rw,data=ordered"
2023/09/02 17:51:33 ignoring invalid mountinfo line ""
2023/09/02 17:51:33 ignoring invalid mountinfo line ""
2023/09/02 17:51:33 ignoring invalid mountinfo line ""
2023/09/02 17:51:33 ignoring invalid mountinfo line ""
2023/09/02 17:51:33 ignoring invalid mountinfo line ""
2023/09/02 17:51:33 ignoring invalid mountinfo line ""
2023/09/02 17:51:33 ignoring invalid mountinfo line ""
2023/09/02 17:51:33 ignoring invalid mountinfo line ""
FAIL
exit status 1
FAIL	github.com/google/fscrypt/filesystem	0.004s
error: Bad exit status from /var/tmp/rpm-tmp.lWGY4s (%check)
    Bad exit status from /var/tmp/rpm-tmp.lWGY4s (%check)

Comment 4 Neal Gompa 2023-09-02 22:46:02 UTC
(In reply to Davide Cavalca from comment #3)
> I'm getting test failures in mock for Rawhide:
> 

This passes locally on my machine in Mock. I don't know what's up here.

I've submitted a Koji scratch build to see if it happens there too: https://koji.fedoraproject.org/koji/taskinfo?taskID=105673710

If it does, I'll have to make the tests non-blocking due to flakiness...

Comment 5 Neal Gompa 2023-09-02 23:09:12 UTC
So the tests fail oddly on non-x86_64 arches. I've filed a bug upstream (https://github.com/google/fscrypt/issues/382) and adjusted the spec accordingly.

Comment 6 Davide Cavalca 2023-09-04 21:51:48 UTC
Koji passes so that's good enough for me

Package was generated with go2rpm, simplifying the review.

- package builds and installs without errors on rawhide
- test suite is run, unit tests pass and failures have upstream tickets
- latest version is packaged
- license matches upstream specification and is acceptable for Fedora
- license file is included with %license in %files
- package complies with Golang Packaging Guidelines

Package APPROVED.

Comment 7 Fedora Admin user for bugzilla script actions 2023-09-05 01:13:29 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/fscrypt

Comment 8 Fedora Update System 2023-09-05 01:48:27 UTC
FEDORA-2023-efc37c9671 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-efc37c9671

Comment 9 Fedora Update System 2023-09-05 01:48:28 UTC
FEDORA-2023-f67ecf5f11 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-f67ecf5f11

Comment 10 Fedora Update System 2023-09-05 01:48:29 UTC
FEDORA-2023-61311401d4 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-61311401d4

Comment 11 Fedora Update System 2023-09-06 01:19:59 UTC
FEDORA-2023-61311401d4 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 12 Fedora Update System 2023-09-06 01:31:57 UTC
FEDORA-2023-f67ecf5f11 has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-f67ecf5f11 \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-f67ecf5f11

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 13 Fedora Update System 2023-09-06 02:26:37 UTC
FEDORA-2023-efc37c9671 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 14 Fedora Update System 2023-09-15 18:48:41 UTC
FEDORA-2023-f67ecf5f11 has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.