Bug 2294337

Summary: Review Request: clean-rpm-gpg-pubkey - Remove old PGP keys from the RPM database
Product: [Fedora] Fedora Reporter: Peter Oliver <mavit>
Component: Package ReviewAssignee: Petr Pisar <ppisar>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: mrsam, package-review, ppisar, sergio
Target Milestone: ---Flags: ppisar: 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: 2024-06-27 14:41:26 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 Peter Oliver 2024-06-25 21:29:09 UTC
Spec URL: https://mavit.fedorapeople.org/rpm/clean-rpm-gpg-pubkey.spec
SRPM URL: https://mavit.fedorapeople.org/rpm/clean-rpm-gpg-pubkey-0-1.20210505gitebb9ab1.fc40.src.rpm
Description: Remove old PGP keys from the RPM database
Fedora Account System Username: mavit

Comment 1 Fedora Review Service 2024-06-25 21:34:40 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/7667922
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2294337-clean-rpm-gpg-pubkey/fedora-rawhide-x86_64/07667922-clean-rpm-gpg-pubkey/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 Petr Pisar 2024-06-26 10:10:38 UTC
By the way there is a similar plugin for DNF under development <https://github.com/rpm-software-management/dnf-plugins-core/pull/533>.

Comment 3 Sergio Basto 2024-06-26 10:57:52 UTC
BTW my solution was https://discussion.fedoraproject.org/t/header-v3-rsa-sha1-signature-key-id-d651ff2e-bad/42350/4

do we really need a package to run one script ? , can't the script be add to rpm package for example .

Thank you

Comment 4 Petr Pisar 2024-06-26 11:15:21 UTC
URL and Source addresses are OK.
Source archive (SHA-512 f5973480a383b23d45a469df3b438ee2d66ab27096ef2f616205502a717991adf79c278ecf38acff1036ff83b76485b66488d2284a05cc0ef9a1484984bf3d5e) is original. Ok.
Summary is Ok.
Description is Ok.
License verified from COPYING. Ok.
No XS code, noarch BuildArch is Ok.

FIX: Do not build-require 'perl'. It's not used at build-time.
FIX: Package COPYING file with %license macro. That's the only file which declares the license.

$ rpmlint clean-rpm-gpg-pubkey.spec ../SRPMS/clean-rpm-gpg-pubkey-0-1.20210505gitebb9ab1.fc41.src.rpm ../RPMS/noarch/clean-rpm-gpg-pubkey-0-1.20210505gitebb9ab1.fc41.noarch.rpm 
======================================== rpmlint session starts =======================================
rpmlint: 2.5.0
configuration:
    /usr/lib/python3.13/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: 3

clean-rpm-gpg-pubkey.noarch: W: no-manual-page-for-binary clean-rpm-gpg-pubkey
clean-rpm-gpg-pubkey.spec: W: no-%build-section
clean-rpm-gpg-pubkey.spec: W: no-%build-section
clean-rpm-gpg-pubkey.spec:10: W: mixed-use-of-spaces-and-tabs (spaces: line 2, tab: line 10)
clean-rpm-gpg-pubkey.spec:10: W: mixed-use-of-spaces-and-tabs (spaces: line 2, tab: line 10)
=== 2 packages and 1 specfiles checked; 0 errors, 5 warnings, 6 filtered, 0 badness; has taken 0.3 s ==

FIX: Normalize white spaces in the spec file.

$ rpm -q -lv -p ../RPMS/noarch/clean-rpm-gpg-pubkey-0-1.20210505gitebb9ab1.fc41.noarch.rpm 
-rwxr-xr-x    1 root     root                     2952 Jun 26 02:00 /usr/bin/clean-rpm-gpg-pubkey
drwxr-xr-x    2 root     root                        0 Jun 26 02:00 /usr/share/doc/clean-rpm-gpg-pubkey
-rw-r--r--    1 root     root                      812 May  5  2021 /usr/share/doc/clean-rpm-gpg-pubkey/README.md
drwxr-xr-x    2 root     root                        0 Jun 26 02:00 /usr/share/licenses/clean-rpm-gpg-pubkey
-rw-r--r--    1 root     root                    35147 May  5  2021 /usr/share/licenses/clean-rpm-gpg-pubkey/COPYING.GPL
File layout and permissions are Ok.

