Bug 2251479 - Review Request: perl-File-Unpack2 - An strong archive file unpacker, based on mime-types
Summary: Review Request: perl-File-Unpack2 - An strong archive file unpacker, based on...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Petr Pisar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-11-25 14:49 UTC by Miroslav Suchý
Modified: 2024-02-07 10:03 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-02-07 10:03:52 UTC
Type: ---
Embargoed:
ppisar: fedora-review+


Attachments (Terms of Use)

Description Miroslav Suchý 2023-11-25 14:49:16 UTC
Spec URL: https://download.copr.fedorainfracloud.org/results/msuchy/package-review/fedora-rawhide-x86_64/06693674-perl-File-Unpack/perl-File-Unpack.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/msuchy/package-review/fedora-rawhide-x86_64/06693674-perl-File-Unpack/perl-File-Unpack-0.70-1.fc40.src.rpm
Description: File::Unpack is an unpacker for archives and files
(bz2/gz/zip/tar/cpio/iso/rpm/deb/cab/lzma/7z/rar/...).  We call
it strong, because it is not fooled by file suffixes, or multiply wrapped packages.
It reliably detects mime-types and recursivly descends into each archive found
until it finally exposes all unpackable payload contents.
A precise logfile can be written, describing mimetypes and unpack actions.
Most of the known archive file formats are supported. Shell-script-style
plugins can be added to support additinal formats.

Fedora Account System Username: msuchy

Comment 1 Petr Pisar 2023-11-29 13:56:30 UTC
URL and Source0 address are Ok.
Source0 archive (SHA-512: 02e836e7ebaeda75ae29e9b39be73498bfeba8843ca95c37ed33341e7d3f35d1eef348f41fd226260885d1301d2a12aaed1a5c94ba91a7131bda0cf002b3be1d) is original. Ok.

Discovered licences:

contrib/stringsx.c: "MIT or any GPL license"
contrib/stringsx.pl: "MIT or any GPL license"
file_unpack.pl: GPL-1.0-or-later OR Artistic-1.0-Perl
Makefile.PL: GPL-1.0-or-later OR Artistic-1.0-Perl
README: GPL-1.0-or-later OR Artistic-1.0-Perl
t/data/ruhyphal.tex: "There is no copyright associated with this code. Use it as you wish."
t/data/Times-Roman-snippet.afm: "All Rights Reserved.Times is a trademark of Linotype-Hell AG and/or its subsidiaries."
t/data/IPA-snippet.pfa: "Copyright The Omega Project 1996"
t/data/pdftex-a.txt: GFDL-1.2-no-invariants-or-later
Unpack.pm: GPL-1.0-or-later OR Artistic-1.0-Perl

FIX: A (whatever kind of) MIT license requires a copy of the license. I cannot see any.
FIX: A license of t/data/Times-Roman-snippet.afm does not look open source at all.
FIX: t/data/IPA-snippet.pfa is missing a license, probably copied from "Omega, a 16-bit extension of TeX by John Plaice and Yannis Haralambous". The license is unknown.

Please work with upstream on identifying the MIT and Omega license. Also resolve the proprietary t/data/Times-Roman-snippet.afm file.
Alternatively removed these files from the source archive.

I will resume this review once the license issues have been cleared.

Comment 2 Petr Pisar 2023-11-29 13:58:58 UTC
And add t/data/ruhyphal.tex to UltraPermissive.txt or public-domain-text.txt in fedora-license-data.

