Bug 2133061

Summary: rpmlint incorrectly claims ppc64le executable s are exec-stack
Product: [Fedora] Fedora Reporter: Steven Jay Munroe <munroesj52>
Component: rpmlintAssignee: Tom "spot" Callaway <spotrh>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 38CC: bergner, j, spotrh, tmz, tuliom, twoerner
Target Milestone: ---   
Target Release: ---   
Hardware: ppc64le   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-09 02:06:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Steven Jay Munroe 2022-10-07 17:34:05 UTC
Description of problem: rpmlint incorrectly claims ppc64le executable s are exec-stack 


Version-Release number of selected component (if applicable): Rawhide 2.2.0


How reproducible: fedpkg lint


Steps to Reproduce:
1. Checkout pvevlib
2. fedpkg local
3. fedpkg lint

Actual results: See 
https://bugzilla.redhat.com/show_bug.cgi?id=2113609#c27


Expected results: Should not report E: missing-PT_GNU_STACK-section


Additional info: https://bugzilla.redhat.com/show_bug.cgi?id=2113609#c27
Per Alan Modra:
Nope.  ppc64 defaults to a non-exec stack if PT_GNU_STACK is missing.
See glibc DEFAULT_STACK_PERMS for ppc64.

Comment 1 Todd Zullinger 2022-10-07 21:05:22 UTC
Sorry for the trouble.

Can you point to some builds in koji which have the issue?  I don't have any ppc64le systems to test.  In koji, the latest build from dist-git (1.0.4.4-9) fails to build.

I downloaded some other ppc64le builds from koji and none of them seem to trigger the warning.  Upstream made some changes in 2.3.0 in this area, but they looked to be loosening the checks.  Those may be incomplete, but I'd like to make sure I have a way to reproduce the problem before trying to suggest a fix or re-opening the ticket.

The upstream issue which let to the changes is:

    https://github.com/rpm-software-management/rpmlint/issues/762

Comment 2 Steven Jay Munroe 2022-10-07 22:57:02 UTC
In my case the pveclib.

You may need the v1.0.4.5 update which has fixes for GCC-12.

The updated spec is attached to
 https://bugzilla.redhat.com/show_bug.cgi?id=2113609
as
 https://bugzilla.redhat.com/attachment.cgi?id=1913039

Comment 3 Todd Zullinger 2022-10-08 00:35:10 UTC
Any chance you could run a scratch build in koji and share the link to it?  Or a branch in dist-git?  That way we have a common srpm and binary rpms to compare.  I did try to build 1.0.4.5 earlier without success.  But all I did there was bump the version in the spec, I didn't compare it with other changes there might be in the spec file.

Comment 4 Todd Zullinger 2022-10-08 01:52:51 UTC
I grabbed the spec file from the other ticket and built it in koji:

  https://koji.fedoraproject.org/koji/taskinfo?taskID=92773013

Downloading all the rpm's and running rpmlint against them, I don't get a missing-PT_GNU_STACK-section error.  I do get a missing-hash-section error, which was reported earlier today in bug #2132969.

What am I missing to reproduce this in rawhide?  Is it possible that the last check was done with rpmlint-2.2.0?  If so, then this should be fixed by updating rpmlint to the current release in rawhide. :)

Here's the output from rpmlint-2.4.0-2.fc38:

$ rpmlint pveclib-*.rpm | cat
============================ rpmlint session starts ============================
rpmlint: 2.4.0
configuration:
    /usr/lib/python3.11/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: 31, packages: 5

