Beispiel #1
0
class BuildHawkeyTest(RpgTestCase):

    def test_hawkey_project(self):
        self.base = Base()
        self.base.sack = self.base.load_dnf_sack()
        self.base.load_plugins()
        self.base.load_project_from_url(
            r"https://github.com/rpm-software-management/"
            "hawkey/archive/hawkey-0.5.7-1.tar.gz")
        self.base.spec.Name = "hawkey"
        self.base.spec.Version = "0.6.0"
        self.base.spec.Release = "1%{?snapshot}%{?dist}"
        self.base.spec.License = "LGPLv2+"
        self.base.spec.Summary = ("Library providing simplified "
                                  "C and Python API to libsolv")
        self.base.spec.description = ("A Library providing simplified "
                                      "C and Python API to libsolv.")
        self.base.spec.URL = (r"https://github.com/rpm-"
                              "software-management/%{name}")
        self.base.target_arch = "x86_64"
        self.base.target_distro = "fedora-22"
        self.base.fetch_repos(self.base.target_distro, self.base.target_arch)
        self.base.run_extracted_source_analysis()
        self.base.run_patched_source_analysis()
        self.base.spec.build.append(["make doc-man"])
        self.base.build_project()
        self.base.run_compiled_source_analysis()
        self.base.install_project()
        self.base.run_installed_source_analysis()
        self.base.build_srpm()
        self.assertTrue(self.base.srpm_path.exists())
        self.base.build_rpm_recover(
            self.base.target_distro, self.base.target_arch)
        os.remove(str(self.base.srpm_path))
        os.remove(str(self.base.spec_path))
Beispiel #2
0
class MavenBuildTest(RpgTestCase):
    def test_maven_project(self):
        self.base = Base()
        self.base.sack = self.base.load_dnf_sack()
        self.base.load_plugins()
        self.base.load_project_from_url(
            r"https://github.com/apache/commons-compress/archive/rel/1.10.zip")
        self.base.spec.Name = "commonsCompress"
        self.base.spec.Version = "1.10"
        self.base.spec.Release = "1"
        self.base.spec.License = "ASL 2.0"
        self.base.spec.Summary = (
            "Commons Compress is a Java library for working with various"
            "compression and archiving formats.")
        self.base.spec.description = (
            "The Apache Commons Compress library defines an API for working "
            "with ar, cpio, Unix dump, tar, zip, gzip, XZ, Pack200, bzip2, "
            "7z, arj, lzma, snappy, DEFLATE and Z files.")
        self.base.spec.URL = (
            r"http://commons.apache.org/proper/commons-compress/")
        self.base.target_arch = "x86_64"
        self.base.target_distro = "fedora-22"
        self.base.fetch_repos(self.base.target_distro, self.base.target_arch)
        self.base.run_extracted_source_analysis()
        self.base.run_patched_source_analysis()
        self.base.build_project()
        self.base.run_compiled_source_analysis()
        self.base.install_project()
        self.base.run_installed_source_analysis()
        self.base.build_srpm()
        self.assertTrue(self.base.srpm_path.exists())
        self.base.build_rpm_recover(self.base.target_distro,
                                    self.base.target_arch)
        os.remove(str(self.base.srpm_path))
        os.remove(str(self.base.spec_path))
Beispiel #3
0
def main():
    base = Base()
    app = QApplication(sys.argv)
    base.conf.parse_cmdline()
    if base.conf.load_dnf:
        base.sack = base.load_dnf_sack()
    base.load_plugins()
    wiz = Wizard(base)
    wiz.setObjectName("RPG")
    wiz.resize(850, 650)
    wiz.setMinimumSize(QtCore.QSize(850, 650))
    wiz.setMaximumSize(QtCore.QSize(850, 650))
    wiz.setBaseSize(QtCore.QSize(850, 650))
    wiz.show()

    logging.info('GUI loaded')
    sys.exit(app.exec_())