$ rpm -q --requires -p ../RPMS/noarch/clean-rpm-gpg-pubkey-0-1.20210505gitebb9ab1.fc41.noarch.rpm | sort -f | uniq -c
      1 /usr/bin/curl
      1 /usr/bin/gpg2
      1 /usr/bin/perl
      1 /usr/bin/rpm
      1 fedora-repos
      1 perl(File::Temp)
      1 perl(Getopt::Long)
      1 perl(IO::File)
      1 perl(POSIX)
      1 perl(strict)
      1 perl(warnings)
      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
FIX: Run-require "fedora-release-common" (clean-rpm-gpg-pubkey:33).

$ rpm -q --provides -p ../RPMS/noarch/clean-rpm-gpg-pubkey-0-1.20210505gitebb9ab1.fc41.noarch.rpm | sort -f | uniq -c
      1 clean-rpm-gpg-pubkey = 0-1.20210505gitebb9ab1.fc41
Binary provides are Ok.

$ resolvedeps rawhide ../RPMS/noarch/clean-rpm-gpg-pubkey-0-1.20210505gitebb9ab1.fc41.noarch.rpm 
Binary dependencies are resolvable. Ok.

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

Otherwise, the package is in-line with Fedora and Perl packaging guidelines.

Please correct the FIX items and provide an updated spec file.