pveclib-debuginfo.ppc64le: W: unstripped-binary-or-object /usr/lib/debug/.dwz/pveclib-1.0.4.5-11.fc38.ppc64le
pveclib-debuginfo.ppc64le: W: unstripped-binary-or-object /usr/lib/debug/usr/lib64/libpvec.so.1.0.4-1.0.4.5-11.fc38.ppc64le.debug
pveclib-debuginfo.ppc64le: E: statically-linked-binary /usr/lib/debug/.dwz/pveclib-1.0.4.5-11.fc38.ppc64le
pveclib-static.ppc64le: E: static-library-without-debuginfo /usr/lib64/libpvecstatic.a
pveclib-debuginfo.ppc64le: E: shared-library-without-dependency-information /usr/lib/debug/usr/lib64/libpvec.so.1.0.4-1.0.4.5-11.fc38.ppc64le.debug
pveclib-debuginfo.ppc64le: W: no-documentation
pveclib-debugsource.ppc64le: W: no-documentation
pveclib-debugsource.ppc64le: E: no-binary
pveclib-devel.ppc64le: E: no-binary
pveclib.ppc64le: E: missing-hash-section /usr/lib64/libpvec.so.1.0.4
pveclib-debugsource.ppc64le: E: incorrect-fsf-address /usr/src/debug/pveclib-1.0.4.5-11.fc38.ppc64le/src/decpowof2.c
pveclib-debuginfo.ppc64le: W: hidden-file-or-dir /usr/lib/debug/.dwz
pveclib-debuginfo.ppc64le: W: hidden-file-or-dir /usr/lib/debug/.dwz
pveclib.ppc64le: W: files-duplicate /usr/share/licenses/pveclib/LICENSE /usr/share/doc/pveclib/COPYING:/usr/share/licenses/pveclib/COPYING
pveclib-debuginfo.ppc64le: W: dangling-relative-symlink /usr/lib/debug/.build-id/36/9e83bc0d441ba0eacc69114de62d10d0c7aebc ../../../.build-id/36/9e83bc0d441ba0eacc69114de62d10d0c7aebc
 5 packages and 0 specfiles checked; 7 errors, 8 warnings, 7 badness; has taken 0.7 s

All but 2 of those are incorrect (well, and the already-mentioned missing-hash-section which should go away soon, one way or another).  I'll look at updating the fedora rpmlint config to silence most of them.

The 2 which remain are:

  pveclib-static.ppc64le: E: static-library-without-debuginfo /usr/lib64/libpvecstatic.a

I don't know offhand if that's something which should be ignored by default or not.

  pveclib.ppc64le: W: files-duplicate /usr/share/licenses/pveclib/LICENSE /usr/share/doc/pveclib/COPYING:/usr/share/licenses/pveclib/COPYING

This is due to having both LICENSE and COPYING in the %license macro and COPYING in %doc as well.  Something like this should fix it:

   %files
  -%license LICENSE COPYING
  -%doc COPYING README.md CONTRIBUTING.md ChangeLog.md
  +%license COPYING
  +%doc README.md CONTRIBUTING.md ChangeLog.md
   %{_libdir}/libpvec.so.1
   %{_libdir}/libpvec.so.1.*

It's probably worth asking upstream to remove one of the two identical files from the release tarball.  Or at least make one a symlink to the other.

Comment 5 Todd Zullinger 2022-10-08 01:59:31 UTC
Oh, and this is unrelated to rpmlint, but I noticed the past 2 changelog entries have the wrong name.  They claim to be Fedora Release Engineering, but they've got your email. :)

Similarly, the Release tag should be reset to 1 whenever Version is changed, per the last item here:

  https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/#_simple_versioning

  * Use a Release: tag starting with 1 (never 0). Append the Dist Tag. Increment the release (by 1) for each update you make. Reset to 1 whenever you change Version:.

Comment 6 Todd Zullinger 2022-10-15 16:44:56 UTC
Hi Steven,

Can this be reproduced in rawhide using rpmlint-2.4.0-3.fc38?

I was unable to do so when I tried last week.

If it can be reproduced, please include the output showing what steps to take and the results.

If it can't, then I'll close this ticket.

Thanks.

Comment 7 Steven Jay Munroe 2022-10-20 15:36:28 UTC
Sorry been busy as care giver.

I think my friend Tulio has addressed this: https://bugzilla.redhat.com/show_bug.cgi?id=2113609#c44

Comment 8 Ben Cotton 2023-02-07 14:57:06 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 38 development cycle.
Changing version to 38.