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 03-07-2011, 07:17 PM
Ville Skyttä
 
Default Run yum commands without shell, as sequences instead of strings.

Fixes shell escaping issues like in '--install "perl(Foo::Bar)"'. The
"canonical" syntax for chroot_setup_cmd in configs is now a tuple or a
list, but a string is still accepted for backwards compatibility (it
gets split to list internally).
---
etc/mock/epel-4-i386.cfg | 2 +-
etc/mock/epel-4-ppc.cfg | 2 +-
etc/mock/epel-4-x86_64.cfg | 2 +-
etc/mock/epel-5-i386.cfg | 2 +-
etc/mock/epel-5-ppc.cfg | 2 +-
etc/mock/epel-5-x86_64.cfg | 2 +-
etc/mock/epel-6-i386.cfg | 2 +-
etc/mock/epel-6-ppc64.cfg | 2 +-
etc/mock/epel-6-x86_64.cfg | 2 +-
etc/mock/fedora-13-i386.cfg | 2 +-
etc/mock/fedora-13-ppc.cfg | 2 +-
etc/mock/fedora-13-ppc64.cfg | 2 +-
etc/mock/fedora-13-s390x.cfg | 2 +-
etc/mock/fedora-13-sparc.cfg | 2 +-
etc/mock/fedora-13-sparc64.cfg | 2 +-
etc/mock/fedora-13-x86_64.cfg | 2 +-
etc/mock/fedora-14-i386.cfg | 2 +-
etc/mock/fedora-14-ppc.cfg | 2 +-
etc/mock/fedora-14-ppc64.cfg | 2 +-
etc/mock/fedora-14-s390x.cfg | 2 +-
etc/mock/fedora-14-sparc.cfg | 2 +-
etc/mock/fedora-14-sparc64.cfg | 2 +-
etc/mock/fedora-14-x86_64.cfg | 2 +-
etc/mock/fedora-15-arm.cfg | 2 +-
etc/mock/fedora-15-i386.cfg | 2 +-
etc/mock/fedora-15-ppc.cfg | 2 +-
etc/mock/fedora-15-ppc64.cfg | 2 +-
etc/mock/fedora-15-s390.cfg | 2 +-
etc/mock/fedora-15-s390x.cfg | 2 +-
etc/mock/fedora-15-sparc.cfg | 2 +-
etc/mock/fedora-15-sparc64.cfg | 2 +-
etc/mock/fedora-15-x86_64.cfg | 2 +-
etc/mock/fedora-rawhide-arm.cfg | 2 +-
etc/mock/fedora-rawhide-i386.cfg | 2 +-
etc/mock/fedora-rawhide-ppc.cfg | 2 +-
etc/mock/fedora-rawhide-ppc64.cfg | 2 +-
etc/mock/fedora-rawhide-s390x.cfg | 2 +-
etc/mock/fedora-rawhide-sparc.cfg | 2 +-
etc/mock/fedora-rawhide-sparc64.cfg | 2 +-
etc/mock/fedora-rawhide-x86_64.cfg | 2 +-
etc/mock/site-defaults.cfg | 2 +-
py/mock.py | 2 +-
py/mock/backend.py | 50 +++++++++++++++++++----------------
py/mock/plugins/ccache.py | 2 +-
44 files changed, 70 insertions(+), 66 deletions(-)

diff --git a/etc/mock/epel-4-i386.cfg b/etc/mock/epel-4-i386.cfg
index 1e61efc..1ca05ec 100644
--- a/etc/mock/epel-4-i386.cfg
+++ b/etc/mock/epel-4-i386.cfg
@@ -1,7 +1,7 @@
config_opts['root'] = 'epel-4-i386'
config_opts['target_arch'] = 'i386'
config_opts['legal_host_arches'] = ('i386', 'i586', 'i686', 'x86_64')
-config_opts['chroot_setup_cmd'] = 'install buildsys-build'
+config_opts['chroot_setup_cmd'] = ('install', 'buildsys-build')
config_opts['dist'] = 'el4' # only useful for --resultdir variable subst

# ccache not available on epel4
diff --git a/etc/mock/epel-4-ppc.cfg b/etc/mock/epel-4-ppc.cfg
index 6c91921..899d26e 100644
--- a/etc/mock/epel-4-ppc.cfg
+++ b/etc/mock/epel-4-ppc.cfg
@@ -1,7 +1,7 @@
config_opts['root'] = 'epel-4-ppc'
config_opts['target_arch'] = 'ppc'
config_opts['legal_host_arches'] = ('ppc', 'ppc64')
-config_opts['chroot_setup_cmd'] = 'install buildsys-build'
+config_opts['chroot_setup_cmd'] = ('install', 'buildsys-build')
config_opts['dist'] = 'el4' # only useful for --resultdir variable subst

