RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1131270 - Unable to Strip Perl Binaries while building RPM: Permission Denied
Summary: Unable to Strip Perl Binaries while building RPM: Permission Denied
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: rpm
Version: 6.5
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Packaging Maintenance Team
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-18 20:34 UTC by David E. Wheeler
Modified: 2014-12-15 13:51 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-12-15 13:51:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description David E. Wheeler 2014-08-18 20:34:38 UTC
Description of problem:

Similar to #112429, I get 56 of these warnings while trying to build a Perl 5.20 RPM on CentOS 6.5:

    /usr/bin/strip: unable to copy file '/home/dwheeler/rpm-perl/BUILDROOT/perl520-5.20.0-1.1408388526.x86_64/usr/local/perl520/lib/5.20.0/x86_64-linux-thread-multi/CORE/libperl.so'; reason: Permission denied

The files in question have no +w on them, so the inability to strip understandable. I'm able to make those warnings go away if I apply tho patch to brp-strip-comment-note:

--- brp-strip-comment-note	2014-08-18 13:33:02.069699117 -0700
+++ brp-strip-comment-note	2014-08-18 12:42:37.574233023 -0700
@@ -19,5 +19,11 @@
 		grep ALLOC >/dev/null; then
 		note=
 	fi
-	$STRIP -R .comment $note "$f" || :
+    if test -w "$f"; then
+	    $STRIP -R .comment $note "$f" || :
+    else
+        chmod u+w "$f"
+	    $STRIP -R .comment $note "$f" || :
+        chmod u-w "$f"
+    fi
 done

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

CentOS 6.5.

Comment 1 Michael Schwendt 2014-08-18 21:37:24 UTC
> Version: Rawhide

> CentOS 6.5

Please clarify. Rawhide or CentOS 6.5?


> brp-strip-comment-note

That's from package "rpm-build", so if you suggest patching that one, it would be a bug in RHEL 6.5. Bugzilla component "rpm" as in bug 112429 you've mentioned.

Comment 2 David E. Wheeler 2014-08-18 21:43:24 UTC
(In reply to Michael Schwendt from comment #1)
> > Version: Rawhide
> 
> > CentOS 6.5
> 
> Please clarify. Rawhide or CentOS 6.5?

CentOS 6.5. Sorry had not noticed the Rawhide selection.

> > brp-strip-comment-note
> 
> That's from package "rpm-build", so if you suggest patching that one, it
> would be a bug in RHEL 6.5. Bugzilla component "rpm" as in bug 112429 you've
> mentioned.

Thanks, fixed.

Comment 4 Florian Festi 2014-12-15 13:51:42 UTC
Sorry. It is not the task of the brp-strip script to work around permission issues. Either disable stripping or make sure these files have the right permissions.

Note, that it is not necessary for the files to have the proper permissions on disk during build. Permissions within the package should be declared in the %files section.


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