Mwsec mock setup

From PDP/Grid Wiki
Revision as of 13:16, 5 August 2011 by Msalle@nikhef.nl (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

To set up a user-land mock configuration to use with the mwsec repository, type the following:

mkdir -p mock/config
ln -s /etc/mock/site-defaults.cfg mock/config/
ln -s /etc/mock/logging.ini mock/config/
ln -s mwsec-el5-x86_64.cfg mock/config/default.cfg
patch -o mock/config/mwsec-el5-i386.cfg /etc/mock/epel-5-i386.cfg << EOF
--- epel-5-i386.cfg     2011-08-05 13:50:28.036116189 +0200
+++ mwsec-el5-i386.cfg  2011-08-05 14:22:47.176301948 +0200
@@ -1,4 +1,4 @@
-config_opts['root'] = 'epel-5-i386'
+config_opts['root'] = 'mwsec-el5-i386'
 config_opts['target_arch'] = 'i386'
 config_opts['legal_host_arches'] = ('i386', 'i586', 'i686', 'x86_64')
 config_opts['chroot_setup_cmd'] = 'install buildsys-build'
@@ -41,6 +41,10 @@
 enabled=0
 mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=testing-epel5&arch=i386

+[mwsec]
+name=mwsec
+baseurl=http://software.nikhef.nl/dist/redhat/el5/mwsec/i386/
+
 [local]
 name=local
 baseurl=http://kojipkgs.fedoraproject.org/repos/dist-5E-epel-build/latest/i386/
EOF
patch -o mock/config/mwsec-el5-x86_64.cfg /etc/mock/epel-5-x86_64.cfg << EOF
--- epel-5-x86_64.cfg  2011-08-05 13:41:54.755416511 +0200
+++ mwsec-el5-x86_64.cfg       2011-08-05 14:22:53.274240003 +0200
@@ -1,4 +1,4 @@
-config_opts['root'] = 'epel-5-x86_64'
+config_opts['root'] = 'mwsec-el5-x86_64'
 config_opts['target_arch'] = 'x86_64'
 config_opts['legal_host_arches'] = ('x86_64',)
 config_opts['chroot_setup_cmd'] = 'install buildsys-build'
@@ -43,6 +43,10 @@
 enabled=0
 mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=testing-epel5&arch=x86_64
 
+[mwsec]
+name=mwsec
+baseurl=http://software.nikhef.nl/dist/redhat/el5/mwsec/x86_64/
+
 [local]
 name=local
 baseurl=http://kojipkgs.fedoraproject.org/repos/dist-5E-epel-build/latest/x86_64/
EOF

In order to use this configuration directory type

mock -r configuration --configdir=mock/config remaining arguments

where configuration is either mwsec-el5-x86_64 or mwsec-el5-i386.