def bootstrap(self): # Lets build the multistrap configuration file par = SafeConfigParser() par.add_section("General") par.set("General", "arch", config.arch()) par.set("General", "directory", config.rootfs()) par.set("General", "cleanup", str(True)) par.set("General", "noauth", str(not config.auth())) keyrings = config.keyrings() par.set("General", "bootstrap", " ".join(keyrings.keys())) repros = config.repros() par.set("General", "aptsources", " ".join(repros)) for repro in config.repros(): par.add_section(repro) par.set(repro, "keyring", keyrings[repro]) par.set(repro, "packages", "dash apt apt-utils " + " ".join(config.early_packages()) + " ".join(config.packages())) par.set(repro, "source", config.source(repro)) par.set(repro, "suite", config.suite(repro)) par.set(repro, "components", " ".join(config.components(repro))) par.write(self._msfile) self._msfile.close() r = host.runner cmds = ["multistrap", "-f", self._msfile.name] if r.run(cmds, stdoutfunc=self._stdout, stderrfunc=self._stderr) != 0: raise RaptzException("Multistrap main stage failed")
def bootstrap(self): """ Will install using debootstrap """ cmds=["debootstrap", "--variant="+self._variant] if config.arch(): cmds.append("--foreign") cmds.append("--arch="+config.arch()) if not config.auth(): cmds.append("--no-check-gpg") keyrings = config.keyrings() for keyring in keyrings: cmds.append("--keyring="+keyring) cmds.append(config.suite()) cmds.append(config.rootfs()) cmds.append(config.source()) cmds.append("/usr/share/debootstrap/scripts/testing") r = host.runner first = [cmds[0], "--print-debs", "--keep-debootstrap-dir" ] + cmds[1:] if r.run(first, stdoutfunc=self._setpaks, stderrfunc=self._stderr) != 0: raise RaptzException("Debootstrap pre stage failed") if r.run(cmds, stdoutfunc=self._stdout, stderrfunc=self._stderr) != 0: raise RaptzException("Debootstrap main stage failed")
def bootstrap(self): """ Will install using debootstrap """ cmds=["cdebootstrap", "--flavour="+self._flavour] if config.arch(): cmds.append("--foreign") cmds.append("--arch="+config.arch()) if not config.auth(): cmds.append("--allow-unauthenticated") keyrings = config.keyrings() for keyring in keyrings: cmds.append("--keyring="+keyring) cmds.append(config.suite()) cmds.append(config.rootfs()) cmds.append(config.source()) # cmds.append("/usr/share/debootstrap/scripts/testing") r = host.runner if r.run(cmds, stdoutfunc=self._stdout, stderrfunc=self._stderr) != 0: raise RaptzException("Debootstrap main stage failed")