mock 0.9 backport to F7/F8 -- Feb 1

Manuel Wolfshant wolfy at nobugconsulting.ro
Mon Mar 3 23:34:05 UTC 2008


On 01/05/2008 12:49 AM, Michael_E_Brown at Dell.com wrote:
> All mock users,
>
>      The mock maintainers (Clark, Jesse, me) will upgrade mock in F7/F8 to current 0.9 on/around Feb 1.
>
>      The mock 0.9 branch has brewed in rawhide since early Dec, and so far it looks good. The 0.9 branch is now being used on the official build systems, so if there were any major problems, we would expect to have hit them by now.
>
>      The *only* difference between 0.8.<latest> and 0.9.<latest> at this point is that we have dropped the old mock setuid wrapper and now use the consolehelper subsystem. For this, you will notice new /etc/pam.d/mock, /etc/consolehelper/mock files which configure mock. The default config is set up to operate exactly the same as the old 0.8 branch: ie. you must be a member of the 'mock' group to run mock. Additionally, with consolehelper comes one new feature: if you are not in the 'mock' group, you will be prompted to enter the root password and it will run. This means you can run mock without worrying about any pre-setup.
>
> --
> Michael
>
>   
Hey all

    Did I hit a bug here or am I doing something very stupid ? According 
to the paragraph above, I should either be allowed to build as user, or 
be asked for the root password. Helas....
[wolfy at wolfy ~]$ id wolfy
uid=500(wolfy) gid=500(wolfy) groups=500(wolfy),497(mock) 
context=user_u:system_r:unconfined_t
[wolfy at wolfy ~]$ rpm -qi mock
Name        : mock                         Relocations: (not relocatable)
Version     : 0.9.7                             Vendor: Fedora Project
Release     : 1.fc7                         Build Date: Sat 02 Feb 2008 
02:14:01 AM EET
Install Date: Tue 04 Mar 2008 01:12:56 AM EET      Build Host: 
ppc3.fedora.redhat.com
[wolfy at wolfy ~]$ mock -r fedora-5-x86_64-epel 
/tmp/rpmlint/devel/rpmlint-0.82-3.fc9.src.rpm
ERROR: [Errno 1] Operation not permitted
Traceback (most recent call last):
  File "/usr/sbin/mock", line 630, in <module>
    main(retParams)
  File "/usr/sbin/mock", line 412, in main
    uidManager._becomeUser(unprivUid, unprivGid)
  File "<peak.util.decorators.rewrap wrapping mock.uid._becomeUser at 
0x008F4500>", line 3, in _becomeUser
    def _becomeUser(self, uid, gid): return __decorated(self, uid, gid)
  File "/usr/lib/python2.5/site-packages/mock/trace_decorator.py", line 
70, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.5/site-packages/mock/uid.py", line 65, in 
_becomeUser
    self._elevatePrivs()
  File "<peak.util.decorators.rewrap wrapping mock.uid._elevatePrivs at 
0x008F0F50>", line 3, in _elevatePrivs
    def _elevatePrivs(self): return __decorated(self)
  File "/usr/lib/python2.5/site-packages/mock/trace_decorator.py", line 
70, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.5/site-packages/mock/uid.py", line 60, in 
_elevatePrivs
    setresuid(0, 0, 0)
  File "/usr/lib/python2.5/site-packages/mock/uid.py", line 91, in setresuid
    raise OSError(_errno.value, os.strerror(_errno.value))
OSError: [Errno 1] Operation not permitted





More information about the fedora-devel-list mailing list