FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Build System

 
 
LinkBack Thread Tools
 
Old 08-08-2010, 05:26 PM
Paul Howarth
 
Default First impressions of mock 1.1.3

Good:

I no longer need my selinux workaround:

config_opts['files']['selinux/enforce'] = "0"


Bad:

New option max_fs_size for tmpfs plugin doesn't seem to have a default
value; at least I get a traceback if I use my old config, which had
just:

config_opts['plugin_conf']['tmpfs_enable'] = True
config_opts['plugin_conf']['tmpfs_opts']['required_ram_mb'] = 2048



Root cache is huge because of cache files getting copied to the cache.
The following change restored sanity:

--- /usr/lib/python2.6/site-packages/mock/plugins/root_cache.py.orig 2010-08-03 22:04:48.000000000 +0100
+++ /usr/lib/python2.6/site-packages/mock/plugins/root_cache.py 2010-08-08 18:10:42.175478756 +0100
@@ -118,6 +118,8 @@
"--exclude=./proc",
"--exclude=./sys",
"--exclude=./dev",
+ "--exclude=./tmp",
+ "--exclude=./var/cache/yum",
"."],
shell=False
)



Mock always exits with non-zero exit code due to problems uumounting
filesystems, leading my build scripts to declare the builds as duds:

DEBUG backend.py:520: Copying packages to result dir
DEBUG backend.py:639: umount -n /var/lib/mock/city-fan-rawhide-i686/root/proc
DEBUG util.py:289: Executing command: umount -n /var/lib/mock/city-fan-rawhide-i686/root/proc
DEBUG util.py:255: umount: /var/lib/mock/city-fan-rawhide-i686/root/proc: device is busy.
DEBUG util.py:255: (In some cases useful info about processes that use
DEBUG util.py:255: the device is found by lsof(8) or fuser(1))
DEBUG util.py:328: Child returncode was: 1
DEBUG backend.py:639: umount -n /var/lib/mock/city-fan-rawhide-i686/root/sys
DEBUG util.py:289: Executing command: umount -n /var/lib/mock/city-fan-rawhide-i686/root/sys
DEBUG util.py:328: Child returncode was: 0
DEBUG backend.py:639: umount -n /var/lib/mock/city-fan-rawhide-i686/root/var/cache/yum
DEBUG util.py:289: Executing command: umount -n /var/lib/mock/city-fan-rawhide-i686/root/var/cache/yum
DEBUG util.py:328: Child returncode was: 0
DEBUG backend.py:639: umount -n /var/lib/mock/city-fan-rawhide-i686/root/tmp/ccache
DEBUG util.py:289: Executing command: umount -n /var/lib/mock/city-fan-rawhide-i686/root/tmp/ccache
DEBUG util.py:328: Child returncode was: 0
DEBUG backend.py:639: umount -n /var/lib/mock/city-fan-rawhide-i686/root/proc/filesystems
DEBUG util.py:289: Executing command: umount -n /var/lib/mock/city-fan-rawhide-i686/root/proc/filesystems
DEBUG util.py:328: Child returncode was: 0
DEBUG backend.py:639: umount -n /var/lib/mock/city-fan-rawhide-i686/root/dev/pts
DEBUG util.py:289: Executing command: umount -n /var/lib/mock/city-fan-rawhide-i686/root/dev/pts
DEBUG util.py:328: Child returncode was: 0
DEBUG backend.py:639: umount -n /var/lib/mock/city-fan-rawhide-i686/root/dev/shm
DEBUG util.py:289: Executing command: umount -n /var/lib/mock/city-fan-rawhide-i686/root/dev/shm
DEBUG util.py:328: Child returncode was: 0
DEBUG util.py:289: Executing command: ['umount', '-n', '/var/lib/mock/city-fan-rawhide-i686/root/']
DEBUG util.py:255: umount: /var/lib/mock/city-fan-rawhide-i686/root/: device is busy.
DEBUG util.py:255: (In some cases useful info about processes that use
DEBUG util.py:255: the device is found by lsof(8) or fuser(1))
DEBUG util.py:328: Child returncode was: 1
DEBUG util.py:97: kill orphans


I'll have to get my script to ignore mock's exit status for now
and check for built packages in the result directory I think.

Paul.
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
 
Old 08-10-2010, 10:32 AM
Paul Howarth
 
Default First impressions of mock 1.1.3

On Sun, 8 Aug 2010 18:26:33 +0100
Paul Howarth <paul@city-fan.org> wrote:

