Changes

Jump to navigation Jump to search
1,572 bytes added ,  17:03, 31 December 2014
no edit summary
Line 14: Line 14:     
The build_installer and build_ISO expect to be run from a directory that points to the head of the stage (ex. /build/stage/8).  This is usually a symlink to 8.1 or 8.1beta1.  The script fully expands the symlink and pulls off the last element to figure out what version we are going to build.
 
The build_installer and build_ISO expect to be run from a directory that points to the head of the stage (ex. /build/stage/8).  This is usually a symlink to 8.1 or 8.1beta1.  The script fully expands the symlink and pulls off the last element to figure out what version we are going to build.
  −
====mock plugin : iso_prepare====
  −
You have to install a new plugin for mock : Iso_prepare<br />
  −
  −
copy the content of http://bugs.contribs.org/attachment.cgi?id=4059 and paste it in
  −
sudo vim  /usr/lib/python2.6/site-packages/mockbuild/plugins/iso_prepare.py
      
====Folder structure, both local and buildsys====
 
====Folder structure, both local and buildsys====
Line 29: Line 23:  
  ~/smeserver contains a local mirror  
 
  ~/smeserver contains a local mirror  
 
  ~/rpms is rpms from CVS
 
  ~/rpms is rpms from CVS
 +
 +
====mock plugin : iso_prepare====
 +
You have to install a new plugin for mock : Iso_prepare<br />
 +
 +
copy the content of http://bugs.contribs.org/attachment.cgi?id=4059 and paste it in
 +
sudo vim  /usr/lib/python2.6/site-packages/mockbuild/plugins/iso_prepare.py
    
====update_repos====
 
====update_repos====
 
+
update_repos relies on RPM2 which can be found as an RPM.
 +
yum install perl-RPM2 --enablerepo=epel
 
update_repos (/build/smeserver/stage/bin/update_repos) is used to keep the repos in sync and to create the ‘stage’ from which the ISO is built. On the local build system update_repos can be run manually before building an ISO, whereas it runs every two hours on the buildsys.
 
update_repos (/build/smeserver/stage/bin/update_repos) is used to keep the repos in sync and to create the ‘stage’ from which the ISO is built. On the local build system update_repos can be run manually before building an ISO, whereas it runs every two hours on the buildsys.
 
+
{{Note box|Note that update_repos copies smeupdates-testing packages to stage but not from smetest.}}
 
The buildsys has two main folders that are relevant for building an ISO.
 
The buildsys has two main folders that are relevant for building an ISO.
 
  repo      => '/build/smeserver/repo/ ', eg '/build/smeserver/repo/testing/9/'
 
  repo      => '/build/smeserver/repo/ ', eg '/build/smeserver/repo/testing/9/'
Line 41: Line 42:  
* '''stage''' is the working directory. Note that update_repos expects the folder structure to be in place.  
 
* '''stage''' is the working directory. Note that update_repos expects the folder structure to be in place.  
   −
update_repos relies on RPM2 which can be found as an RPM.
   
It also needs all GPG keys for every package that it sees, it can take a while to find them all.
 
It also needs all GPG keys for every package that it sees, it can take a while to find them all.
yum install perl-RPM2 --enablerepo=epel
  −
{{Note box|Note that update_repos copies smeupdates-testing packages to stage but not from smetest.}}
      
===='''Local Only''': Create the repo folder and the binary program folder====
 
===='''Local Only''': Create the repo folder and the binary program folder====
Line 56: Line 54:  
  /bin/cp ~/builds_bin/* /build/smeserver/stage/bin
 
  /bin/cp ~/builds_bin/* /build/smeserver/stage/bin
   −
====Building the SME Server ISOs====
+
====Mock Special Settings====
{{Note box|Note I needed to edit mock cfg file to include /build in the chroot due to my local setup.}}
+
{{Note box|Due to local settings you have to edit each configuration of mock and edit '''smeserver-X-{i386,x86_64}-iso.cfg''' files to include /build in the chroot}}
There is also an update to /usr/lib/python2.6/site-packages/mockbuild/mounts.py see http://bugs.contribs.org/show_bug.cgi?id=7675#c61
+
:''These are the changes that you need to made if you do not have the nfs mounts on my local machine
 +
config_opts['plugin_conf']['mount_opts']['dirs'].append(('storage:/export/build', '/build', 'nfs', 'defaults,noatime,nodiratime,nosuid'))
 +
config_opts['plugin_conf']['mount_opts']['dirs'].append(('storage:/mirrors', '/mirrors', 'nfs', 'defaults,noatime,nodiratime,nosuid'))
 +
 
 +
''with''
 +
#config_opts['plugin_conf']['mount_opts']['dirs'].append(('storage:/export/build', '/build', 'nfs', 'defaults,noatime,nodiratime,nosuid'))
 +
#config_opts['plugin_conf']['mount_opts']['dirs'].append(('storage:/mirrors', '/mirrors', 'nfs', 'defaults,noatime,nodiratime,nosuid'))
 +
config_opts['plugin_conf']['bind_mount_opts']['dirs'].append(('/build', '/build' ))
 +
 
 +
====Patch a Mock Plugin====
 +
There is also an update to /usr/lib/python2.6/site-packages/mockbuild/mounts.py that needs to happen so loop devices get mounted correctly. Check /var/lib/mock/smeserver-VERSION-ARCH/result/root.log after mock -r smeserver-VERSION-ARCH-iso --init (eg mock -r smeserver-8-i386-iso --init). The mounting of the /dev/loopX should pass (return code 0). If it fails (return code 32) then the patch below is needed on your build host. see http://bugs.contribs.org/show_bug.cgi?id=7675#c61
 +
 
 +
vim /usr/lib/python2.6/site-packages/mockbuild/mounts.py
 +
 
 +
@@ -83,6 +83,9 @@
 +
    decorate(traceLog())
 +
    def mount(self):
 +
+        if not os.path.isdir(self.srcpath) and not os.path.isfile(self.srcpath):
 +
+            mockbuild.util.touch(self.bindpath)
 +
+
 +
        if not self.mounted:
 +
            cmd = ['/bin/mount', '-n',
 +
                    '--bind', self.srcpath, self.bindpath ]
    
===Preparation for a new ISO release===
 
===Preparation for a new ISO release===

Navigation menu