# ccache not available on epel4
diff --git a/etc/mock/epel-4-x86_64.cfg b/etc/mock/epel-4-x86_64.cfg
index 69d93bd..b8de1ec 100644
--- a/etc/mock/epel-4-x86_64.cfg
+++ b/etc/mock/epel-4-x86_64.cfg
@@ -1,7 +1,7 @@
config_opts['root'] = 'epel-4-x86_64'
config_opts['target_arch'] = 'x86_64'
config_opts['legal_host_arches'] = ('x86_64',)
-config_opts['chroot_setup_cmd'] = 'install buildsys-build'
+config_opts['chroot_setup_cmd'] = ('install', 'buildsys-build')
config_opts['dist'] = 'el4' # only useful for --resultdir variable subst

# ccache not available on epel4
diff --git a/etc/mock/epel-5-i386.cfg b/etc/mock/epel-5-i386.cfg
index c6fdb29..fca6068 100644
--- a/etc/mock/epel-5-i386.cfg
+++ b/etc/mock/epel-5-i386.cfg
@@ -1,7 +1,7 @@
config_opts['root'] = 'epel-5-i386'
config_opts['target_arch'] = 'i386'
config_opts['legal_host_arches'] = ('i386', 'i586', 'i686', 'x86_64')
-config_opts['chroot_setup_cmd'] = 'install buildsys-build'
+config_opts['chroot_setup_cmd'] = ('install', 'buildsys-build')
config_opts['dist'] = 'el5' # only useful for --resultdir variable subst

config_opts['yum.conf'] = """
diff --git a/etc/mock/epel-5-ppc.cfg b/etc/mock/epel-5-ppc.cfg
index 02f31dd..5f40c52 100644
--- a/etc/mock/epel-5-ppc.cfg
+++ b/etc/mock/epel-5-ppc.cfg
@@ -1,7 +1,7 @@
config_opts['root'] = 'epel-5-ppc'
config_opts['target_arch'] = 'ppc'
config_opts['legal_host_arches'] = ('ppc', 'ppc64')
-config_opts['chroot_setup_cmd'] = 'install buildsys-build'
+config_opts['chroot_setup_cmd'] = ('install', 'buildsys-build')
config_opts['dist'] = 'el5' # only useful for --resultdir variable subst

config_opts['yum.conf'] = """
diff --git a/etc/mock/epel-5-x86_64.cfg b/etc/mock/epel-5-x86_64.cfg
index d803f26..6440c19 100644
--- a/etc/mock/epel-5-x86_64.cfg
+++ b/etc/mock/epel-5-x86_64.cfg
@@ -1,7 +1,7 @@
config_opts['root'] = 'epel-5-x86_64'
config_opts['target_arch'] = 'x86_64'
config_opts['legal_host_arches'] = ('x86_64',)
-config_opts['chroot_setup_cmd'] = 'install buildsys-build'
+config_opts['chroot_setup_cmd'] = ('install', 'buildsys-build')
config_opts['dist'] = 'el5' # only useful for --resultdir variable subst

config_opts['yum.conf'] = """
diff --git a/etc/mock/epel-6-i386.cfg b/etc/mock/epel-6-i386.cfg
index 7cd7419..a78eea1 100644
--- a/etc/mock/epel-6-i386.cfg
+++ b/etc/mock/epel-6-i386.cfg
@@ -1,7 +1,7 @@
config_opts['root'] = 'epel-6-i386'
config_opts['target_arch'] = 'i686'
config_opts['legal_host_arches'] = ('i386', 'i586', 'i686', 'x86_64')
-config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
+config_opts['chroot_setup_cmd'] = ('groupinstall', 'buildsys-build')
config_opts['dist'] = 'el6' # only useful for --resultdir variable subst

config_opts['yum.conf'] = """
diff --git a/etc/mock/epel-6-ppc64.cfg b/etc/mock/epel-6-ppc64.cfg
index 0cdd7cf..6959684 100644
--- a/etc/mock/epel-6-ppc64.cfg
+++ b/etc/mock/epel-6-ppc64.cfg
@@ -1,7 +1,7 @@
config_opts['root'] = 'epel-6-ppc64'
config_opts['target_arch'] = 'ppc64'
config_opts['legal_host_arches'] = ('ppc64',)
-config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
+config_opts['chroot_setup_cmd'] = ('groupinstall', 'buildsys-build')
config_opts['dist'] = 'el6' # only useful for --resultdir variable subst