Comment 5 Peter Oliver 2024-06-26 16:07:07 UTC
(In reply to Petr Pisar from comment #4)

> Please correct the FIX items and provide an updated spec file.

Done.  Updated spec and SRPM at the same URL.  Thanks for the review.

Comment 6 Peter Oliver 2024-06-26 16:17:01 UTC
(In reply to Sergio Basto from comment #3)

> do we really need a package to run one script ? , can't the script be add to
> rpm package for example .

It's Fedora-specific, so it'd belong somewhere like Miroslav Suchý's remove-retired-packages, perhaps.  However, https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/HUGAGDMJ2F7VQX6XVUI7JH3JFV7IW5BW/

Comment 7 Petr Pisar 2024-06-27 09:08:46 UTC
Spec file changes:

$ diff -u clean-rpm-gpg-pubkey.spec{.old,}
--- clean-rpm-gpg-pubkey.spec.old       2024-06-25 23:19:48.000000000 +0200
+++ clean-rpm-gpg-pubkey.spec   2024-06-26 18:05:46.000000000 +0200
@@ -7,16 +7,16 @@
 Version:        0
 Release:        %{autorelease}
 Summary:        Remove old PGP keys from the RPM database
-License:               GPL-3.0-only
+License:        GPL-3.0-only
 URL:            %{forgeurl}
 Source:         %{forgesource}
 
 BuildArch:      noarch
-BuildRequires:  perl
 BuildRequires:  perl-generators
 Requires:       /usr/bin/curl
 Requires:       /usr/bin/gpg2
 Requires:       /usr/bin/rpm
+Requires:       fedora-release-common
 Requires:       fedora-repos
 
 %{?perl_default_filter}
@@ -39,6 +39,7 @@
 
 %files
 %doc README.md
+%license COPYING
 %license COPYING.GPL
 %{_bindir}/%{name}



$ rpmlint clean-rpm-gpg-pubkey.spec ../SRPMS/clean-rpm-gpg-pubkey-0-1.20210505gitebb9ab1.fc41.src.rpm ../RPMS/noarch/clean-rpm-gpg-pubkey-0-1.20210505gitebb9ab1.fc41.noarch.rpm 
======================================== rpmlint session starts =======================================
rpmlint: 2.5.0
configuration:
    /usr/lib/python3.13/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: 3

clean-rpm-gpg-pubkey.noarch: W: no-manual-page-for-binary clean-rpm-gpg-pubkey
clean-rpm-gpg-pubkey.spec: W: no-%build-section
clean-rpm-gpg-pubkey.spec: W: no-%build-section
=== 2 packages and 1 specfiles checked; 0 errors, 3 warnings, 6 filtered, 0 badness; has taken 0.3 s ==
rpmlint is Ok.

$ rpm -q -lv -p ../RPMS/noarch/clean-rpm-gpg-pubkey-0-1.20210505gitebb9ab1.fc41.noarch.rpm 
-rwxr-xr-x    1 root     root                     2952 Jun 27 02:00 /usr/bin/clean-rpm-gpg-pubkey
drwxr-xr-x    2 root     root                        0 Jun 27 02:00 /usr/share/doc/clean-rpm-gpg-pubkey
-rw-r--r--    1 root     root                      812 May  5  2021 /usr/share/doc/clean-rpm-gpg-pubkey/README.md
drwxr-xr-x    2 root     root                        0 Jun 27 02:00 /usr/share/licenses/clean-rpm-gpg-pubkey
-rw-r--r--    1 root     root                       70 May  5  2021 /usr/share/licenses/clean-rpm-gpg-pubkey/COPYING
-rw-r--r--    1 root     root                    35147 May  5  2021 /usr/share/licenses/clean-rpm-gpg-pubkey/COPYING.GPL
File layout and permissions is Ok.

$ rpm -q --requires -p ../RPMS/noarch/clean-rpm-gpg-pubkey-0-1.20210505gitebb9ab1.fc41.noarch.rpm | sort -f | uniq -c
      1 /usr/bin/curl
      1 /usr/bin/gpg2
      1 /usr/bin/perl
      1 /usr/bin/rpm
      1 fedora-release-common
      1 fedora-repos
      1 perl(File::Temp)
      1 perl(Getopt::Long)
      1 perl(IO::File)
      1 perl(POSIX)
      1 perl(strict)
      1 perl(warnings)
      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
Binary requires are Ok.

$ resolvedeps rawhide ../RPMS/noarch/clean-rpm-gpg-pubkey-0-1.20210505gitebb9ab1.fc41.noarch.rpm 
Binary dependencies are resolvable. Ok.

The package build in Fedora 41 (https://koji.fedoraproject.org/koji/taskinfo?taskID=119683282).

The package is in-line with Fedora packaging guidelines.
Resolution: Package APPROVED.

Comment 8 Fedora Admin user for bugzilla script actions 2024-06-27 14:26:15 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/clean-rpm-gpg-pubkey

Comment 9 Fedora Update System 2024-06-27 14:37:53 UTC
FEDORA-2024-8f1ff5de6d (clean-rpm-gpg-pubkey-0-1.20210505gitebb9ab1.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-8f1ff5de6d

Comment 10 Fedora Update System 2024-06-27 14:41:26 UTC
FEDORA-2024-8f1ff5de6d (clean-rpm-gpg-pubkey-0-1.20210505gitebb9ab1.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 11 Fedora Update System 2024-06-27 14:44:22 UTC
FEDORA-2024-d74995274a (clean-rpm-gpg-pubkey-0-1.20210505gitebb9ab1.fc40) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-d74995274a

Comment 12 Fedora Update System 2024-06-27 14:52:12 UTC
FEDORA-2024-e2d6620120 (clean-rpm-gpg-pubkey-0-1.20210505gitebb9ab1.fc39) has been submitted as an update to Fedora 39.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-e2d6620120

Comment 13 Fedora Update System 2024-06-28 01:24:59 UTC
FEDORA-2024-e2d6620120 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-2024-e2d6620120 \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-e2d6620120

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

Comment 14 Fedora Update System 2024-06-28 01:40:15 UTC
FEDORA-2024-d74995274a has been pushed to the Fedora 40 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-d74995274a \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-d74995274a

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

Comment 15 Fedora Update System 2024-07-06 07:08:03 UTC
FEDORA-2024-d74995274a (clean-rpm-gpg-pubkey-0-1.20210505gitebb9ab1.fc40) has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 16 Fedora Update System 2024-07-06 07:43:53 UTC
FEDORA-2024-e2d6620120 (clean-rpm-gpg-pubkey-0-1.20210505gitebb9ab1.fc39) has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.