> Good:
>
> I no longer need my selinux workaround:
>
> config_opts['files']['selinux/enforce'] = "0"
>
>
> Bad:
>
> New option max_fs_size for tmpfs plugin doesn't seem to have a default
> value; at least I get a traceback if I use my old config, which had
> just:
>
> config_opts['plugin_conf']['tmpfs_enable'] = True
> config_opts['plugin_conf']['tmpfs_opts']['required_ram_mb'] = 2048
>
>
>
> Root cache is huge because of cache files getting copied to the cache.
> The following change restored sanity:
>
> --- /usr/lib/python2.6/site-packages/mock/plugins/root_cache.py.orig
> 2010-08-03 22:04:48.000000000 +0100
> +++ /usr/lib/python2.6/site-packages/mock/plugins/root_cache.py
> 2010-08-08 18:10:42.175478756 +0100 @@ -118,6 +118,8 @@
> "--exclude=./proc", "--exclude=./sys",
> "--exclude=./dev",
> +
> "--exclude=./tmp",
> +
> "--exclude=./var/cache/yum", "."],
> shell=False
> )

Better version of this fix, retains the directories but not their
contents, which is important, particularly for /tmp:

--- /usr/lib/python2.6/site-packages/mock/plugins/root_cache.py.orig 2010-08-03 22:04:48.000000000 +0100
+++ /usr/lib/python2.6/site-packages/mock/plugins/root_cache.py 2010-08-10 09:56:14.854332207 +0100
@@ -118,6 +118,8 @@
"--exclude=./proc",
"--exclude=./sys",
"--exclude=./dev",
+ "--exclude=./tmp/*",
+ "--exclude=./var/cache/yum/*",
"."],
shell=False
)


Another issue I've just come across: I can no longer build for i586 target arch.
Fix:

--- /usr/sbin/mock.orig 2010-08-03 22:04:48.000000000 +0100
+++ /usr/sbin/mock 2010-08-10 11:26:00.018451269 +0100
@@ -369,9 +369,9 @@
config_opts['online'] = options.online