config_opts['yum.conf'] = """
diff --git a/etc/mock/epel-6-x86_64.cfg b/etc/mock/epel-6-x86_64.cfg
index b4bdabb..e85d434 100644
--- a/etc/mock/epel-6-x86_64.cfg
+++ b/etc/mock/epel-6-x86_64.cfg
@@ -1,7 +1,7 @@
config_opts['root'] = 'epel-6-x86_64'
config_opts['target_arch'] = 'x86_64'
config_opts['legal_host_arches'] = ('x86_64',)
-config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
+config_opts['chroot_setup_cmd'] = ('groupinstall', 'buildsys-build')
config_opts['dist'] = 'el6' # only useful for --resultdir variable subst

config_opts['yum.conf'] = """
diff --git a/etc/mock/fedora-13-i386.cfg b/etc/mock/fedora-13-i386.cfg
index 7d5231c..d360077 100644
--- a/etc/mock/fedora-13-i386.cfg
+++ b/etc/mock/fedora-13-i386.cfg
@@ -1,7 +1,7 @@
config_opts['root'] = 'fedora-13-i386'
config_opts['target_arch'] = 'i686'
config_opts['legal_host_arches'] = ('i386', 'i586', 'i686', 'x86_64')
-config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
+config_opts['chroot_setup_cmd'] = ('groupinstall', 'buildsys-build')
config_opts['dist'] = 'fc13' # only useful for --resultdir variable subst

config_opts['yum.conf'] = """
diff --git a/etc/mock/fedora-13-ppc.cfg b/etc/mock/fedora-13-ppc.cfg
index db14448..0ef91b1 100644
--- a/etc/mock/fedora-13-ppc.cfg
+++ b/etc/mock/fedora-13-ppc.cfg
@@ -1,7 +1,7 @@
config_opts['root'] = 'fedora-13-ppc'
config_opts['target_arch'] = 'ppc'
config_opts['legal_host_arches'] = ('ppc', 'ppc64')
-config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
+config_opts['chroot_setup_cmd'] = ('groupinstall', 'buildsys-build')
config_opts['dist'] = 'fc13' # only useful for --resultdir variable subst

config_opts['yum.conf'] = """
diff --git a/etc/mock/fedora-13-ppc64.cfg b/etc/mock/fedora-13-ppc64.cfg
index c627ed5..9fb0fc2 100644
--- a/etc/mock/fedora-13-ppc64.cfg
+++ b/etc/mock/fedora-13-ppc64.cfg
@@ -1,7 +1,7 @@
config_opts['root'] = 'fedora-13-ppc64'
config_opts['target_arch'] = 'ppc64'
config_opts['legal_host_arches'] = ('ppc64',)
-config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
+config_opts['chroot_setup_cmd'] = ('groupinstall', 'buildsys-build')
config_opts['dist'] = 'fc13' # only useful for --resultdir variable subst

config_opts['yum.conf'] = """
diff --git a/etc/mock/fedora-13-s390x.cfg b/etc/mock/fedora-13-s390x.cfg
index eb998c0..5122697 100644
--- a/etc/mock/fedora-13-s390x.cfg
+++ b/etc/mock/fedora-13-s390x.cfg
@@ -1,7 +1,7 @@
config_opts['root'] = 'fedora-13-s390x'
config_opts['target_arch'] = 's390x'
config_opts['legal_host_arches'] = ('s390x',)
-config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
+config_opts['chroot_setup_cmd'] = ('groupinstall', 'buildsys-build')
config_opts['dist'] = 'fc13' # only useful for --resultdir variable subst

config_opts['yum.conf'] = """
diff --git a/etc/mock/fedora-13-sparc.cfg b/etc/mock/fedora-13-sparc.cfg
index 0d23cc2..8dd6d92 100644
--- a/etc/mock/fedora-13-sparc.cfg
+++ b/etc/mock/fedora-13-sparc.cfg
@@ -1,7 +1,7 @@
config_opts['root'] = 'fedora-13-sparc'
config_opts['target_arch'] = 'sparcv9'
config_opts['legal_host_arches'] = ('sparc', 'sparcv9', 'sparc64')
-config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
+config_opts['chroot_setup_cmd'] = ('groupinstall', 'buildsys-build')
config_opts['dist'] = 'fc13' # only useful for --resultdir variable subst

config_opts['yum.conf'] = """
diff --git a/etc/mock/fedora-13-sparc64.cfg b/etc/mock/fedora-13-sparc64.cfg
index 9591f64..392aa4a 100644
--- a/etc/mock/fedora-13-sparc64.cfg
+++ b/etc/mock/fedora-13-sparc64.cfg
@@ -1,7 +1,7 @@
config_opts['root'] = 'fedora-13-sparc64'
config_opts['target_arch'] = 'sparc64'
config_opts['legal_host_arches'] = ('sparc64',)
-config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
+config_opts['chroot_setup_cmd'] = ('groupinstall', 'buildsys-build')
config_opts['dist'] = 'fc13' # only useful for --resultdir variable subst

config_opts['yum.conf'] = """
diff --git a/etc/mock/fedora-13-x86_64.cfg b/etc/mock/fedora-13-x86_64.cfg
index 9cf892d..2cf0b8c 100644
--- a/etc/mock/fedora-13-x86_64.cfg
+++ b/etc/mock/fedora-13-x86_64.cfg
@@ -1,7 +1,7 @@
config_opts['root'] = 'fedora-13-x86_64'
config_opts['target_arch'] = 'x86_64'
config_opts['legal_host_arches'] = ('x86_64',)
-config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
+config_opts['chroot_setup_cmd'] = ('groupinstall', 'buildsys-build')
config_opts['dist'] = 'fc13' # only useful for --resultdir variable subst