Beispiel #4
0
class BuildTest(RpgTestCase):

    def test_rpg_project(self):
        self.base = Base()
        self.base.sack = self.base.load_dnf_sack()
        self.base.load_plugins()
        self.base.load_project_from_url(
            "https://github.com/openSUSE/libsolv")
        self.base.spec.Name = "LibSolv"
        self.base.spec.Version = "0.6.11"
        self.base.spec.Release = "1%{?snapshot}%{?dist}"
        self.base.spec.License = "GPLv2"
        self.base.spec.Summary = "Library for solving repository info"
        self.base.spec.description = (
            "This is libsolv, a free package dependency solver "
            "using a satisfiability algorithm.")
        self.base.spec.URL = "https://github.com/openSUSE/libsolv"
        self.base.target_arch = "x86_64"
        self.base.target_distro = "fedora-22"
        self.base.fetch_repos(self.base.target_distro, self.base.target_arch)
        self.base.run_extracted_source_analysis()
        self.base.run_patched_source_analysis()
        self.base.spec.build = Command([
            r'cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo '
            r'-DENABLE_PERL=1 '
            r'-DENABLE_PYTHON=1 '
            r'-DENABLE_RUBY=1 '
            r'-DUSE_VENDORDIRS=1 '
            r'-DFEDORA=1 '
            r'-DENABLE_LZMA_COMPRESSION=1'
            "make"])
        self.base.build_project()
        self.base.run_compiled_source_analysis()
        self.base.install_project()
        self.base.run_installed_source_analysis()
        self.base.build_srpm()
        self.assertTrue(self.base.srpm_path.exists())
        self.base.build_rpm_recover(
            self.base.target_distro, self.base.target_arch)
        self.assertTrue(self.base.rpm_path)

    def tearDown(self):
        for _rpm in self.base.rpm_path:
            os.remove(str(_rpm))
        os.remove(str(self.base.srpm_path))
        os.remove(str(self.base.spec_path))
Beispiel #5
0
def main():
    base = Base()
    app = QApplication(sys.argv)
    base.conf.parse_cmdline()
    if base.conf.load_dnf:
        base.sack = base.load_dnf_sack()
    base.load_plugins()
    wiz = Wizard(base)
    wiz.setObjectName("RPG")
    wiz.resize(850, 650)
    wiz.setMinimumSize(QtCore.QSize(850, 650))
    wiz.setMaximumSize(QtCore.QSize(850, 650))
    wiz.setBaseSize(QtCore.QSize(850, 650))
    wiz.show()

    logging.info('GUI loaded')
    sys.exit(app.exec_())
class BuildTest(RpgTestCase):
    def test_rpg_project(self):
        self.base = Base()
        self.base.sack = self.base.load_dnf_sack()
        self.base.load_plugins()
        self.base.load_project_from_url("https://github.com/openSUSE/libsolv")
        self.base.spec.Name = "LibSolv"
        self.base.spec.Version = "0.6.11"
        self.base.spec.Release = "1%{?snapshot}%{?dist}"
        self.base.spec.License = "GPLv2"
        self.base.spec.Summary = "Library for solving repository info"
        self.base.spec.description = (
            "This is libsolv, a free package dependency solver "
            "using a satisfiability algorithm.")
        self.base.spec.URL = "https://github.com/openSUSE/libsolv"
        self.base.target_arch = "x86_64"
        self.base.target_distro = "fedora-22"
        self.base.fetch_repos(self.base.target_distro, self.base.target_arch)
        self.base.run_extracted_source_analysis()
        self.base.run_patched_source_analysis()
        self.base.spec.build = Command([
            r'cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo '
            r'-DENABLE_PERL=1 '
            r'-DENABLE_PYTHON=1 '
            r'-DENABLE_RUBY=1 '
            r'-DUSE_VENDORDIRS=1 '
            r'-DFEDORA=1 '
            r'-DENABLE_LZMA_COMPRESSION=1'
            "make"
        ])
        self.base.build_project()
        self.base.run_compiled_source_analysis()
        self.base.install_project()
        self.base.run_installed_source_analysis()
        self.base.build_srpm()
        self.assertTrue(self.base.srpm_path.exists())
        self.base.build_rpm_recover(self.base.target_distro,
                                    self.base.target_arch)
        self.assertTrue(self.base.rpm_path)

    def tearDown(self):
        for _rpm in self.base.rpm_path:
            os.remove(str(_rpm))
        os.remove(str(self.base.srpm_path))
        os.remove(str(self.base.spec_path))
