Bug 747119 - umask different in shell and rebuild
Summary: umask different in shell and rebuild
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: mock
Version: el6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Clark Williams
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-18 20:47 UTC by Shad L. Lords
Modified: 2012-02-24 23:41 UTC (History)
2 users (show)

Fixed In Version: mock-1.0.28-1.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-19 02:00:46 UTC
Type: ---


Attachments (Terms of Use)

Description Shad L. Lords 2011-10-18 20:47:03 UTC
Description of problem:

When building some packages you get a different result depending on if you do a --rebuild or --shell and run the same command

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

mock-1.1.15-1.el6.noarch

How reproducible:

Everytime.

Steps to Reproduce:
1. mock -r root-x86_64 --no-cleanup-after --rebuild luci-0.23.0-13.el6.src.rpm
2. mock -r root-x86_64 --unpriv --shell
3. (in shell) rpmbuild -bb --target x86_64 --nodeps builddir/build/SPECS/luci.spec
  
Actual results:

The following shows different mod for the file:

rpm -qplv luci-0.23.0-13.el6.x86_64.rpm | grep sasl2auth.so
-rwxrwxr-x for the package built with --rebuild
-rwxr-xr-x for the package built inside shell

Expected results:

Both files should have -rwxr-xr-x for mods.  If you build this package outside mock you end up with the correct result.

Comment 1 Clark Williams 2011-12-10 18:51:52 UTC
Added an explicit umask set before exec'ing shell

Comment 2 Fedora Update System 2012-01-13 20:18:50 UTC
mock-1.1.19-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.19-1.el6

Comment 3 Fedora Update System 2012-01-13 20:19:23 UTC
mock-1.1.19-1.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/mock-1.1.19-1.fc16

Comment 4 Fedora Update System 2012-01-13 20:19:55 UTC
mock-1.0.26-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/mock-1.0.26-1.el5

Comment 5 Fedora Update System 2012-01-13 20:20:28 UTC
mock-1.1.19-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/mock-1.1.19-1.fc15

Comment 6 Fedora Update System 2012-01-14 19:30:10 UTC
mock-1.1.19-2.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/mock-1.1.19-2.fc15

Comment 7 Fedora Update System 2012-01-14 19:30:48 UTC
mock-1.1.19-2.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.19-2.el6

Comment 8 Fedora Update System 2012-01-14 19:31:22 UTC
mock-1.0.26-2.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/mock-1.0.26-2.el5

Comment 9 Fedora Update System 2012-01-14 19:31:56 UTC
mock-1.1.19-2.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/mock-1.1.19-2.fc16

Comment 10 Fedora Update System 2012-01-15 23:26:26 UTC
Package mock-1.1.19-2.el6:
* should fix your issue,
* was pushed to the Fedora EPEL 6 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing mock-1.1.19-2.el6'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2012-0134/mock-1.1.19-2.el6
then log in and leave karma (feedback).

Comment 11 Shad L. Lords 2012-01-16 16:47:46 UTC
This is not solved in mock-1.1.19-2.el6.  The results between building in a unpriv shell (no group w) is still correct and the rebuild results are incorrect (has group w).

Comment 12 Clark Williams 2012-01-17 21:00:29 UTC
It took me a while to realize this but I cannot change this because mock depends on shared group permissions to work in the chroot. 

Mock switches back and forth between root and unpriv uid/gid and allowing write for the mock group allows it to write log information, packages, etc, into the chroot directory. If you blindly change the umask to 022 when mock is setting up, you get tons of permission denied errors when trying to manipulate the chroot. 

.

Comment 13 Shad L. Lords 2012-01-17 22:41:39 UTC
I'm not talking about blindly changing the umask.  What this bug is about is that the permissions that a file INSIDE the build rpm have are different.  See the original report.

The file sasl2auth.so INSIDE the rpm package luci-0.23.0-13.el6.x86_64.rpm have different permissions.  Building outside of mock and with unpriv shell both produce the same file permissions for sasl2auth.so of -rwxr-xr-x.  Running inside of mock with rebuild produces permissions of -rwxrwxr-x.

I'm not sure where or if this can be solved but setting a umask just before the rpmbuild -bb seems like it should fix it.

The concern I have is that rpms produced inside of a mock chroot will not come out identical to rpms build outside of mock.

Comment 14 Fedora Update System 2012-01-22 05:25:09 UTC
mock-1.1.19-2.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 15 Shad L. Lords 2012-01-22 15:16:00 UTC
See comment 11 and comment 13.  This bug isn't fixed and produces different results between inside and outside of mock.

Comment 16 Clark Williams 2012-01-27 19:53:31 UTC
Ok, I'll keep it open and see if I can figure out a way to fix it without breaking everything else.

Comment 17 Fedora Update System 2012-02-01 16:45:45 UTC
mock-1.1.20-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/mock-1.1.20-1.fc15

Comment 18 Fedora Update System 2012-02-01 16:46:39 UTC
mock-1.1.20-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.20-1.el6

Comment 19 Fedora Update System 2012-02-01 16:47:25 UTC
mock-1.1.20-1.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/mock-1.1.20-1.fc16

Comment 20 Fedora Update System 2012-02-01 16:48:13 UTC
mock-1.0.27-2.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/mock-1.0.27-2.el5

Comment 21 Fedora Update System 2012-02-02 17:29:12 UTC
Package mock-1.1.20-1.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mock-1.1.20-1.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-1199/mock-1.1.20-1.fc16
then log in and leave karma (feedback).

Comment 22 Shad L. Lords 2012-02-02 19:18:40 UTC
Please confirm that the latest package contains a fix for this issue.  I don't see any mention in the changelog that this issue has been fixed.  It appears that the Update System marked this as fixed when it hasn't been.

Comment 23 Fedora Update System 2012-02-08 22:57:53 UTC
mock-1.1.20-1.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 24 Shad L. Lords 2012-02-08 23:39:09 UTC
mock-1.1.20-1.fc16 does not fix this issue.

Comment 25 Fedora Update System 2012-02-09 02:22:22 UTC
mock-1.1.21-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/mock-1.1.21-1.fc15

Comment 26 Fedora Update System 2012-02-09 02:23:05 UTC
mock-1.1.21-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.21-1.el6

Comment 27 Fedora Update System 2012-02-09 02:23:50 UTC
mock-1.0.28-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/mock-1.0.28-1.el5

Comment 28 Fedora Update System 2012-02-09 02:24:32 UTC
mock-1.1.21-1.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/mock-1.1.21-1.fc16

Comment 29 Fedora Update System 2012-02-09 18:44:55 UTC
Package mock-1.1.21-1.el6:
* should fix your issue,
* was pushed to the Fedora EPEL 6 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing mock-1.1.21-1.el6'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2012-0387/mock-1.1.21-1.el6
then log in and leave karma (feedback).

Comment 30 Fedora Update System 2012-02-15 23:56:30 UTC
mock-1.1.21-1.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 31 Shad L. Lords 2012-02-16 00:26:34 UTC
See comment #22

Comment 32 Fedora Update System 2012-02-19 02:00:46 UTC
mock-1.1.21-1.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 33 Fedora Update System 2012-02-24 23:37:50 UTC
mock-1.1.21-1.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 34 Fedora Update System 2012-02-24 23:41:19 UTC
mock-1.0.28-1.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.


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