config_opts['yum.conf'] = """
diff --git a/etc/mock/fedora-14-i386.cfg b/etc/mock/fedora-14-i386.cfg
index 52b4c7c..f2dc50f 100644
--- a/etc/mock/fedora-14-i386.cfg
+++ b/etc/mock/fedora-14-i386.cfg
@@ -1,7 +1,7 @@
config_opts['root'] = 'fedora-14-i386'
config_opts['target_arch'] = 'i686'
config_opts['legal_host_arches'] = ('i386', 'i586', 'i686', 'x86_64')
-config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
+config_opts['chroot_setup_cmd'] = ('groupinstall', 'buildsys-build')
config_opts['dist'] = 'fc14' # only useful for --resultdir variable subst

config_opts['yum.conf'] = """
diff --git a/etc/mock/fedora-14-ppc.cfg b/etc/mock/fedora-14-ppc.cfg
index aec4928..56b1827 100644
--- a/etc/mock/fedora-14-ppc.cfg
+++ b/etc/mock/fedora-14-ppc.cfg
@@ -1,7 +1,7 @@
config_opts['root'] = 'fedora-14-ppc'
config_opts['target_arch'] = 'ppc'
config_opts['legal_host_arches'] = ('ppc', 'ppc64')
-config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
+config_opts['chroot_setup_cmd'] = ('groupinstall', 'buildsys-build')
config_opts['dist'] = 'fc14' # only useful for --resultdir variable subst

config_opts['yum.conf'] = """
diff --git a/etc/mock/fedora-14-ppc64.cfg b/etc/mock/fedora-14-ppc64.cfg
index bbcd630..3b05a9b 100644
--- a/etc/mock/fedora-14-ppc64.cfg
+++ b/etc/mock/fedora-14-ppc64.cfg
@@ -1,7 +1,7 @@
config_opts['root'] = 'fedora-14-ppc64'
config_opts['target_arch'] = 'ppc64'
config_opts['legal_host_arches'] = ('ppc64',)
-config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
+config_opts['chroot_setup_cmd'] = ('groupinstall', 'buildsys-build')
config_opts['dist'] = 'fc14' # only useful for --resultdir variable subst

config_opts['yum.conf'] = """
diff --git a/etc/mock/fedora-14-s390x.cfg b/etc/mock/fedora-14-s390x.cfg
index a176e38..68496e0 100644
--- a/etc/mock/fedora-14-s390x.cfg
+++ b/etc/mock/fedora-14-s390x.cfg
@@ -1,7 +1,7 @@
config_opts['root'] = 'fedora-14-s390x'
config_opts['target_arch'] = 's390x'
config_opts['legal_host_arches'] = ('s390x',)
-config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
+config_opts['chroot_setup_cmd'] = ('groupinstall', 'buildsys-build')
config_opts['dist'] = 'fc14' # only useful for --resultdir variable subst

config_opts['yum.conf'] = """
diff --git a/etc/mock/fedora-14-sparc.cfg b/etc/mock/fedora-14-sparc.cfg
index a266e56..9823b1b 100644
--- a/etc/mock/fedora-14-sparc.cfg
+++ b/etc/mock/fedora-14-sparc.cfg
@@ -1,7 +1,7 @@
config_opts['root'] = 'fedora-14-sparc'
config_opts['target_arch'] = 'sparcv9'
config_opts['legal_host_arches'] = ('sparc', 'sparcv9', 'sparc64')
-config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
+config_opts['chroot_setup_cmd'] = ('groupinstall', 'buildsys-build')
config_opts['dist'] = 'fc14' # only useful for --resultdir variable subst

config_opts['yum.conf'] = """
diff --git a/etc/mock/fedora-14-sparc64.cfg b/etc/mock/fedora-14-sparc64.cfg
index 4987484..29d1c3a 100644
--- a/etc/mock/fedora-14-sparc64.cfg
+++ b/etc/mock/fedora-14-sparc64.cfg
@@ -1,7 +1,7 @@
config_opts['root'] = 'fedora-14-sparc64'
config_opts['target_arch'] = 'sparc64'
config_opts['legal_host_arches'] = ('sparc64',)
-config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
+config_opts['chroot_setup_cmd'] = ('groupinstall', 'buildsys-build')
config_opts['dist'] = 'fc14' # only useful for --resultdir variable subst