Beispiel #7
0
class BuildTest(RpgTestCase):

    def test_rpg_project(self):
        self.base = Base()
        self.base.sack = self.base.load_dnf_sack()
        self.base.load_plugins()
        self.base.load_project_from_url(
            "https://github.com/rh-lab-q/rpg/archive/master.zip")
        self.base.spec.Name = "rpg"
        self.base.spec.Version = "0.0.2"
        self.base.spec.Release = "1%{?snapshot}%{?dist}"
        self.base.spec.License = "GPLv2"
        self.base.spec.Summary = "RPM Package Generator"
        self.base.spec.description = (
            "RPG is tool, that guides people through"
            "the creation of a RPM package. RPG makes packaging much easier"
            "due to the automatic analysis of packaged files. Beginners can"
            "get familiar with packaging process or the advanced users can"
            "use our tool for a quick creation of a package.")
        self.base.spec.URL = "https://github.com/rh-lab-q/rpg"
        self.base.target_arch = "x86_64"
        self.base.target_distro = "fedora-22"
        self.base.spec.Requires.update(['makedepend', 'mock'])
        self.base.spec.BuildRequires.update(['makedepend',
                                             'mock',
                                             'python3-nose'])
        self.base.fetch_repos(self.base.target_distro, self.base.target_arch)
        self.base.run_extracted_source_analysis()
        self.base.run_patched_source_analysis()
        self.base.spec.check = Command(["make test-unit"])
        self.base.build_project()
        self.base.run_compiled_source_analysis()
        self.base.install_project()
        self.base.run_installed_source_analysis()
        self.base.build_srpm()
        self.assertTrue(self.base.srpm_path.exists())
        self.base.build_rpm_recover(
            self.base.target_distro, self.base.target_arch)
        self.assertTrue(self.base.rpm_path)

    def tearDown(self):
        for _rpm in self.base.rpm_path:
            os.remove(str(_rpm))
        os.remove(str(self.base.srpm_path))
        os.remove(str(self.base.spec_path))
class BuildHawkeyTest(RpgTestCase):
    def test_hawkey_project(self):
        self.base = Base()
        self.base.sack = self.base.load_dnf_sack()
        self.base.load_plugins()
        self.base.load_project_from_url(
            r"https://github.com/rpm-software-management/"
            "hawkey/archive/hawkey-0.5.7-1.tar.gz")
        self.base.spec.Name = "hawkey"
        self.base.spec.Version = "0.6.0"
        self.base.spec.Release = "1%{?snapshot}%{?dist}"
        self.base.spec.License = "LGPLv2+"
        self.base.spec.Summary = ("Library providing simplified "
                                  "C and Python API to libsolv")
        self.base.spec.description = ("A Library providing simplified "
                                      "C and Python API to libsolv.")
        self.base.spec.URL = (r"https://github.com/rpm-"
                              "software-management/%{name}")
        self.base.target_arch = "x86_64"
        self.base.target_distro = "fedora-22"
        self.base.fetch_repos(self.base.target_distro, self.base.target_arch)
        self.base.run_extracted_source_analysis()
        self.base.run_patched_source_analysis()
        self.base.spec.build.append(["make doc-man"])
        self.base.build_project()
        self.base.run_compiled_source_analysis()
        self.base.install_project()
        self.base.run_installed_source_analysis()
        self.base.spec.BuildRequires.update(
            set([
                'expat-devel', 'rpm-devel', 'zlib-devel', 'check-devel',
                'libsolv-tools', 'python-nose', 'python-devel'
            ]))
        self.base.build_srpm()
        self.assertTrue(self.base.srpm_path.exists())
        self.base.build_rpm_recover(self.base.target_distro,
                                    self.base.target_arch)
        os.remove(str(self.base.srpm_path))
        os.remove(str(self.base.spec_path))
