Bug 2350331

Summary: Review Request: rust-jpeg-encoder - JPEG encoder
Product: [Fedora] Fedora Reporter: Fabio Valentini <decathorpe>
Component: Package ReviewAssignee: blinxen <h-k-81>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: code, h-k-81, package-review
Target Milestone: ---Keywords: AutomationTriaged, Reopened
Target Release: ---Flags: h-k-81: fedora-review+
Hardware: Unspecified   
OS: Unspecified   
URL: https://crates.io/crates/jpeg-encoder
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-03-24 21:05:56 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:
Bug Depends On:    
Bug Blocks: 2349021, 2352544    
Attachments:
Description Flags
The .spec file difference from Copr build 8736086 to 8804665
none
The .spec file difference from Copr build 8804665 to 8812332 none

Description Fabio Valentini 2025-03-06 14:12:17 UTC
Spec URL: https://decathorpe.fedorapeople.org/rust-jpeg-encoder.spec
SRPM URL: https://decathorpe.fedorapeople.org/rust-jpeg-encoder-0.6.0-1.fc41.src.rpm

Description:
JPEG encoder.

Fedora Account System Username: decathorpe

Comment 1 Fabio Valentini 2025-03-06 14:12:20 UTC
This package built on koji:  https://koji.fedoraproject.org/koji/taskinfo?taskID=129900552

Comment 2 Fedora Review Service 2025-03-06 14:25:29 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/8736086
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2350331-rust-jpeg-encoder/fedora-rawhide-x86_64/08736086-rust-jpeg-encoder/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 3 Ben Beasley 2025-03-07 19:02:34 UTC
Omitting the formal review for now, this looks good except that src/fdct.rs has license text in a comment header that is not reflected in the crate metadata or in the package’s License field.

/*
 * Ported from mozjpeg to rust
 *
 * This file was part of the Independent JPEG Group's software:
 * Copyright (C) 1991-1996, Thomas G. Lane.
 * libjpeg-turbo Modifications:
 * Copyright (C) 2015, 2020, D. R. Commander.
 *  
 * Conditions of distribution and use:
 * In plain English:
 *  
 * 1. We don't promise that this software works.  (But if you find any bugs,
 *    please let us know!)
 * 2. You can use this software for whatever you want.  You don't have to pay us.
 * 3. You may not pretend that you wrote this software.  If you use it in a
 *    program, you must acknowledge somewhere in your documentation that
 *    you've used the IJG code.
 *  
 * In legalese:
 *  
 * The authors make NO WARRANTY or representation, either express or implied,
 * with respect to this software, its quality, accuracy, merchantability, or
 * fitness for a particular purpose.  This software is provided "AS IS", and you,
 * its user, assume the entire risk as to its quality and accuracy.
 *  
 * This software is copyright (C) 1991-2020, Thomas G. Lane, Guido Vollbeding.
 * All Rights Reserved except as specified below.
 *  
 * Permission is hereby granted to use, copy, modify, and distribute this
 * software (or portions thereof) for any purpose, without fee, subject to these
 * conditions:
 * (1) If any part of the source code for this software is distributed, then this
 * README file must be included, with this copyright and no-warranty notice
 * unaltered; and any additions, deletions, or changes to the original files
 * must be clearly indicated in accompanying documentation.
 * (2) If only executable code is distributed, then the accompanying
 * documentation must state that "this software is based in part on the work of
 * the Independent JPEG Group".
 * (3) Permission for use of this software is granted only if the user accepts
 * full responsibility for any undesirable consequences; the authors accept
 * NO LIABILITY for damages of any kind.
 *
 * These conditions apply to any software derived from or based on the IJG code,
 * not just to the unmodified library.  If you use our work, you ought to
 * acknowledge us.
 *
 * Permission is NOT granted for the use of any IJG author's name or company name
 * in advertising or publicity relating to this software or products derived from
 * it.  This software may be referred to only as "the Independent JPEG Group's
 * software".
 *
 * We specifically permit and encourage the use of this software as the basis of
 * commercial products, provided that all warranty or liability claims are
 * assumed by the product vendor.
 *
 * This file contains a slower but more accurate integer implementation of the
 * forward DCT (Discrete Cosine Transform).
 *
 * A 2-D DCT can be done by 1-D DCT on each row followed by 1-D DCT
 * on each column.  Direct algorithms are also available, but they are
 * much more complex and seem not to be any faster when reduced to code.
 *
 * This implementation is based on an algorithm described in
 *   C. Loeffler, A. Ligtenberg and G. Moschytz, "Practical Fast 1-D DCT
 *   Algorithms with 11 Multiplications", Proc. Int'l. Conf. on Acoustics,
 *   Speech, and Signal Processing 1989 (ICASSP '89), pp. 988-991.
 * The primary algorithm described there uses 11 multiplies and 29 adds.
 * We use their alternate method with 12 multiplies and 32 adds.
 * The advantage of this method is that no data path contains more than one
 * multiplication; this allows a very simple and accurate implementation in
 * scaled fixed-point arithmetic, with a minimal number of shifts.
 */