config_opts['yum.conf'] = """
diff --git a/etc/mock/fedora-14-x86_64.cfg b/etc/mock/fedora-14-x86_64.cfg
index 30ea313..3a951c9 100644
--- a/etc/mock/fedora-14-x86_64.cfg
+++ b/etc/mock/fedora-14-x86_64.cfg
@@ -1,7 +1,7 @@
config_opts['root'] = 'fedora-14-x86_64'
config_opts['target_arch'] = 'x86_64'
config_opts['legal_host_arches'] = ('x86_64',)
-config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
+config_opts['chroot_setup_cmd'] = ('groupinstall', 'buildsys-build')
config_opts['dist'] = 'fc14' # only useful for --resultdir variable subst

config_opts['yum.conf'] = """
diff --git a/etc/mock/fedora-15-arm.cfg b/etc/mock/fedora-15-arm.cfg
index 186715e..509dcbe 100644
--- a/etc/mock/fedora-15-arm.cfg
+++ b/etc/mock/fedora-15-arm.cfg
@@ -1,7 +1,7 @@
config_opts['root'] = 'fedora-15-arm'
config_opts['target_arch'] = 'armv5tel'
config_opts['legal_host_arches'] = ('armv5tel', 'armv6l', 'armv7l')
-config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
+config_opts['chroot_setup_cmd'] = ('groupinstall', 'buildsys-build')
config_opts['dist'] = 'fc15' # only useful for --resultdir variable subst

config_opts['yum.conf'] = """
diff --git a/etc/mock/fedora-15-i386.cfg b/etc/mock/fedora-15-i386.cfg
index 04684aa..b31ee07 100644
--- a/etc/mock/fedora-15-i386.cfg
+++ b/etc/mock/fedora-15-i386.cfg
@@ -1,7 +1,7 @@
config_opts['root'] = 'fedora-15-i386'
config_opts['target_arch'] = 'i686'
config_opts['legal_host_arches'] = ('i386', 'i586', 'i686', 'x86_64')
-config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
+config_opts['chroot_setup_cmd'] = ('groupinstall', 'buildsys-build')
config_opts['dist'] = 'fc15' # only useful for --resultdir variable subst

config_opts['yum.conf'] = """
diff --git a/etc/mock/fedora-15-ppc.cfg b/etc/mock/fedora-15-ppc.cfg
index 511c50d..c141abe 100644
--- a/etc/mock/fedora-15-ppc.cfg
+++ b/etc/mock/fedora-15-ppc.cfg
@@ -1,7 +1,7 @@
config_opts['root'] = 'fedora-15-ppc'
config_opts['target_arch'] = 'ppc'
config_opts['legal_host_arches'] = ('ppc', 'ppc64')
-config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
+config_opts['chroot_setup_cmd'] = ('groupinstall', 'buildsys-build')
config_opts['dist'] = 'fc15' # only useful for --resultdir variable subst

config_opts['yum.conf'] = """
diff --git a/etc/mock/fedora-15-ppc64.cfg b/etc/mock/fedora-15-ppc64.cfg
index d39a48e..9ce7599 100644
--- a/etc/mock/fedora-15-ppc64.cfg
+++ b/etc/mock/fedora-15-ppc64.cfg
@@ -1,7 +1,7 @@
config_opts['root'] = 'fedora-15-ppc64'
config_opts['target_arch'] = 'ppc64'
config_opts['legal_host_arches'] = ('ppc64',)
-config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
+config_opts['chroot_setup_cmd'] = ('groupinstall', 'buildsys-build')
config_opts['dist'] = 'fc15' # only useful for --resultdir variable subst

config_opts['yum.conf'] = """
diff --git a/etc/mock/fedora-15-s390.cfg b/etc/mock/fedora-15-s390.cfg
index cfb8957..32d1672 100644
--- a/etc/mock/fedora-15-s390.cfg
+++ b/etc/mock/fedora-15-s390.cfg
@@ -1,7 +1,7 @@
config_opts['root'] = 'fedora-15-s390'
config_opts['target_arch'] = 's390'
config_opts['legal_host_arches'] = ('s390x', 's390')
-config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
+config_opts['chroot_setup_cmd'] = ('groupinstall', 'buildsys-build')
config_opts['dist'] = 'fc15' # only useful for --resultdir variable subst

config_opts['yum.conf'] = """
diff --git a/etc/mock/fedora-15-s390x.cfg b/etc/mock/fedora-15-s390x.cfg
index 7547116..c6c3e09 100644
--- a/etc/mock/fedora-15-s390x.cfg
+++ b/etc/mock/fedora-15-s390x.cfg
@@ -1,7 +1,7 @@
config_opts['root'] = 'fedora-15-s390x'
config_opts['target_arch'] = 's390x'
config_opts['legal_host_arches'] = ('s390x',)
-config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
+config_opts['chroot_setup_cmd'] = ('groupinstall', 'buildsys-build')
config_opts['dist'] = 'fc15' # only useful for --resultdir variable subst

config_opts['yum.conf'] = """
diff --git a/etc/mock/fedora-15-sparc.cfg b/etc/mock/fedora-15-sparc.cfg
index a8046f8..8758488 100644
--- a/etc/mock/fedora-15-sparc.cfg
+++ b/etc/mock/fedora-15-sparc.cfg
@@ -1,7 +1,7 @@
config_opts['root'] = 'fedora-15-sparc'
config_opts['target_arch'] = 'sparcv9'
config_opts['legal_host_arches'] = ('sparc', 'sparcv9', 'sparc64')
-config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
+config_opts['chroot_setup_cmd'] = ('groupinstall', 'buildsys-build')
config_opts['dist'] = 'fc15' # only useful for --resultdir variable subst