legal_arches = {
- 'i386' : ('i386', 'i686'),
- 'i686' : ('i386', 'i686'),
- 'x86_64' : ('i386', 'i686', 'x86_64'),
+ 'i386' : ('i386', 'i586', 'i686'),
+ 'i686' : ('i386', 'i586', 'i686'),
+ 'x86_64' : ('i386', 'i586', 'i686', 'x86_64'),
'ppc' : ('ppc'),
'ppc64' : ('ppc', 'ppc64'),
'sparc' : ('sparc'),

Paul.
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
 
Old 08-11-2010, 04:57 AM
"Shad L. Lords"
 
Default First impressions of mock 1.1.3

> Another issue I've just come across: I can no longer build for i586 target arch.
> Fix:
>
> --- /usr/sbin/mock.orig 2010-08-03 22:04:48.000000000 +0100
> +++ /usr/sbin/mock 2010-08-10 11:26:00.018451269 +0100
> @@ -369,9 +369,9 @@
> config_opts['online'] = options.online
>
> legal_arches = {
> - 'i386' : ('i386', 'i686'),
> - 'i686' : ('i386', 'i686'),
> - 'x86_64' : ('i386', 'i686', 'x86_64'),
> + 'i386' : ('i386', 'i586', 'i686'),
> + 'i686' : ('i386', 'i586', 'i686'),
> + 'x86_64' : ('i386', 'i586', 'i686', 'x86_64'),
> 'ppc' : ('ppc'),
> 'ppc64' : ('ppc', 'ppc64'),
> 'sparc' : ('sparc'),

another is noarch which we fixed this way:

--- /usr/sbin/mock.old 2010-08-10 22:54:35.000000000 -0600
+++ /usr/sbin/mock 2010-08-07 13:09:27.000000000 -0600
@@ -559,7 +559,8 @@
set_config_opts_per_cmdline(config_opts, options, args)

# verify that we're not trying to build an arch that we can't
- check_arch_combination(config_opts['rpmbuild_arch'])
+ if config_opts['rpmbuild_arch'] != "noarch":
+ check_arch_combination(config_opts['rpmbuild_arch'])

# default /etc/hosts contents
if not config_opts['use_host_resolv'] and not
config_opts['files'].has_key('etc/hosts'):
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
 
Old 08-11-2010, 09:18 AM
Paul Howarth
 
Default First impressions of mock 1.1.3

On 08/08/10 18:26, Paul Howarth wrote:
> New option max_fs_size for tmpfs plugin doesn't seem to have a default
> value; at least I get a traceback if I use my old config, which had
> just:
>
> config_opts['plugin_conf']['tmpfs_enable'] = True
> config_opts['plugin_conf']['tmpfs_opts']['required_ram_mb'] = 2048

Actually that's not true. The syntax above doesn't cause a traceback.
What I actually had was:

config_opts['plugin_conf']['tmpfs_enable'] = True
config_opts['plugin_conf']['tmpfs_opts'] = {'required_ram_mb': 2048}

And the resulting traceback was:

INFO: mock.py version 1.1.3 starting...
State Changed: init plugins
ERROR: 'max_fs_size'
Traceback (most recent call last):
File "/usr/sbin/mock", line 748, in <module>
main(retParams)
File "/usr/sbin/mock", line 587, in main
chroot = mock.backend.Root(config_opts, uidManager)
File "<peak.util.decorators.rewrap wrapping mock.backend.__init__ at
0x01811938>", line 3, in __init__
def __init__(self, config, uidManager): return __decorated(self,
config, uidManager)
File "/usr/lib/python2.6/site-packages/mock/trace_decorator.py", line
70, in trace
result = func(*args, **kw)
File "/usr/lib/python2.6/site-packages/mock/backend.py", line 102, in
__init__
self._initPlugins()
File "<peak.util.decorators.rewrap wrapping mock.backend._initPlugins
at 0x01818398>", line 3, in _initPlugins
def _initPlugins(self): return __decorated(self)
File "/usr/lib/python2.6/site-packages/mock/trace_decorator.py", line
70, in trace
result = func(*args, **kw)
File "/usr/lib/python2.6/site-packages/mock/backend.py", line 623, in
_initPlugins
module.init(self, self.pluginConf["%s_opts" % modname])
File "<peak.util.decorators.rewrap wrapping tmpfs.init at
0x01814410>", line 3, in init
def init(rootObj, conf): return __decorated(rootObj, conf)
File "/usr/lib/python2.6/site-packages/mock/trace_decorator.py", line
70, in trace
result = func(*args, **kw)
File "/usr/lib/python2.6/site-packages/mock/plugins/tmpfs.py", line
21, in init
Tmpfs(rootObj, conf)
File "<peak.util.decorators.rewrap wrapping tmpfs.__init__ at
0x017C3320>", line 3, in __init__
def __init__(self, rootObj, conf): return __decorated(self,
rootObj, conf)
File "/usr/lib/python2.6/site-packages/mock/trace_decorator.py", line
70, in trace
result = func(*args, **kw)
File "/usr/lib/python2.6/site-packages/mock/plugins/tmpfs.py", line
36, in __init__
self.maxSize = self.conf['max_fs_size']
KeyError: 'max_fs_size'

Updating the mock config to set the options individually as per the
examples in site-defaults.cfg fixed that problem.

Paul.
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
 
Old 08-11-2010, 10:53 AM
Paul Howarth
 
Default First impressions of mock 1.1.3

This set of patches address the issues mentioned in this thread,
plus the missing "yum update" after unpacking the root cache as
raised in BZ#557526.

--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
 
Old 08-12-2010, 03:33 PM
Clark Williams
 
Default First impressions of mock 1.1.3

On Wed, 11 Aug 2010 11:53:56 +0100
Paul Howarth <paul@city-fan.org> wrote:

> This set of patches address the issues mentioned in this thread,
> plus the missing "yum update" after unpacking the root cache as
> raised in BZ#557526.
>
> --
> buildsys mailing list
> buildsys@lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/buildsys


Thanks Paul, I'd already caught the i586 one, but the others I've
pulled into my tree for an upcoming 1.1.4 release.

Clark
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
 
Old 08-12-2010, 09:23 PM
Clark Williams
 
Default First impressions of mock 1.1.3

On Thu, 12 Aug 2010 10:33:14 -0500
Clark Williams <williams@redhat.com> wrote:

> On Wed, 11 Aug 2010 11:53:56 +0100
> Paul Howarth <paul@city-fan.org> wrote:
>
> > This set of patches address the issues mentioned in this thread,
> > plus the missing "yum update" after unpacking the root cache as
> > raised in BZ#557526.
> >
> > --
> > buildsys mailing list
> > buildsys@lists.fedoraproject.org
> > https://admin.fedoraproject.org/mailman/listinfo/buildsys
>
>
> Thanks Paul, I'd already caught the i586 one, but the others I've
> pulled into my tree for an upcoming 1.1.4 release.
>
> Clark

Actually, looking at what I did and what you did with noarch and i586,
I ditched my changes for yours.

Clark
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
 
Old 08-13-2010, 03:29 PM
Shad Lords
 
Default First impressions of mock 1.1.3

On 8/12/2010 9:33 AM, Clark Williams wrote:
> Thanks Paul, I'd already caught the i586 one, but the others I've
> pulled into my tree for an upcoming 1.1.4 release.

Would it also be possible to backport the necessary changes to the 1.0
tree and push an updated version for that as well? I don't think the
1.1.[34] release is available for epel[45].

-Shad
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
 

Thread Tools




All times are GMT. The time now is 07:50 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org