The first license statement looks like IJG-short, but with the omittable text normally associated with IJG. I think that means it’s still IJG-short – it certainly lacks the last four paragraphs of the full IJG license – but it’s probably worth submitting this license text for formal review to be sure.

Comment 4 Fabio Valentini 2025-03-07 21:50:12 UTC
It turns out, this dependency is only needed for an non-default feature of gufo-jpeg that I don't need.

Thank you for making me look harder :D

Comment 5 Fabio Valentini 2025-03-08 17:49:30 UTC
Turns out, I need this after all. glycin 1.2~rc made it a hard dependency. :sad:

Comment 6 Fabio Valentini 2025-03-08 18:02:11 UTC
Filed an upstream issue about potential license issues:
https://gitlab.gnome.org/GNOME/glycin/-/issues/124

Comment 7 Fabio Valentini 2025-03-09 21:03:29 UTC
I have checked again, the license text in src/fdct.rs is equivalent to IJG-short, with the "in plain English" preamble being the omittable part from the IJG license. So I have added IJG-short to the License tag and crate metadata.

Comment 8 Fabio Valentini 2025-03-15 16:49:31 UTC
I missed some other part, the license is different from both IJG *and* IJG-short, so I filed a request for license review here:
https://gitlab.com/fedora/legal/fedora-license-data/-/issues/634

Comment 9 Fabio Valentini 2025-03-22 18:00:25 UTC
Based on further investigation, I have updated the license tag in this package to use the "IJG" license.

The license header in the src/fdct.rs file is identical to the license terms in the README.ijg in libjpeg-turbo, and that package already uses the IJG identifier for this license, so I assume this to be correct.

Spec URL: https://decathorpe.fedorapeople.org/rust-jpeg-encoder.spec
SRPM URL: https://decathorpe.fedorapeople.org/rust-jpeg-encoder-0.6.0-1.fc42.src.rpm

Comment 10 Fedora Review Service 2025-03-22 18:04:38 UTC
Created attachment 2081372 [details]
The .spec file difference from Copr build 8736086 to 8804665

Comment 11 Fedora Review Service 2025-03-22 18:04:40 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/8804665
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2350331-rust-jpeg-encoder/fedora-rawhide-x86_64/08804665-rust-jpeg-encoder/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 12 Fabio Valentini 2025-03-24 11:48:53 UTC
Upstream has updated the crate metadata after I filed a ticket, so the downstream patch is gone in 0.6.1:

Spec URL: https://decathorpe.fedorapeople.org/rust-jpeg-encoder.spec
SRPM URL: https://decathorpe.fedorapeople.org/rust-jpeg-encoder-0.6.1-1.fc42.src.rpm

Comment 13 Fedora Review Service 2025-03-24 11:58:52 UTC
Created attachment 2081639 [details]
The .spec file difference from Copr build 8804665 to 8812332

Comment 14 Fedora Review Service 2025-03-24 11:58:54 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/8812332
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2350331-rust-jpeg-encoder/fedora-rawhide-x86_64/08812332-rust-jpeg-encoder/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 15 blinxen 2025-03-24 19:17:36 UTC
Package was generated with rust2rpm, simplifying the review.

✅ package contains only permissible content
✅ package builds and installs without errors on rawhide
✅ test suite is run and all unit tests pass
✅ latest version of the crate is packaged
✅ license matches upstream specification and is acceptable for Fedora (was fixed, see previous comments)
✅ license file is included with %license in %files
✅ package complies with Rust Packaging Guidelines

Package APPROVED

Comment 16 Fabio Valentini 2025-03-24 20:19:56 UTC
Thank you for the review!

Comment 17 Fedora Admin user for bugzilla script actions 2025-03-24 20:20:34 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/rust-jpeg-encoder

Comment 18 Fedora Update System 2025-03-24 21:02:25 UTC
FEDORA-2025-6ed742195b (rust-gufo-0.2.1-1.fc43, rust-gufo-jpeg-0.2.0-2.fc43, and 2 more) has been submitted as an update to Fedora 43.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-6ed742195b

Comment 19 Fedora Update System 2025-03-24 21:05:56 UTC
FEDORA-2025-6ed742195b (rust-gufo-0.2.1-1.fc43, rust-gufo-jpeg-0.2.0-2.fc43, and 2 more) has been pushed to the Fedora 43 stable repository.
If problem still persists, please make note of it in this bug report.