Example #1
0
 def _MakeZip(self, output_path):
     """Creates a ZIP archive of the universal_root."""
     logging.info("Generating zip template file at %s", output_path)
     build_helpers.CleanDirectory(self.zip_out_dir)
     shutil.make_archive(os.path.join(self.zip_out_dir, self.pkg_name),
                         "zip",
                         base_dir=".",
                         root_dir=self.universal_root,
                         verbose=True)
     shutil.copy(os.path.join(self.zip_out_dir, f"{self.pkg_name}.zip"),
                 output_path)
Example #2
0
  def MakeExecutableTemplate(self, output_file):
    build_helpers.MakeBuildDirectory(context=self.context)
    build_helpers.CleanDirectory(self.package_dir)
    output_dir = build_helpers.BuildWithPyInstaller(context=self.context)

    _StripLibraries(output_dir)
    _CopyCommonRpmFiles(self.package_dir, output_dir)
    _CopyFleetspeakRpmFiles(self.package_dir, context=self.context)
    _CopyNonFleetspeakRpmFiles(self.package_dir)
    _CopyBundledFleetspeakFiles(self.fleetspeak_install_dir, self.package_dir)

    _MakeZip(self.package_dir, output_file)
Example #3
0
File: linux.py Project: syth3/grr
    def MakeExecutableTemplate(self, output_file):
        build_helpers.MakeBuildDirectory(context=self.context)
        build_helpers.CleanDirectory(self.package_dir)
        output_dir = build_helpers.BuildWithPyInstaller(context=self.context)

        _StripLibraries(output_dir)
        if self.fleetspeak_enabled:
            _CopyFleetspeakDpkgFiles(self.package_dir, context=self.context)
        else:
            _CopyNonFleetspeakDpkgFiles(output_dir, self.package_dir)

        _MakeZip(self.package_dir, output_file)
Example #4
0
    def MakeExecutableTemplate(self, output_path):
        """Create the executable template."""
        build_helpers.MakeBuildDirectory(context=self.context)
        build_helpers.BuildWithPyInstaller(context=self.context)

        self._SetBuildVars()
        build_helpers.CleanDirectory(self.universal_root)

        self._BuildInstallerPkg(fleetspeak_enabled=False,
                                fleetspeak_bundled=False)
        self._ExtractInstallerPkg("legacy")

        self._BuildInstallerPkg(fleetspeak_enabled=True,
                                fleetspeak_bundled=False)
        self._ExtractInstallerPkg("fleetspeak-enabled")

        self._BuildInstallerPkg(fleetspeak_enabled=True,
                                fleetspeak_bundled=True)
        self._ExtractInstallerPkg("fleetspeak-bundled")

        self._WriteBuildYaml()
        self._MakeZip(output_path)
Example #5
0
 def _MakeBuildDirectory(self):
     build_helpers.CleanDirectory(self.pkg_root)
     build_helpers.CleanDirectory(self.pkgbuild_out_dir)
     build_helpers.CleanDirectory(self.prodbuild_out_dir)
     self.script_dir = os.path.join(self.build_dir, "scripts")
     build_helpers.CleanDirectory(self.script_dir)