Some Perl packages enumerate files in build directory as part of self tests. Examples are perl-Crypt-SMIME (bug #2059502), perl-Test-DistManifest (bug #2059504). After deploying package notes into rpm-build (package-notes-srpm-macros-0.4-14.fc36.noarch), a .package_note-*.ld file is kept there and that breaks the tests. Example: # Failed test 'No extra files that aren't in MANIFEST' # at t/manifest.t line 29. # Not in MANIFEST: .package_note-perl-Crypt-SMIME-0.28-2.fc37.x86_64.ld # Looks like you failed 1 test of 1. Would it be possible to remove that file before starting %check section automatically?
Some other packages similarly affected: * perl-MouseX-SimpleConfig * perl-Scalar-Properties * perl-Software-License-CCpack * perl-Test-Assert * perl-Test-Mojibake * perl-Test-Signature * perl-Test-Synopsis These packages all have existing workarounds to handle files left around from debuginfo generation. In the majority of cases these are pure-perl packages that contain no ELF objects and hence generate no debuginfo or package notes anyway; if the generation of these files could be suppressed for noarch packages, it would go a long way to avoiding the need for such workarounds.
> Would it be possible to remove that file before starting %check section automatically? So… it was added to %check as a work-around for other issues, see #2043977. We could try to change the flags for %check to not refer to the note at all, but I think it'd be hard to cover all cases. In particular many packages embed the notes in %build in Makefiles and other generated config files, and then compile some things in %check. In general, I think the design should be that the notes file is created early and available at all times, and is just used when appropriate, or not. This needs to be managed by individual packages themselves, there's just too many combinations and conflicting requirements to handle this centrally. Sorry for not being able to do better. I think the best way to handle this is to include the file in MANIFEST.SKIP. > In the majority of cases these are pure-perl packages that contain no ELF objects and hence generate no debuginfo or package notes anyway; if the generation of these files could be suppressed for noarch packages, it would go a long way to avoiding the need for such workarounds. This should already be the case. Since package-notes-0.4-14 the note is skipped if %_target_cpu == noarch. But. It. Doesn't. Work. Just kill me. %_target_cpu is set to x86_64 when %__spec_build_pre is invoked, but is set to noarch when %build is invoked. I'll file a bug against rpm, let's see what they say.
This should be fixed with the new approach in #2099999.
This bug appears to have been reported against 'rawhide' during the Fedora Linux 37 development cycle. Changing version to 37.
This should be fixed now with the new approach.
Thanks. I confirm that noarch packages are not polluted anymore.