config_opts['yum.conf'] = """
diff --git a/etc/mock/fedora-15-sparc64.cfg b/etc/mock/fedora-15-sparc64.cfg
index 6dea995..c8cffc0 100644
--- a/etc/mock/fedora-15-sparc64.cfg
+++ b/etc/mock/fedora-15-sparc64.cfg
@@ -1,7 +1,7 @@
config_opts['root'] = 'fedora-15-sparc64'
config_opts['target_arch'] = 'sparc64'
config_opts['legal_host_arches'] = ('sparc64',)
-config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
+config_opts['chroot_setup_cmd'] = ('groupinstall', 'buildsys-build')
config_opts['dist'] = 'fc15' # only useful for --resultdir variable subst

config_opts['yum.conf'] = """
diff --git a/etc/mock/fedora-15-x86_64.cfg b/etc/mock/fedora-15-x86_64.cfg
index 058ad43..0024e46 100644
--- a/etc/mock/fedora-15-x86_64.cfg
+++ b/etc/mock/fedora-15-x86_64.cfg
@@ -1,7 +1,7 @@
config_opts['root'] = 'fedora-15-x86_64'
config_opts['target_arch'] = 'x86_64'
config_opts['legal_host_arches'] = ('x86_64',)
-config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
+config_opts['chroot_setup_cmd'] = ('groupinstall', 'buildsys-build')
config_opts['dist'] = 'fc15' # only useful for --resultdir variable subst

config_opts['yum.conf'] = """
diff --git a/etc/mock/fedora-rawhide-arm.cfg b/etc/mock/fedora-rawhide-arm.cfg
index ecbdb87..65fa37e 100644
--- a/etc/mock/fedora-rawhide-arm.cfg
+++ b/etc/mock/fedora-rawhide-arm.cfg
@@ -1,7 +1,7 @@
config_opts['root'] = 'fedora-rawhide-arm'
config_opts['target_arch'] = 'armv5tel'
config_opts['legal_host_arches'] = ('armv5tel', 'armv6l', 'armv7l')
-config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
+config_opts['chroot_setup_cmd'] = ('groupinstall', 'buildsys-build')
config_opts['dist'] = 'rawhide' # only useful for --resultdir variable subst

config_opts['yum.conf'] = """
diff --git a/etc/mock/fedora-rawhide-i386.cfg b/etc/mock/fedora-rawhide-i386.cfg
index f86a514..8ddb0f1 100644
--- a/etc/mock/fedora-rawhide-i386.cfg
+++ b/etc/mock/fedora-rawhide-i386.cfg
@@ -1,7 +1,7 @@
config_opts['root'] = 'fedora-rawhide-i386'
config_opts['target_arch'] = 'i686'
config_opts['legal_host_arches'] = ('i386', 'i586', 'i686', 'x86_64')
-config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
+config_opts['chroot_setup_cmd'] = ('groupinstall', 'buildsys-build')
config_opts['dist'] = 'rawhide' # only useful for --resultdir variable subst

config_opts['yum.conf'] = """
diff --git a/etc/mock/fedora-rawhide-ppc.cfg b/etc/mock/fedora-rawhide-ppc.cfg
index 51e12a8..f349e4e 100644
--- a/etc/mock/fedora-rawhide-ppc.cfg
+++ b/etc/mock/fedora-rawhide-ppc.cfg
@@ -1,7 +1,7 @@
config_opts['root'] = 'fedora-rawhide-ppc'
config_opts['target_arch'] = 'ppc'
config_opts['legal_host_arches'] = ('ppc', 'ppc64')
-config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
+config_opts['chroot_setup_cmd'] = ('groupinstall', 'buildsys-build')
config_opts['dist'] = 'rawhide' # only useful for --resultdir variable subst

config_opts['yum.conf'] = """
diff --git a/etc/mock/fedora-rawhide-ppc64.cfg b/etc/mock/fedora-rawhide-ppc64.cfg
index a9cd48d..68db2b3 100644
--- a/etc/mock/fedora-rawhide-ppc64.cfg
+++ b/etc/mock/fedora-rawhide-ppc64.cfg
@@ -1,7 +1,7 @@
config_opts['root'] = 'fedora-rawhide-ppc64'
config_opts['target_arch'] = 'ppc64'
config_opts['legal_host_arches'] = ('ppc64',)
-config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
+config_opts['chroot_setup_cmd'] = ('groupinstall', 'buildsys-build')
config_opts['dist'] = 'rawhide' # only useful for --resultdir variable subst

