Talk:Build an Official ISO

From SME Server
Revision as of 13:53, 31 December 2014 by Stephdl (talk | contribs)
Jump to navigationJump to search
  • Each installer and ISO needs to built on the corresponding version (cos5 for sme8 and cos6 for sme9).
This can be misleading. The build box can be the same, eg COS6 x64 for all ISOs, it is only the mock image that needs to match the ISO, and this is magically handled by the mock configs

For clarification read http://bugs.contribs.org/show_bug.cgi?id=7675#c37

'The corresponding version' refers to either a cos5 install or a cos5 mock env. Building packages does require the same 'corresponding version' You can't easily build sme8 packages on a cos6 box. But with mock you can because you can create a small chroot of cos5 to build the packages. We use the same trick to build the ISO. The ISO mock creates a minimal cos5 with the correct packages to build the ISO.


  • Note I needed to edit mock cfg file to include /build in the chroot due to my local setup.
These are the changes that I made as I do not have the nfs mounts on my local machine. I replaced

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']['bind_mount_opts']['dirs'].append(('/build', '/build' ))


Also note http://bugs.contribs.org/show_bug.cgi?id=7675#c61 (the segment below needs some formatting)

  • 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.

@@ -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 ]


  • For SME Server 8 check that anaconda-runtime was installed in the mock instance. For SME 8 the anaconda-runtime needs to be installed, check /usr/lib/anaconda-runtime/mk-images* exists in the mock instance after the mock --init. (check /var/lib/mock/smeserver-8-i386/root/usr/lib/anaconda-runtime)

If it does not then run the following, assuming i386 ARCH.

mock -r smeserver-8-i386-iso --cwd /build/smeserver/stage/8 --chroot /usr/bin/yum install anaconda-runtime


mock -r smeserver-8-i386-iso --cwd /build/smeserver/stage/8 --chroot /usr/bin/yum install anaconda-runtime

You can find logs of the iso build

/build/smeserver/stage/8/build_ISO.i386

&

/build/smeserver/stage/8/build_installer.i386
  • for sme9 modify /build/smeserver/stage/bin/build_installer --Stephdl (talk) 13:53, 31 December 2014 (CET)

L100

       /build/smeserver/repo/testing/$distrel/smeextras/$distarch/ \

in

       /build/smeserver/repo/$distrel/smeextras/$distarch/ \