Beispiel #9
0
class BuildTest(RpgTestCase):

    def test_libhif(self):
        self.base = Base()
        self.base.sack = self.base.load_dnf_sack()
        self.base.load_plugins()
        self.base.load_project_from_url(
            "https://github.com/rpm-software-management/libhif/"
            "archive/libhif_0_2_1.zip")
        self.base.spec.Name = "LibHif"
        self.base.spec.Version = "0.6.11"
        self.base.spec.Release = "1%{?snapshot}%{?dist}"
        self.base.spec.License = "GPLv2"
        self.base.spec.Summary = "Library ..."
        self.base.spec.description = (
            "LibHif ...")
        self.base.spec.URL =\
            "https://github.com/rpm-software-management/libhif"
        self.base.target_arch = "x86_64"
        self.base.target_distro = "fedora-22"
        self.base.fetch_repos(self.base.target_distro, self.base.target_arch)
        self.base.run_extracted_source_analysis()
        self.base.run_patched_source_analysis()
        self.base.build_project()
        self.base.run_compiled_source_analysis()
        self.base.install_project()
        self.base.run_installed_source_analysis()
        self.base.build_srpm()
        self.assertTrue(self.base.srpm_path.exists())
        self.base.build_rpm_recover(
            self.base.target_distro, self.base.target_arch)
        self.assertTrue(self.base.rpm_path)

    def tearDown(self):
        for _rpm in self.base.rpm_path:
            os.remove(str(_rpm))
        os.remove(str(self.base.srpm_path))
        os.remove(str(self.base.spec_path))
Beispiel #10
0
class MavenBuildTest(RpgTestCase):

    def test_maven_project(self):
        self.base = Base()
        self.base.sack = self.base.load_dnf_sack()
        self.base.load_plugins()
        self.base.load_project_from_url(
            r"https://github.com/apache/commons-compress/archive/rel/1.10.zip")
        self.base.spec.Name = "commonsCompress"
        self.base.spec.Version = "1.10"
        self.base.spec.Release = "1"
        self.base.spec.License = "ASL 2.0"
        self.base.spec.Summary = (
            "Commons Compress is a Java library for working with various"
            "compression and archiving formats.")
        self.base.spec.description = (
            "The Apache Commons Compress library defines an API for working "
            "with ar, cpio, Unix dump, tar, zip, gzip, XZ, Pack200, bzip2, "
            "7z, arj, lzma, snappy, DEFLATE and Z files.")
        self.base.spec.URL = (
            r"http://commons.apache.org/proper/commons-compress/")
        self.base.target_arch = "x86_64"
        self.base.target_distro = "fedora-22"
        self.base.fetch_repos(self.base.target_distro, self.base.target_arch)
        self.base.run_extracted_source_analysis()
        self.base.run_patched_source_analysis()
        self.base.build_project()
        self.base.run_compiled_source_analysis()
        self.base.install_project()
        self.base.run_installed_source_analysis()
        self.base.build_srpm()
        self.assertTrue(self.base.srpm_path.exists())
        self.base.build_rpm_recover(
            self.base.target_distro, self.base.target_arch)
        os.remove(str(self.base.srpm_path))
        os.remove(str(self.base.spec_path))
Beispiel #11
0
class BuildTest(RpgTestCase):
    def test_libhif(self):
        self.base = Base()
        self.base.sack = self.base.load_dnf_sack()
        self.base.load_plugins()
        self.base.load_project_from_url(
            "https://github.com/rpm-software-management/libhif/"
            "archive/libhif_0_2_1.zip")
        self.base.spec.Name = "LibHif"
        self.base.spec.Version = "0.6.11"
        self.base.spec.Release = "1%{?snapshot}%{?dist}"
        self.base.spec.License = "GPLv2"
        self.base.spec.Summary = "Library ..."
        self.base.spec.description = ("LibHif ...")
        self.base.spec.URL =\
            "https://github.com/rpm-software-management/libhif"
        self.base.target_arch = "x86_64"
        self.base.target_distro = "fedora-22"
        self.base.fetch_repos(self.base.target_distro, self.base.target_arch)
        self.base.run_extracted_source_analysis()
        self.base.run_patched_source_analysis()
        self.base.build_project()
        self.base.run_compiled_source_analysis()
        self.base.install_project()
        self.base.run_installed_source_analysis()
        self.base.build_srpm()
        self.assertTrue(self.base.srpm_path.exists())
        self.base.build_rpm_recover(self.base.target_distro,
                                    self.base.target_arch)
        self.assertTrue(self.base.rpm_path)

    def tearDown(self):
        for _rpm in self.base.rpm_path:
            os.remove(str(_rpm))
        os.remove(str(self.base.srpm_path))
        os.remove(str(self.base.spec_path))