config_opts['yum.conf'] = """
diff --git a/etc/mock/fedora-rawhide-s390x.cfg b/etc/mock/fedora-rawhide-s390x.cfg
index 2fabb86..91039af 100644
--- a/etc/mock/fedora-rawhide-s390x.cfg
+++ b/etc/mock/fedora-rawhide-s390x.cfg
@@ -1,7 +1,7 @@
config_opts['root'] = 'fedora-rawhide-s390x'
config_opts['target_arch'] = 's390x'
config_opts['legal_host_arches'] = ('s390x',)
-config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
+config_opts['chroot_setup_cmd'] = ('groupinstall', 'buildsys-build')
config_opts['dist'] = 'rawhide' # only useful for --resultdir variable subst

config_opts['yum.conf'] = """
diff --git a/etc/mock/fedora-rawhide-sparc.cfg b/etc/mock/fedora-rawhide-sparc.cfg
index c1b8637..7493f77 100644
--- a/etc/mock/fedora-rawhide-sparc.cfg
+++ b/etc/mock/fedora-rawhide-sparc.cfg
@@ -1,7 +1,7 @@
config_opts['root'] = 'fedora-rawhide-sparc'
config_opts['target_arch'] = 'sparcv9'
config_opts['legal_host_arches'] = ('sparc', 'sparcv9', 'sparc64')
-config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
+config_opts['chroot_setup_cmd'] = ('groupinstall', 'buildsys-build')
config_opts['dist'] = 'rawhide' # only useful for --resultdir variable subst

config_opts['yum.conf'] = """
diff --git a/etc/mock/fedora-rawhide-sparc64.cfg b/etc/mock/fedora-rawhide-sparc64.cfg
index 776b60a..a52eb4e 100644
--- a/etc/mock/fedora-rawhide-sparc64.cfg
+++ b/etc/mock/fedora-rawhide-sparc64.cfg
@@ -1,7 +1,7 @@
config_opts['root'] = 'fedora-rawhide-sparc64'
config_opts['target_arch'] = 'sparc64'
config_opts['legal_host_arches'] = ('sparc64',)
-config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
+config_opts['chroot_setup_cmd'] = ('groupinstall', 'buildsys-build')
config_opts['dist'] = 'rawhide' # only useful for --resultdir variable subst

config_opts['yum.conf'] = """
diff --git a/etc/mock/fedora-rawhide-x86_64.cfg b/etc/mock/fedora-rawhide-x86_64.cfg
index c564092..575907e 100644
--- a/etc/mock/fedora-rawhide-x86_64.cfg
+++ b/etc/mock/fedora-rawhide-x86_64.cfg
@@ -1,7 +1,7 @@
config_opts['root'] = 'fedora-rawhide-x86_64'
config_opts['target_arch'] = 'x86_64'
config_opts['legal_host_arches'] = ('x86_64',)
-config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
+config_opts['chroot_setup_cmd'] = ('groupinstall', 'buildsys-build')
config_opts['dist'] = 'rawhide' # only useful for --resultdir variable subst