Comment 3 Miroslav Suchý 2023-11-29 15:59:11 UTC
t/data/* That is tests only and not included in the binary package; therefore, it should not be included in the License field. Per 
https://docs.fedoraproject.org/en-US/legal/license-field/#_basic_policy

Yes, we have the statement at
https://docs.fedoraproject.org/en-US/legal/license-approval/#_overview
I read that proprietary and not-allowed licenses cannot be included in SourceX, but if there is some other code/content with an allowed license and it will not go to the binary package it should not be listed in the License field.

You are correct that t/data/Times-Roman-snippet.afm should be removed. The test suite is broken, so I may remove the whole t/* That will solve the Omega license too.

ad MIT license, I opened https://github.com/jnweiger/perl-File-Unpack/issues/13

Comment 4 Miroslav Suchý 2023-12-02 15:52:09 UTC
The upstream has not been responding to PRs for several years. After a quick discussion with the Suse maintainer using this package for the same purpose as I plan, we decided to fork the project.

Spec URL: https://download.copr.fedorainfracloud.org/results/msuchy/package-review/fedora-rawhide-x86_64/06716996-perl-File-Unpack2/perl-File-Unpack2.spec
SRPM URL: https://copr-be.cloud.fedoraproject.org/results/msuchy/package-review/fedora-rawhide-x86_64/06716996-perl-File-Unpack2/perl-File-Unpack2-0.70-1.fc40.src.rpm

Comment 5 Petr Pisar 2024-01-03 14:45:10 UTC
URL and Source0 addresses are Ok.

Discovered licenses: 

contrib/stringsx.c: MIT OR GPL-1.0-or-later
contrib/stringsx.pl: MIT OR GPL-1.0-or-later
file_unpack2.pl: GPL-1.0-or-later OR Artistic-1.0-Perl
Makefile.PL: GPL-1.0-or-later OR Artistic-1.0-Perl
LICENSES/MIT.txt: MIT
README: GPL-1.0-or-later OR Artistic-1.0-Perl
Unpack2.pm: GPL-1.0-or-later OR Artistic-1.0-Perl

FIX: file-unpack license should be "(MIT OR GPL-1.0-or-later) AND (GPL-1.0-or-later OR Artistic-1.0-Perl)".

TODO: Remove a leading and incorrect "An" article from Summary.
FIX: Replace "File::Unpack" with "File::Unpack2" in the Description text.
TODO: Use uppercase form "Perl" in file-unpack description text. The word refers to a programming language. Not to /usr/bin/perl.

TODO: Use plain "perl" command instead of "%{__perl}" macro.
TODO: Use "%{make_build}" macro instead of "%{__make} %{?_smp_mflags}" line. Also use it instead of "%{__make}" in "%{__make} stringsx" as it handles parallelism.

FIX: Build-require "coreutils" (Makefile.PL:58).

TODO: Append "NO_PACKLIST=1 NO_PERLLOCAL=1" arguments to Makefile.PL invocation, appewnd ">= 6.76" to "BuildRequires:  perl(ExtUtils::MakeMaker)" and replace "%{__make} pure_install PERL_INSTALL_ROOT=%{buildroot} create_packlist=0" line with "%{make_install}" macro and remove the two "find %{buildroot}..." lines. See <https://fedoraproject.org/wiki/Perl/Tips#ExtUtils::MakeMaker> for an example.

FIX: Build-require "perl-podlators" (perl-File-Unpack2.spec:179).

TODO: Do not use top-level globs in %files sections <https://docs.fedoraproject.org/en-US/packaging-guidelines/#_explicit_lists>. You should list direct childs of %{perl_vendorlib}/, %_mandir/man3/, %_mandir/man1/, and %{_bindir}/ explicitly.

FIX: Remove run-time and test-time dependencies from BuildRequires (e.g. "perl(Test::CheckManifest)") because you do not perform any tests.
FIX: The explicit run-time dependency on "perl(File::Unpack) == %version" is wrong. In Fedora we use a dependency on a package name qualified with an exact version and release "%{name}%{?_isa} = %{version}-%{release}".

FIX: Escape per-cent character in spec file comments:
    Macro expanded in comment on line 9: %{commit}/%{name}-%{shortcommit}.tar.gz
    Macro expanded in comment on line 10: %{name}-%{shortcommit}.tar.gz
    Macro expanded in comment on line 11: %{commit}/t
    Macro expanded in comment on line 12: %{name}-%{shortcommit}-repackaged.tar.gz perl-File-Unpack2-%{commit}

TODO: Building /usr/share/man/man1/file-unpack.1.gz fails:

+ cat
+ perl file-unpack.pl --help
Can't open perl script "file-unpack.pl": No such file or directory
+ cat
+ pod2man file-unpack.pod
+ rm file-unpack.pod

As a result the manual page is missing a text with file-unpack options.

$ rpmlint perl-File-Unpack2.spec ../SRPMS/perl-File-Unpack2-0.70-1.fc40.src.rpm ../RPMS/x86_64/perl-File-Unpack2-* ../RPMS/x86_64/file-unpack-*
warning: Macro expanded in comment on line 9: %{commit}/%{name}-%{shortcommit}.tar.gz

warning: Macro expanded in comment on line 10: %{name}-%{shortcommit}.tar.gz

warning: Macro expanded in comment on line 11: %{commit}/t

warning: Macro expanded in comment on line 12: %{name}-%{shortcommit}-repackaged.tar.gz perl-File-Unpack2-%{commit}

warning: Macro expanded in comment on line 9: %{commit}/%{name}-%{shortcommit}.tar.gz

warning: Macro expanded in comment on line 10: %{name}-%{shortcommit}.tar.gz

warning: Macro expanded in comment on line 11: %{commit}/t

warning: Macro expanded in comment on line 12: %{name}-%{shortcommit}-repackaged.tar.gz perl-File-Unpack2-%{commit}

========================================================== rpmlint session starts =========================================================
rpmlint: 2.5.0
configuration:
    /usr/lib/python3.12/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-legacy-licenses.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
checks: 32, packages: 6

file-unpack.x86_64: E: spelling-error ('frontend', '%description -l en_US frontend -> fronted, front end, front-end')
file-unpack.x86_64: E: spelling-error ('perl', '%description -l en_US perl -> Perl, peel, perk')
perl-File-Unpack2.x86_64: E: spelling-error ('unpacker', 'Summary(en_US) unpacker -> unpacked, unpack er, unpack-er')
perl-File-Unpack2.x86_64: E: spelling-error ('unpacker', '%description -l en_US unpacker -> unpacked, unpack er, unpack-er')
perl-File-Unpack2.x86_64: E: spelling-error ('gz', '%description -l en_US gz -> g, z, gs')
perl-File-Unpack2.x86_64: E: spelling-error ('cpio', '%description -l en_US cpio -> CPI')
perl-File-Unpack2.x86_64: E: spelling-error ('iso', '%description -l en_US iso -> ISO, is, so')
perl-File-Unpack2.x86_64: E: spelling-error ('lzma', '%description -l en_US lzma -> lama')
perl-File-Unpack2.x86_64: E: spelling-error ('rar', '%description -l en_US rar -> arr, ear, tar')
perl-File-Unpack2.x86_64: E: spelling-error ('recursivly', '%description -l en_US recursivly -> recursively, recursive, excursively')
perl-File-Unpack2.x86_64: E: spelling-error ('unpackable', '%description -l en_US unpackable -> unpack able, unpack-able, unshockable')
perl-File-Unpack2.x86_64: E: spelling-error ('logfile', '%description -l en_US logfile -> log file, log-file, misfile')
perl-File-Unpack2.x86_64: E: spelling-error ('mimetypes', '%description -l en_US mimetypes -> mime types, mime-types, mistypes')
perl-File-Unpack2.x86_64: E: spelling-error ('additinal', '%description -l en_US additinal -> additional, traditional, attitudinal')
perl-File-Unpack2.src: E: spelling-error ('unpacker', 'Summary(en_US) unpacker -> unpacked, unpack er, unpack-er')
perl-File-Unpack2.src: E: spelling-error ('unpacker', '%description -l en_US unpacker -> unpacked, unpack er, unpack-er')
perl-File-Unpack2.src: E: spelling-error ('gz', '%description -l en_US gz -> g, z, gs')
perl-File-Unpack2.src: E: spelling-error ('cpio', '%description -l en_US cpio -> CPI')
perl-File-Unpack2.src: E: spelling-error ('iso', '%description -l en_US iso -> ISO, is, so')
perl-File-Unpack2.src: E: spelling-error ('lzma', '%description -l en_US lzma -> lama')
perl-File-Unpack2.src: E: spelling-error ('rar', '%description -l en_US rar -> arr, ear, tar')
perl-File-Unpack2.src: E: spelling-error ('recursivly', '%description -l en_US recursivly -> recursively, recursive, excursively')
perl-File-Unpack2.src: E: spelling-error ('unpackable', '%description -l en_US unpackable -> unpack able, unpack-able, unshockable')
perl-File-Unpack2.src: E: spelling-error ('logfile', '%description -l en_US logfile -> log file, log-file, misfile')
perl-File-Unpack2.src: E: spelling-error ('mimetypes', '%description -l en_US mimetypes -> mime types, mime-types, mistypes')
perl-File-Unpack2.src: E: spelling-error ('additinal', '%description -l en_US additinal -> additional, traditional, attitudinal')
file-unpack.x86_64: W: no-manual-page-for-binary file-unpack-deep
file-unpack.x86_64: W: no-manual-page-for-binary file_unpack
file-unpack.x86_64: W: no-manual-page-for-binary stringsx
file-unpack.x86_64: W: no-manual-page-for-binary unpack-deep
file-unpack.x86_64: W: no-manual-page-for-binary unpack-file
file-unpack.x86_64: W: no-manual-page-for-binary unpack-file-deep
perl-File-Unpack2.x86_64: E: no-binary
perl-File-Unpack2.spec: W: more-than-one-%changelog-section
perl-File-Unpack2.spec:189: W: make-check-outside-check-section rm contrib/stringsx # so that the Manifest in make check is not confused.
perl-File-Unpack2.spec:189: W: make-check-outside-check-section rm contrib/stringsx # so that the Manifest in make check is not confused.
perl-File-Unpack2.spec:9: W: macro-in-comment %{commit}
perl-File-Unpack2.spec:9: W: macro-in-comment %{name}
perl-File-Unpack2.spec:9: W: macro-in-comment %{shortcommit}
perl-File-Unpack2.spec:10: W: macro-in-comment %{name}
perl-File-Unpack2.spec:10: W: macro-in-comment %{shortcommit}
perl-File-Unpack2.spec:11: W: macro-in-comment %{commit}
perl-File-Unpack2.spec:12: W: macro-in-comment %{name}
perl-File-Unpack2.spec:12: W: macro-in-comment %{shortcommit}
perl-File-Unpack2.spec:12: W: macro-in-comment %{commit}
perl-File-Unpack2.spec:201: W: macro-in-comment %{__make}
perl-File-Unpack2.spec:9: W: macro-in-comment %{commit}
perl-File-Unpack2.spec:9: W: macro-in-comment %{name}
perl-File-Unpack2.spec:9: W: macro-in-comment %{shortcommit}
perl-File-Unpack2.spec:10: W: macro-in-comment %{name}
perl-File-Unpack2.spec:10: W: macro-in-comment %{shortcommit}
perl-File-Unpack2.spec:11: W: macro-in-comment %{commit}
perl-File-Unpack2.spec:12: W: macro-in-comment %{name}
perl-File-Unpack2.spec:12: W: macro-in-comment %{shortcommit}
perl-File-Unpack2.spec:12: W: macro-in-comment %{commit}
perl-File-Unpack2.spec:201: W: macro-in-comment %{__make}
perl-File-Unpack2.spec:1: W: macro-in-%changelog %global
perl-File-Unpack2.spec:2: W: macro-in-%changelog %global
perl-File-Unpack2.spec:2: W: macro-in-%changelog %{commit}
perl-File-Unpack2.spec:6: W: macro-in-%changelog %autorelease
perl-File-Unpack2.spec:9: W: macro-in-%changelog %{commit}
perl-File-Unpack2.spec:9: W: macro-in-%changelog %{name}
perl-File-Unpack2.spec:9: W: macro-in-%changelog %{shortcommit}
perl-File-Unpack2.spec:10: W: macro-in-%changelog %{name}
perl-File-Unpack2.spec:10: W: macro-in-%changelog %{shortcommit}
perl-File-Unpack2.spec:11: W: macro-in-%changelog %{commit}
perl-File-Unpack2.spec:12: W: macro-in-%changelog %{name}
perl-File-Unpack2.spec:12: W: macro-in-%changelog %{shortcommit}
perl-File-Unpack2.spec:12: W: macro-in-%changelog %{commit}
perl-File-Unpack2.spec:13: W: macro-in-%changelog %{name}
perl-File-Unpack2.spec:13: W: macro-in-%changelog %{shortcommit}
perl-File-Unpack2.spec:113: W: macro-in-%changelog %version
perl-File-Unpack2.spec: W: invalid-url Source0: perl-File-Unpack2-4bcdc19-repackaged.tar.gz
perl-File-Unpack2.spec: W: invalid-url Source0: perl-File-Unpack2-4bcdc19-repackaged.tar.gz
perl-File-Unpack2.x86_64: E: description-line-too-long it strong, because it is not fooled by file suffixes, or multiply wrapped packages.
perl-File-Unpack2.src: E: description-line-too-long it strong, because it is not fooled by file suffixes, or multiply wrapped packages.
file-unpack.x86_64: W: dangling-relative-symlink /usr/bin/file-unpack-deep file-unpack
file-unpack.x86_64: W: dangling-relative-symlink /usr/bin/file_unpack file-unpack
file-unpack.x86_64: W: dangling-relative-symlink /usr/bin/unpack-deep file-unpack
file-unpack.x86_64: W: dangling-relative-symlink /usr/bin/unpack-file file-unpack
file-unpack.x86_64: W: dangling-relative-symlink /usr/bin/unpack-file-deep file-unpack
=================== 5 packages and 1 specfiles checked; 29 errors, 52 warnings, 15 filtered, 29 badness; has taken 0.7 s ==================
rpmlint is very unhappy.
FIX: Fix the typos, %-escapes, overlong descriptions.

$ rpm -q -lv -p ../RPMS/x86_64/perl-File-Unpack2-0.70-1.fc40.x86_64.rpm 
drwxr-xr-x    2 root     root                        0 Jan  3 01:00 /usr/share/File-Unpack
drwxr-xr-x    2 root     root                        0 Jan  3 01:00 /usr/share/File-Unpack/helper
-rwxr-xr-x    1 root     root                      273 Jan  3 01:00 /usr/share/File-Unpack/helper/application=msword
-rwxr-xr-x    1 root     root                     1288 Jan  3 01:00 /usr/share/File-Unpack/helper/application=x-iso9660-image
-rwxr-xr-x    2 root     root                     8461 Jan  3 01:00 /usr/share/File-Unpack/helper/application=x-shellscript
-rwxr-xr-x    2 root     root                     8461 Jan  3 01:00 /usr/share/File-Unpack/helper/text=x-shellscript
drwxr-xr-x    2 root     root                        0 Jan  3 01:00 /usr/share/doc/perl-File-Unpack2
-rw-r--r--    1 root     root                    14612 Dec  2 14:01 /usr/share/doc/perl-File-Unpack2/Changes
-rw-r--r--    1 root     root                     3158 Dec  2 14:01 /usr/share/doc/perl-File-Unpack2/README
-rw-r--r--    1 root     root                    11103 Jan  3 01:00 /usr/share/man/man3/File::Unpack2.3pm.gz
drwxr-xr-x    2 root     root                        0 Jan  3 01:00 /usr/share/perl5/vendor_perl/File
-rw-r--r--    1 root     root                    93834 Dec  2 14:01 /usr/share/perl5/vendor_perl/File/Unpack2.pm
-rwxr-xr-x    1 root     root                     2434 Dec  2 14:01 /usr/share/perl5/vendor_perl/File/children_fuser2.pl
-rwxr-xr-x    1 root     root                     7911 Dec  2 14:01 /usr/share/perl5/vendor_perl/File/file_unpack2.pl
$ rpm -q -lv -p ../RPMS/x86_64/file-unpack-0.70-1.fc40.x86_64.rpm 
lrwxrwxrwx    1 root     root                       11 Jan  3 01:00 /usr/bin/file-unpack-deep -> file-unpack
lrwxrwxrwx    1 root     root                       11 Jan  3 01:00 /usr/bin/file_unpack -> file-unpack
-rwxr-xr-x    1 root     root                     7911 Jan  3 01:00 /usr/bin/file_unpack2
-rwxr-xr-x    1 root     root                    15984 Jan  3 01:00 /usr/bin/stringsx
lrwxrwxrwx    1 root     root                       11 Jan  3 01:00 /usr/bin/unpack-deep -> file-unpack
lrwxrwxrwx    1 root     root                       11 Jan  3 01:00 /usr/bin/unpack-file -> file-unpack
lrwxrwxrwx    1 root     root                       11 Jan  3 01:00 /usr/bin/unpack-file-deep -> file-unpack
drwxr-xr-x    2 root     root                        0 Jan  3 01:00 /usr/lib/.build-id
drwxr-xr-x    2 root     root                        0 Jan  3 01:00 /usr/lib/.build-id/88
lrwxrwxrwx    1 root     root                       28 Jan  3 01:00 /usr/lib/.build-id/88/8739ec2f40e60d4b16e08aa2beea4771f67493 -> ../../../../usr/bin/stringsx
drwxr-xr-x    2 root     root                        0 Jan  3 01:00 /usr/share/licenses/file-unpack
-rw-r--r--    1 root     root                     1104 Dec  2 14:01 /usr/share/licenses/file-unpack/MIT.txt
-rw-r--r--    1 root     root                      884 Jan  3 01:00 /usr/share/man/man1/file-unpack.1.gz
-rw-r--r--    1 root     root                     1495 Jan  3 01:00 /usr/share/man/man1/file_unpack2.1.gz
lrwxrwxrwx    1 root     root                       16 Jan  3 01:00 /usr/share/man/man1/unpack_file.1.gz -> file-unpack.1.gz
File layout and permissions are Ok.
FIX: /usr/bin/file_unpack and /usr/bin/file-unpack-deep are dangling symlinks. They point to a nonexisting file-unpack. Did you mean /usr/bin/file_unpack2?
TODO: /usr/share/perl5/vendor_perl/File/children_fuser2.pl and /usr/share/perl5/vendor_perl/File/file_unpack2.pl should not be packaged. Those are mistakes in the installation script. Moreover, /usr/share/perl5/vendor_perl/File/file_unpack2.pl is identical to /usr/bin/file_unpack2.

$ rpm -q --requires -p ../RPMS/x86_64/perl-File-Unpack2-0.70-1.fc40.x86_64.rpm | sort -f | uniq -c 
      1 /usr/bin/perl
      1 /usr/bin/sh
      1 binutils
      1 bzip2
      1 cabextract
      1 cpio
      1 file >= 5.03
      1 genisoimage
      1 gzip
      1 lzip
      1 p7zip
      1 perl(BSD::Resource)
      2 perl(Carp)
      1 perl(Compress::Raw::Bzip2)
      1 perl(Compress::Raw::Lzma)
      1 perl(Compress::Raw::Zlib)
      1 perl(Compress::Raw::Zlib) >= 2.024
      1 perl(Config)
      2 perl(Cwd)
      1 perl(Data::Dumper)
      1 perl(File::Compare)
      1 perl(File::Copy)
      1 perl(File::LibMagic)
      1 perl(File::MimeInfo::Magic)
      2 perl(File::Path)
      2 perl(File::Temp)
      1 perl(File::Unpack2)
      1 perl(Filesys::Statvfs)
      1 perl(FindBin)
      1 perl(Getopt::Long)
      2 perl(IPC::Run)
      2 perl(JSON)
      1 perl(lib)
      1 perl(Pod::Usage)
      1 perl(POSIX)
      1 perl(strict)
      1 perl(String::ShellQuote)
      2 perl(Text::Sprintf::Named)
      1 perl(warnings)
      1 perl-libs
      1 perl-String-ShellQuote
      1 poppler-utils
      1 rpm
      1 rpmlib(CompressedFileNames) <= 3.0.4-1
      1 rpmlib(FileDigests) <= 4.6.0-1
      1 rpmlib(PartialHardlinkSets) <= 4.0.4-1
      1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
      1 rpmlib(PayloadIsZstd) <= 5.4.18-1
      1 shared-mime-info >= 0.60
      1 sharutils
      1 tar
      1 unzip
      1 xz
FIX: Are you sure "binutils" belongs to binary requires?
FIX: Depend on "p7zip-plugins" instead of p7zip (Unpack2.pm:152).
FIX: Remove Recommends on "poppler-tools". That package does not exist in Fedora. Did you mean "poppler-utils" (Unpack2.pm:165)?
FIX: Remove Recommends on "xar". It's not used anywhere.
FIX: Remove duplicate or suboptimal dependencies: perl(Carp), perl(Compress::Raw::Zlib), perl(Cwd), perl(File::Path), perl(File::Temp), perl(IPC::Run), perl(JSON), perl(Text::Sprintf::Named), perl-String-ShellQuote.

$ rpm -q --requires -p ../RPMS/x86_64/file-unpack-0.70-1.fc40.x86_64.rpm | sort -f | uniq -c 
      1 /usr/bin/perl
      1 libc.so.6()(64bit)
      1 libc.so.6(GLIBC_2.2.5)(64bit)
      1 libc.so.6(GLIBC_2.3.4)(64bit)
      1 libc.so.6(GLIBC_2.34)(64bit)
      1 libc.so.6(GLIBC_2.4)(64bit)
      1 libc.so.6(GLIBC_ABI_DT_RELR)(64bit)
      1 perl(Data::Dumper)
      1 perl(File::Unpack) = 0.70
      1 perl(File::Unpack2)
      1 perl(FindBin)
      1 perl(Getopt::Long)
      1 perl(lib)
      1 perl(Pod::Usage)
      1 rpmlib(CompressedFileNames) <= 3.0.4-1
      1 rpmlib(FileDigests) <= 4.6.0-1
      1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
      1 rpmlib(PayloadIsZstd) <= 5.4.18-1
      1 rtld(GNU_HASH)
FIX: Replace explicit "perl(File::Unpack) == %version" dependency with %{name}%{?_isa} = %{version}-%{release}".

$ rpm -q --provides -p ../RPMS/x86_64/perl-File-Unpack2-0.70-1.fc40.x86_64.rpm | sort -f | uniq -c 
      1 perl(File::Unpack2) = 1.0
      1 perl-File-Unpack2 = 0.70-1.fc40
      1 perl-File-Unpack2(x86-64) = 0.70-1.fc40
$ rpm -q --provides -p ../RPMS/x86_64/file-unpack-0.70-1.fc40.x86_64.rpm | sort -f | uniq -c 
      1 file-unpack = 0.70-1.fc40
      1 file-unpack(x86-64) = 0.70-1.fc40
Binary provides are Ok.

$ resolvedeps rawhide ../RPMS/x86_64/perl-File-Unpack2-0.70-1.fc40.x86_64.rpm ../RPMS/x86_64/file-unpack-0.70-1.fc40.x86_64.rpm 
Unresolved dependency: perl(File::Unpack) = 0.70
Unresolved dependency: poppler-tools

The package builds in Fedora Rawhide (https://koji.fedoraproject.org/koji/taskinfo?taskID=111242493). Ok.

Otherwise, the package seems to be in line with Fedora and Perl packaging guidelines.
Please correct all FIX items, consider fixing TODO items, and provide an updated spec file.

Comment 6 Miroslav Suchý 2024-01-03 16:02:16 UTC
> TODO: Use uppercase form "Perl" in file-unpack description text. The word refers to a programming language. Not to /usr/bin/perl.

Submitted to upstream https://github.com/openSUSE/perl-File-Unpack2/pull/2

> appewnd ">= 6.76" to "BuildRequires:  perl(ExtUtils::MakeMaker)"

Why? Fedora 39 has 7.70. I have no intention to put it in older Fedoras or EPEL. From https://docs.fedoraproject.org/en-US/packaging-guidelines/#_explicit_requires :
 
"For instance in the example above, when no current Fedora release shipped with libfubar < 1.2.3-7, it is no longer necessary to list the explicit, versioned requirement."

I will resolve all other comments. And big thanks for the review and corrections.

Comment 7 Petr Pisar 2024-01-03 18:36:33 UTC
(In reply to Miroslav Suchý from comment #6)
> > appewnd ">= 6.76" to "BuildRequires:  perl(ExtUtils::MakeMaker)"
> 
> Why? Fedora 39 has 7.70. I have no intention to put it in older Fedoras or
> EPEL.

For the very exact reason when you wanted to put the package into older distributions. If you don't need to support older distributions that don't add the minimal version. Older ExtUtils::MakeMaker versions do not support "NO_PACKLIST=1" and "NO_PERLLOCAL=1" arguments.

Comment 9 Petr Pisar 2024-01-30 13:58:51 UTC
TODO: I think that many BuildRrequires are not needed, because no packaged code is executed at build time (e.g. perl(File::Compare)), but do as you like.

$ rpmlint perl-File-Unpack2.spec ../SRPMS/perl-File-Unpack2-1.0-1.fc40.src.rpm ../RPMS/x86_64/perl-File-Unpack2-1.0-1.fc40.x86_64.rpm ../RPMS/x86_64/file-unpack-1.0-1.fc40.x86_64.rpm
======================================== rpmlint session starts =======================================
rpmlint: 2.5.0
configuration:
    /usr/lib/python3.12/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-legacy-licenses.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
checks: 32, packages: 4

file-unpack.x86_64: E: spelling-error ('frontend', '%description -l en_US frontend -> fronted, front end, front-end')
file-unpack.x86_64: E: spelling-error ('perl', '%description -l en_US perl -> Perl, peel, perk')
perl-File-Unpack2.x86_64: E: spelling-error ('unpacker', 'Summary(en_US) unpacker -> unpacked, unpack er, unpack-er')
perl-File-Unpack2.x86_64: E: spelling-error ('unpacker', '%description -l en_US unpacker -> unpacked, unpack er, unpack-er')
perl-File-Unpack2.x86_64: E: spelling-error ('gz', '%description -l en_US gz -> g, z, gs')
perl-File-Unpack2.x86_64: E: spelling-error ('cpio', '%description -l en_US cpio -> CPI')
perl-File-Unpack2.x86_64: E: spelling-error ('iso', '%description -l en_US iso -> ISO, is, so')
perl-File-Unpack2.x86_64: E: spelling-error ('lzma', '%description -l en_US lzma -> lama')
perl-File-Unpack2.x86_64: E: spelling-error ('rar', '%description -l en_US rar -> arr, ear, tar')
perl-File-Unpack2.x86_64: E: spelling-error ('unpackable', '%description -l en_US unpackable -> unpack able, unpack-able, unshockable')
perl-File-Unpack2.src: E: spelling-error ('unpacker', 'Summary(en_US) unpacker -> unpacked, unpack er, unpack-er')
perl-File-Unpack2.src: E: spelling-error ('unpacker', '%description -l en_US unpacker -> unpacked, unpack er, unpack-er')
perl-File-Unpack2.src: E: spelling-error ('gz', '%description -l en_US gz -> g, z, gs')
perl-File-Unpack2.src: E: spelling-error ('cpio', '%description -l en_US cpio -> CPI')
perl-File-Unpack2.src: E: spelling-error ('iso', '%description -l en_US iso -> ISO, is, so')
perl-File-Unpack2.src: E: spelling-error ('lzma', '%description -l en_US lzma -> lama')
perl-File-Unpack2.src: E: spelling-error ('rar', '%description -l en_US rar -> arr, ear, tar')
perl-File-Unpack2.src: E: spelling-error ('unpackable', '%description -l en_US unpackable -> unpack able, unpack-able, unshockable')
file-unpack.x86_64: W: no-manual-page-for-binary file-unpack-deep
file-unpack.x86_64: W: no-manual-page-for-binary file_unpack
file-unpack.x86_64: W: no-manual-page-for-binary stringsx
file-unpack.x86_64: W: no-manual-page-for-binary unpack-deep
file-unpack.x86_64: W: no-manual-page-for-binary unpack-file
file-unpack.x86_64: W: no-manual-page-for-binary unpack-file-deep
perl-File-Unpack2.x86_64: E: no-binary
perl-File-Unpack2.spec:188: W: make-check-outside-check-section rm contrib/stringsx # so that the Manifest in make check is not confused.
perl-File-Unpack2.spec:188: W: make-check-outside-check-section rm contrib/stringsx # so that the Manifest in make check is not confused.
perl-File-Unpack2.spec:195: W: macro-in-comment %{__make}
perl-File-Unpack2.spec:195: W: macro-in-comment %{__make}
perl-File-Unpack2.spec: W: invalid-url Source0: perl-File-Unpack2-4bcdc19-repackaged.tar.gz
perl-File-Unpack2.spec: W: invalid-url Source0: perl-File-Unpack2-4bcdc19-repackaged.tar.gz
file-unpack.x86_64: W: dangling-relative-symlink /usr/bin/file-unpack-deep file-unpack2
file-unpack.x86_64: W: dangling-relative-symlink /usr/bin/file_unpack file-unpack2
file-unpack.x86_64: W: dangling-relative-symlink /usr/bin/unpack-deep file-unpack2
file-unpack.x86_64: W: dangling-relative-symlink /usr/bin/unpack-file file-unpack2
file-unpack.x86_64: W: dangling-relative-symlink /usr/bin/unpack-file-deep file-unpack2
file-unpack.x86_64: W: dangling-relative-symlink /usr/share/man/man1/unpack_file2.1.gz file-unpack.1.gz
= 3 packages and 1 specfiles checked; 19 errors, 18 warnings, 9 filtered, 19 badness; has taken 0.5 s =

TODO: Escape a percent character in a comment in %check section (perl-File-Unpack2.spec:195).

$ rpm -q --requires -p  ../RPMS/x86_64/perl-File-Unpack2-1.0-1.fc40.x86_64.rpm | sort -f | uniq -c
      1 /usr/bin/perl
      1 /usr/bin/sh
      1 binutils
      1 bzip2
      1 cabextract
      1 cpio
      1 file >= 5.03
      1 genisoimage
      1 gzip
      1 lzip
      1 p7zip-plugins
      1 perl(BSD::Resource)
      1 perl(Carp)
      1 perl(Compress::Raw::Bzip2)
      1 perl(Compress::Raw::Lzma)
      1 perl(Compress::Raw::Zlib) >= 2.024
      1 perl(Config)
      1 perl(Cwd)
      1 perl(Data::Dumper)
      1 perl(File::Compare)
      1 perl(File::Copy)
      1 perl(File::LibMagic)
      1 perl(File::MimeInfo::Magic)
      1 perl(File::Path)
      1 perl(File::Temp)
      1 perl(File::Unpack2)
      1 perl(Filesys::Statvfs)
      1 perl(FindBin)
      1 perl(Getopt::Long)
      1 perl(IPC::Run)
      1 perl(JSON)
      1 perl(lib)
      1 perl(Pod::Usage)
      1 perl(POSIX)
      1 perl(strict)
      1 perl(String::ShellQuote)
      1 perl(Text::Sprintf::Named)
      1 perl(warnings)
      1 perl-libs
      1 poppler-utils
      1 rpm
      1 rpmlib(CompressedFileNames) <= 3.0.4-1
      1 rpmlib(FileDigests) <= 4.6.0-1
      1 rpmlib(PartialHardlinkSets) <= 4.0.4-1
      1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
      1 rpmlib(PayloadIsZstd) <= 5.4.18-1
      1 shared-mime-info >= 0.60
      1 sharutils
      1 tar
      1 unzip
      1 xz
$ rpm -q --requires -p  ../RPMS/x86_64/file-unpack-1.0-1.fc40.x86_64.rpm | sort -f | uniq -c
      1 /usr/bin/perl
      1 libc.so.6()(64bit)
      1 libc.so.6(GLIBC_2.2.5)(64bit)
      1 libc.so.6(GLIBC_2.3.4)(64bit)
      1 libc.so.6(GLIBC_2.34)(64bit)
      1 libc.so.6(GLIBC_2.4)(64bit)
      1 libc.so.6(GLIBC_ABI_DT_RELR)(64bit)
      1 perl(Data::Dumper)
      1 perl(File::Unpack2)
      1 perl(FindBin)
      1 perl(Getopt::Long)
      1 perl(lib)
      1 perl(Pod::Usage)
      1 perl-File-Unpack2(x86-64) = 1.0-1.fc40
      1 rpmlib(CompressedFileNames) <= 3.0.4-1
      1 rpmlib(FileDigests) <= 4.6.0-1
      1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
      1 rpmlib(PayloadIsZstd) <= 5.4.18-1
      1 rtld(GNU_HASH)
Binary requires are Ok.

$ resolvedeps rawhide ../RPMS/x86_64/perl-File-Unpack2-1.0-1.fc40.x86_64.rpm ../RPMS/x86_64/file-unpack-1.0-1.fc40.x86_64.rpm 
Binary dependencies are resolvable. Ok.

The package builds in Fedora 40 (https://koji.fedoraproject.org/koji/taskinfo?taskID=112610071). Ok.

Please consider fixing the TODO items before building this package.
Package APPROVED.

Comment 10 Fedora Admin user for bugzilla script actions 2024-02-07 09:47:09 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/perl-File-Unpack2

Comment 11 Miroslav Suchý 2024-02-07 10:03:52 UTC
@ppisar thank you for the review.

rawhide build https://koji.fedoraproject.org/koji/taskinfo?taskID=113100264


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