Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1780126

Summary: MakeMaker installs files with permission 0444
Product: Red Hat Enterprise Linux 8 Reporter: Andreas Schneider <asn>
Component: perl-ExtUtils-InstallAssignee: perl-maint-list
Status: CLOSED WONTFIX QA Contact: RHEL CS Apps Subsystem QE <rhel-cs-apps-subsystem-qe>
Severity: unspecified Docs Contact:
Priority: high    
Version: 8.2CC: asn, ppisar
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-06-05 07:30:30 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 Andreas Schneider 2019-12-05 13:16:23 UTC
Description of problem:

The samba package contains a perl tool called pidl. To install it, a Makefile.PL is provided which uses MakeMaker.

When I call 'make install', files are installed with permission 0444 instead of 0644.

I don't see a way that I can influence this.

Comment 1 Andreas Schneider 2019-12-05 13:32:08 UTC
Actually it seems to be already the 'make' command which copies .pm files to blib/ directory.

Comment 2 Andreas Schneider 2019-12-05 13:57:35 UTC
Both, when copying the files to blib dir and on installing, it does a chmod 0444 according to strace.

Comment 3 Andreas Schneider 2019-12-05 14:02:03 UTC
Reproducer:

Get the Samba package and unzip the tarball:

cd pidl
perl Makefile.PL
make
make DESTDIR=/tmp/wurst install_vendor

Comment 4 Petr Pisar 2019-12-05 14:23:19 UTC
ExtUtils::Install (called by ExtUtils::MakeMaker) follows permissions of the source. From the manual:

        Copies each directory tree of %from_to to its corresponding value preserving
        timestamps and permissions.

If you have a source file without a write permission, the installed file will be stripped from that permission either. I guess that's your case. Although upstream has reported some inconsistencies in the behavior.

Could you tell me what exact samba source archive do you use?

Comment 5 Petr Pisar 2019-12-05 15:05:56 UTC
Ok. I can reproduce it:

$ ls -lR
.:
total 0
drwxrwxr-x. 2 test test 60 Dec  5 15:51 script

./script:
total 0
-rwxr-xr-x. 1 test test 0 Dec  5 15:51 pidl
$ perl -MExtUtils::Install -e 'install([ from_to => { q{script} => q{/tmp/b} } ])'
Installing /tmp/b/pidl
$ ls -l /tmp/b/pidl 
-r-xr-xr-x. 1 test test 0 Dec  5 15:51 /tmp/b/pidl

Comment 6 Andreas Schneider 2019-12-05 15:47:58 UTC
Thanks, I've worked around the bug by specifying %attr for each file in the spec file.

Comment 7 Petr Pisar 2019-12-06 09:22:32 UTC
ExtUtils::Install documentation does not match the behavior. The current behavior is asserted by ExtUtils::Install tests. It's quite possible the current behavior is desired. I raised a question to the upstream together with a patch that changes the behavior. Let's wait some time for upstream's opinion.

Comment 8 Andreas Schneider 2019-12-06 09:36:50 UTC
If the current behavior is desired, then there needs to be a option to change that.

Comment 11 RHEL Program Management 2021-06-05 07:30:30 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.