config_opts['yum.conf'] = """
diff --git a/etc/mock/site-defaults.cfg b/etc/mock/site-defaults.cfg
index 81df367..8bf62b3 100644
--- a/etc/mock/site-defaults.cfg
+++ b/etc/mock/site-defaults.cfg
@@ -112,7 +112,7 @@
# config_opts['yum.conf'] = '
#
# CAN SET, defaults usually work ok:
-# config_opts['chroot_setup_cmd'] = 'install buildsys-build'
+# config_opts['chroot_setup_cmd'] = ('install', 'buildsys-build')
# config_opts['log_config_file'] = 'logging.ini'
# config_opts['more_buildreqs']['srpm_name-version-release'] = 'dependencies'
# config_opts['macros']['Add_your_macro_name_here'] = "add macro value here"
diff --git a/py/mock.py b/py/mock.py
index 57bb173..8168612 100755
--- a/py/mock.py
+++ b/py/mock.py
@@ -325,7 +325,7 @@ def setup_default_config_opts(config_opts, unprivUid):
config_opts['useradd'] =
'/usr/sbin/useradd -o -m -u %(uid)s -g %(gid)s -d %(home)s -n %(user)s'
config_opts['use_host_resolv'] = True
- config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
+ config_opts['chroot_setup_cmd'] = ('groupinstall', 'buildsys-build')
config_opts['target_arch'] = 'i386'
config_opts['rpmbuild_arch'] = None # <-- None means set automatically from target_arch
config_opts['yum.conf'] = '
diff --git a/py/mock/backend.py b/py/mock/backend.py
index 3308a42..bf55955 100644
--- a/py/mock/backend.py
+++ b/py/mock/backend.py
@@ -36,7 +36,7 @@ class Root(object):
self._hooks = {}
self.chrootWasCached = False
self.chrootWasCleaned = False
- self.preExistingDeps = ""
+ self.preExistingDeps = []
self.logging_initialized = False
self.buildrootLock = None
self.version = config['version']
@@ -69,6 +69,9 @@ class Root(object):
self.use_host_resolv = config['use_host_resolv']
self.chroot_file_contents = config['files']
self.chroot_setup_cmd = config['chroot_setup_cmd']
+ if isinstance(self.chroot_setup_cmd, basestring):
+ # deprecated, supported for now for old config files and e.g. koji
+ self.chroot_setup_cmd = self.chroot_setup_cmd.split()
self.yum_path = '/usr/bin/yum'
self.yum_builddep_path = '/usr/bin/yum-builddep'
self.macros = config['macros']
@@ -354,7 +357,7 @@ class Root(object):
if self.chrootWasCleaned:
self.yum_init_install_output = self._yum(self.chroot_setup_cmd, returnOutput=1)
if self.chrootWasCached:
- self._yum('update', returnOutput=1)
+ self._yum(('update',), returnOutput=1)

# create user
self._makeBuildUser()
@@ -463,7 +466,7 @@ class Root(object):
self.root_log.info("installing package(s): %s" % " ".join(rpms))
try:
self._mountall()
- output = self._yum('install %s' % ' '.join(rpms), returnOutput=1)
+ output = self._yum(['install'] + list(rpms), returnOutput=1)
self.root_log.info(output)
finally:
self._umountall()
@@ -473,7 +476,7 @@ class Root(object):
"""use yum to update the chroot"""
try:
self._mountall()
- self._yum('update', returnOutput=1)
+ self._yum(('update',), returnOutput=1)
finally:
self._umountall()

@@ -490,20 +493,21 @@ class Root(object):
raise mock.exception.BuildError, "Bad build req: %s. Exiting." % line

# first, install pre-existing deps and configured additional ones
- arg_string = self.preExistingDeps
+ deps = list(self.preExistingDeps)
for hdr in mock.util.yieldSrpmHeaders(srpms, plainRpmOk=1):
# get text buildreqs
- for item in mock.util.getAddtlReqs(hdr, self.more_buildreqs):
- arg_string = arg_string + " '%s'" % item
- if arg_string != "":
+ deps.extend(mock.util.getAddtlReqs(hdr, self.more_buildreqs))
+ if deps:
# everything exists, okay, install them all.
- # pass build reqs (as strings) to installer
- _yum_and_check('resolvedep %s' % arg_string)
+ # pass build reqs to installer
+ args = ['resolvedep'] + deps
+ _yum_and_check(args)
# nothing made us exit, so we continue
- self._yum('install %s' % arg_string, returnOutput=1)
+ args[0] = 'install'
+ self._yum(args, returnOutput=1)

# install actual build dependencies
- _yum_and_check("builddep '%s'" % "' '".join(srpms))
+ _yum_and_check(['builddep'] + list(srpms))
finally:
self.uidManager.restorePrivs()

@@ -732,22 +736,22 @@ class Root(object):
decorate(traceLog())
def _yum(self, cmd, returnOutput=0):
"""use yum to install packages/package groups into the chroot"""
- # mock-helper yum --installroot=rootdir cmd
- cmdOpts = ""
- if not self.online:
- cmdOpts = "-C"

+ yumcmd = [self.yum_path]
+ cmdix = 0
# invoke yum-builddep instead of yum if cmd is builddep
- exepath = self.yum_path
- if cmd.startswith("builddep "):
- exepath = self.yum_builddep_path
- cmd = cmd[len("builddep "):]
- cmd = '%s --installroot %s %s %s' % (exepath, self.makeChrootPath(), cmdOpts, cmd)
- self.root_log.debug(cmd)
+ if cmd[0] == "builddep":
+ yumcmd[0] = self.yum_builddep_path
+ cmdix = 1
+ yumcmd.extend(('--installroot', self.makeChrootPath()))
+ if not self.online:
+ yumcmd.append("-C")
+ yumcmd.extend(cmd[cmdix:])
+ self.root_log.debug(yumcmd)
output = ""
try:
self._callHooks("preyum")
- output = mock.util.do(cmd, returnOutput=returnOutput, shell=True)
+ output = mock.util.do(yumcmd, returnOutput=returnOutput)
self._callHooks("postyum")
return output
except mock.exception.Error, e:
diff --git a/py/mock/plugins/ccache.py b/py/mock/plugins/ccache.py
index 04768f2..661eb5a 100644
--- a/py/mock/plugins/ccache.py
+++ b/py/mock/plugins/ccache.py
@@ -26,7 +26,7 @@ class CCache(object):
self.ccache_opts = conf
self.ccachePath = self.ccache_opts['dir'] % self.ccache_opts
rootObj.ccacheObj = self
- rootObj.preExistingDeps = rootObj.preExistingDeps + " ccache "
+ rootObj.preExistingDeps.append("ccache")
rootObj.addHook("prebuild", self._ccacheBuildHook)
rootObj.addHook("preinit", self._ccachePreInitHook)
rootObj.umountCmds.append('umount -n %s' % rootObj.makeChrootPath("/tmp/ccache"))
--
1.7.4

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

Thread Tools




All times are GMT. The time now is 04:42 PM.

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