Bug 1431408 - Should ignore /usr/lib/.build-id for hidden-file-or-dir check
Should ignore /usr/lib/.build-id for hidden-file-or-dir check
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: rpmlint (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Tom "spot" Callaway
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-03-12 05:02 EDT by Paul Howarth
Modified: 2017-09-16 01:16 EDT (History)
12 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-07-17 10:17:53 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch to accept /usr/lib/.build-id dirs in rpmlint (1.85 KB, patch)
2017-03-28 11:35 EDT, Mark Wielaard
no flags Details | Diff

  None (edit)
Description Paul Howarth 2017-03-12 05:02:13 EDT
$ rpmlint ~/perl-Cpanel-JSON-XS-*
perl-Cpanel-JSON-XS.src: W: spelling-error %description -l en_US versa -> avers, verse, verso
perl-Cpanel-JSON-XS.x86_64: W: spelling-error %description -l en_US versa -> avers, verse, verso
perl-Cpanel-JSON-XS.x86_64: W: hidden-file-or-dir /usr/lib/.build-id
perl-Cpanel-JSON-XS.x86_64: W: hidden-file-or-dir /usr/lib/.build-id
3 packages and 0 specfiles checked; 0 errors, 4 warnings.

The /usr/lib/.build-id directory is going to be there in most arch-specific packages now - see: https://fedoraproject.org/wiki/Changes/ParallelInstallableDebuginfo
Comment 1 Ville Skyttä 2017-03-12 14:39:12 EDT
Any pointers to rationale why that dir is hidden in the first place?
Comment 2 Mark Wielaard 2017-03-12 20:40:57 EDT
(In reply to Ville Skyttä from comment #1)
> Any pointers to rationale why that dir is hidden in the first place?

That is a good question, but I cannot find the original rational. The ".build-id" directory has always been "hidden" from the start. The original design document (from 10 years ago now) just simply stated the name would be ".build-id". No rational given for the starting ".":
https://fedoraproject.org/wiki/Releases/FeatureBuildId

I think the original idea was that any directory that contained an executable or shared library could also contain a .build-id directory for the "magic symlinks" and so it was natural to start with a dot so it wouldn't clutter the normal file view. So then the system directories also started with a dot to be consistent. But that is just speculation.
Comment 3 Ville Skyttä 2017-03-15 05:37:30 EDT
I suppose bug 1432372 makes this issue moot?
Comment 4 Paul Howarth 2017-03-15 05:43:25 EDT
(In reply to Ville Skyttä from comment #3)
> I suppose bug 1432372 makes this issue moot?

Maybe, maybe not. It might get resolved by fixing the conflicts and retaining the /usr/lib/.build-id directory. Let's see.
Comment 5 Paul Howarth 2017-03-16 05:43:12 EDT
Doesn't look like the hidden directory is going away, so the issue isn't moot.
Comment 6 Jaroslav Škarvada 2017-03-28 04:49:13 EDT
This rpmlint behavior in rawhide is confusing (e.g. bug 1401302):

libarcus.x86_64: W: hidden-file-or-dir /usr/lib/.build-id
libarcus.x86_64: W: hidden-file-or-dir /usr/lib/.build-id
..
python3-arcus.x86_64: W: hidden-file-or-dir /usr/lib/.build-id
python3-arcus.x86_64: W: hidden-file-or-dir /usr/lib/.build-id

And the /usr/lib/.build-id doesn't seems to go away due to https://fedoraproject.org/wiki/Changes/ParallelInstallableDebuginfo
Comment 7 Jun Aruga 2017-03-28 04:57:13 EDT
Hi Jaroslav,

If you want to improve the rpmlint's behavior, you can ask the upstream from below page.
https://github.com/rpm-software-management/rpmlint
Comment 8 Mark Wielaard 2017-03-28 11:35 EDT
Created attachment 1267014 [details]
Patch to accept /usr/lib/.build-id dirs in rpmlint

The attached patch makes rpmlint no longer complain about only-non-binary-in-usr-lib or hidden-file-or-dir /usr/lib/.build-id
Comment 9 Raphael Groner 2017-05-06 02:52:32 EDT
Any news here?
Comment 10 Ville Skyttä 2017-05-07 02:16:16 EDT
From rpmlint upstream POV:

1) Github pull requests are much preferred over patches in Bugzilla.

2) Maybe the only-non-binary-in-usr-lib issue is a broader one, so that the warning shouldn't be issued if there are only dirs and symlinks in /usr/lib. This seems to be the case for .build-ids.

3) The hidden-file-or-dir one is thus a separate issue, and should be treated in a separate patch/pull request. But do the dirs exist in any other distributions besides Fedora, RHEL and derivatives? If not, perhaps it should be handled in Fedora/EPEL rpmlint configs instead of upstream or patching.
Comment 11 Mark Wielaard 2017-05-07 17:40:26 EDT
(In reply to Ville Skyttä from comment #10)
> From rpmlint upstream POV:
> 
> 1) Github pull requests are much preferred over patches in Bugzilla.

I am happy to submit to the mailinglist (which one?) or setup a proper
git repo and commit the patch for a git pull request. But I don't have a github account, so cannot do github pull requests. But if someone else wants to please feel free to take the attachment and submit it there.

> 2) Maybe the only-non-binary-in-usr-lib issue is a broader one, so that the
> warning shouldn't be issued if there are only dirs and symlinks in /usr/lib.
> This seems to be the case for .build-ids.

It looks like the same as the other entries in usr_lib_exception_regex, but maybe I am missing the point?
 
> 3) The hidden-file-or-dir one is thus a separate issue, and should be
> treated in a separate patch/pull request. But do the dirs exist in any other
> distributions besides Fedora, RHEL and derivatives? If not, perhaps it
> should be handled in Fedora/EPEL rpmlint configs instead of upstream or
> patching.

This is from upstream rpm (will be in the next release), so is not Fedora specific (Fedora just has an early backport and uses it first).
Comment 12 Mark Wielaard 2017-06-30 12:48:04 EDT
This came up again recently on the devel@ mailinglist.
Would be nice to get this patchlet in the fedora rpmlint package.
Comment 13 Tom "spot" Callaway 2017-07-10 10:39:59 EDT
https://github.com/rpm-software-management/rpmlint/pull/107
Comment 14 Mark Wielaard 2017-07-16 15:16:51 EDT
(In reply to Tom "spot" Callaway from comment #13)
> https://github.com/rpm-software-management/rpmlint/pull/107

Thanks. Looks like it was integrated (with a small fixup) upstream.
Could it be backported to the fedora rawhide rpmlint package?
Comment 15 Tom "spot" Callaway 2017-07-17 10:17:53 EDT
rpmlint-1.9-11.fc27 is in rawhide with the upstream change applied.
Comment 16 Raphael Groner 2017-08-14 02:00:29 EDT
Please build with the applied patch also for f26. We see a lot of reviews from f26 stumbling upon this issue with the mentioned false warnings about build-id.

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