Exemplo n.º 1
0
    def setUp(self):
        TestCompareKoji.setUp(self)

        # Adds /usr/bin/hello-world
        self.before_rpm.add_simple_compilation()
        self.before_rpm.add_mode("/usr/bin/hello-world", "0700")
        self.after_rpm.add_simple_compilation()
        self.after_rpm.add_mode("/usr/bin/hello-world", "0700")

        # Adds /usr/share/icons/hello-world.png
        self.before_rpm.add_installed_file(
            "/usr/share/icons/hello-world.png",
            rpmfluff.GeneratedSourceFile("hello-world.png",
                                         rpmfluff.make_png()),
        )
        self.after_rpm.add_installed_file(
            "/usr/share/icons/hello-world.png",
            rpmfluff.GeneratedSourceFile("hello-world.png",
                                         rpmfluff.make_png()),
        )

        # Adds /usr/share/applications/hello-world.desktop
        self.before_rpm.add_installed_file(
            "/usr/share/applications/hello-world.desktop",
            rpmfluff.SourceFile("hello-world.desktop", good_desktop_file),
        )
        self.after_rpm.add_installed_file(
            "/usr/share/applications/hello-world.desktop",
            rpmfluff.SourceFile("hello-world.desktop", good_desktop_file),
        )

        self.inspection = "desktop"
        self.result = "VERIFY"
        self.waiver_auth = "Anyone"
Exemplo n.º 2
0
    def setUp(self):
        TestCompareRPMs.setUp(self)

        # Adds /usr/share/icons/hello-world.png
        self.before_rpm.add_installed_file(
            "/usr/share/icons/hello-world.png",
            rpmfluff.GeneratedSourceFile("hello-world.png",
                                         rpmfluff.make_png()),
        )
        self.after_rpm.add_installed_file(
            "/usr/share/icons/hello-world.png",
            rpmfluff.GeneratedSourceFile("hello-world.png",
                                         rpmfluff.make_png()),
        )

        # Adds /usr/share/applications/hello-world.desktop
        self.before_rpm.add_installed_file(
            "/usr/share/applications/hello-world.desktop",
            rpmfluff.SourceFile("hello-world.desktop",
                                good_tryexec_args_desktop_file),
        )
        self.after_rpm.add_installed_file(
            "/usr/share/applications/hello-world.desktop",
            rpmfluff.SourceFile("hello-world.desktop",
                                good_tryexec_args_desktop_file),
        )

        self.inspection = "desktop"
        self.label = "desktop-entry-files"
        self.result = "INFO"
        self.waiver_auth = "Not Waivable"
Exemplo n.º 3
0
    def setUp(self):
        TestCompareKoji.setUp(self)

        # Adds /usr/bin/hello-world
        self.before_rpm.add_simple_compilation()
        self.after_rpm.add_simple_compilation()

        # Adds /usr/share/icons/hello-world.png
        self.before_rpm.add_installed_file(
            "/usr/share/icons/hello-world.png",
            rpmfluff.GeneratedSourceFile("hello-world.png",
                                         rpmfluff.make_png()),
        )
        self.after_rpm.add_installed_file(
            "/usr/share/icons/hello-world.png",
            rpmfluff.GeneratedSourceFile("hello-world.png",
                                         rpmfluff.make_png()),
        )

        # Adds /usr/share/applications/hello-world.desktop
        self.before_rpm.add_installed_file(
            "/usr/share/applications/hello-world.desktop",
            rpmfluff.SourceFile("hello-world.desktop",
                                good_exec_args_desktop_file),
        )
        self.after_rpm.add_installed_file(
            "/usr/share/applications/hello-world.desktop",
            rpmfluff.SourceFile("hello-world.desktop",
                                good_exec_args_desktop_file),
        )

        self.inspection = "desktop"
        self.result = "OK"
Exemplo n.º 4
0
    def setUp(self):
        TestCompareRPMs.setUp(self)

        # Adds /usr/bin/hello-world
        self.before_rpm.add_simple_compilation()
        self.before_rpm.add_mode("/usr/bin/hello-world", "0700")
        self.after_rpm.add_simple_compilation()
        self.after_rpm.add_mode("/usr/bin/hello-world", "0700")

        # Adds /usr/share/icons/hello-world.png
        self.before_rpm.add_installed_file(
            "/usr/share/icons/hello-world.png",
            rpmfluff.GeneratedSourceFile("hello-world.png",
                                         rpmfluff.make_png()))
        self.after_rpm.add_installed_file(
            "/usr/share/icons/hello-world.png",
            rpmfluff.GeneratedSourceFile("hello-world.png",
                                         rpmfluff.make_png()))

        # Adds /usr/share/applications/hello-world.desktop
        self.before_rpm.add_installed_file(
            "/usr/share/applications/hello-world.desktop",
            rpmfluff.SourceFile('hello-world.desktop', good_desktop_file))
        self.after_rpm.add_installed_file(
            "/usr/share/applications/hello-world.desktop",
            rpmfluff.SourceFile('hello-world.desktop', good_desktop_file))

        self.inspection = 'desktop'
        self.label = 'desktop-entry-files'
        self.result = 'VERIFY'
        self.waiver_auth = 'Anyone'
Exemplo n.º 5
0
    def setUp(self):
        TestCompareRPMs.setUp(self)

        # Adds /usr/bin/hello-world
        self.before_rpm.add_simple_compilation()
        self.after_rpm.add_simple_compilation()

        # Adds /usr/share/icons/hello-world.png
        self.before_rpm.add_installed_file(
            "/usr/share/icons/hello-world.png",
            rpmfluff.GeneratedSourceFile("hello-world.png",
                                         rpmfluff.make_png()),
        )
        self.after_rpm.add_installed_file(
            "/usr/share/icons/hello-world.png",
            rpmfluff.GeneratedSourceFile("hello-world.png",
                                         rpmfluff.make_png()),
        )

        # Adds /usr/share/applications/hello-world.desktop
        self.before_rpm.add_installed_file(
            "/usr/share/applications/hello-world.desktop",
            rpmfluff.SourceFile("hello-world.desktop", bad_desktop_file),
        )
        self.after_rpm.add_installed_file(
            "/usr/share/applications/hello-world.desktop",
            rpmfluff.SourceFile("hello-world.desktop", bad_desktop_file),
        )

        self.inspection = "desktop"
        self.label = "desktop-entry-files"
        self.result = "BAD"
        self.waiver_auth = "Anyone"
Exemplo n.º 6
0
    def setUp(self):
        TestCompareKoji.setUp(self)

        # add a bad man page
        self.before_rpm.add_installed_file(
            "/usr/share/man/man1/foo.1.gz",
            rpmfluff.GeneratedSourceFile("foo.1", rpmfluff.make_png()),
        )
        self.after_rpm.add_installed_file(
            "/usr/share/man/man1/foo.1.gz",
            rpmfluff.GeneratedSourceFile("foo.1", rpmfluff.make_png()),
        )

        # the test
        self.inspection = "manpage"
        self.label = "man-pages"
        self.result = "VERIFY"
        self.waiver_auth = "Anyone"
Exemplo n.º 7
0
    def setUp(self):
        TestCompareKoji.setUp(self)

        # disable automatic man page compression in rpmbuild
        self.before_rpm.header += "%global __brp_compress /bin/true\n"
        self.after_rpm.header += "%global __brp_compress /bin/true\n"

        # add a bad man page
        self.before_rpm.add_installed_file(
            "/usr/share/man/man1/foo.1.gz",
            rpmfluff.GeneratedSourceFile("foo.1", rpmfluff.make_png()),
        )
        self.after_rpm.add_installed_file(
            "/usr/share/man/man1/foo.1.gz",
            rpmfluff.GeneratedSourceFile("foo.1", rpmfluff.make_png()),
        )

        # the test
        self.inspection = "manpage"
        self.result = "VERIFY"
        self.waiver_auth = "Anyone"
Exemplo n.º 8
0
    def setUp(self):
        super().setUp()
        self.before_rpm.add_installed_file(
            "/usr/share/vaporware/rpminspect",
            rpmfluff.SourceFile("rpminspect.sh", rpminspect_sh),
        )
        self.after_rpm.add_installed_file(
            "/usr/share/vaporware/rpminspect",
            rpmfluff.GeneratedSourceFile("rpminspect.png",
                                         rpmfluff.make_png()),
        )

        self.inspection = "types"
        self.result = "VERIFY"
        self.waiver_auth = "Anyone"
Exemplo n.º 9
0
    def setUp(self):
        TestKoji.setUp(self)

        # Adds /usr/share/icons/hello-world.png
        self.rpm.add_installed_file(
            "/usr/share/icons/hello-world.png",
            rpmfluff.GeneratedSourceFile("hello-world.png",
                                         rpmfluff.make_png()))

        # Adds /usr/share/applications/hello-world.desktop
        self.rpm.add_installed_file(
            "/usr/share/applications/hello-world.desktop",
            rpmfluff.SourceFile('hello-world.desktop', good_desktop_file))

        self.inspection = 'desktop'
        self.label = 'desktop-entry-files'
        self.result = 'VERIFY'
        self.waiver_auth = 'Anyone'
Exemplo n.º 10
0
    def setUp(self):
        TestKoji.setUp(self)

        # Adds /usr/share/icons/hello-world.png
        self.rpm.add_installed_file(
            "/usr/share/icons/hello-world.png",
            rpmfluff.GeneratedSourceFile("hello-world.png",
                                         rpmfluff.make_png()),
        )

        # Adds /usr/share/applications/hello-world.desktop
        self.rpm.add_installed_file(
            "/usr/share/applications/hello-world.desktop",
            rpmfluff.SourceFile("hello-world.desktop", good_desktop_file),
        )

        self.inspection = "desktop"
        self.result = "VERIFY"
        self.waiver_auth = "Anyone"
Exemplo n.º 11
0
    def setUp(self):
        TestRPMs.setUp(self)

        # Adds /usr/bin/hello-world
        self.rpm.add_simple_compilation()

        # Adds /usr/share/icons/hello-world.png
        self.rpm.add_installed_file(
            "/usr/share/icons/hello-world.png",
            rpmfluff.GeneratedSourceFile("hello-world.png",
                                         rpmfluff.make_png()))

        # Adds /usr/share/applications/hello-world.desktop
        self.rpm.add_installed_file(
            "/usr/share/applications/hello-world.desktop",
            rpmfluff.SourceFile('hello-world.desktop', good_desktop_file))

        self.inspection = 'desktop'
        self.label = 'desktop-entry-files'
        self.result = 'OK'
Exemplo n.º 12
0
    def setUp(self):
        TestKoji.setUp(self)

        # Adds /usr/bin/hello-world
        self.rpm.add_simple_compilation()

        # Adds /usr/share/applications/hello-world.desktop
        self.rpm.add_installed_file(
            "/usr/share/applications/hello-world.desktop",
            rpmfluff.SourceFile("hello-world.desktop", good_desktop_file),
        )

        # Adds /usr/share/icons/hello-world.png to a subpackage
        self.rpm.add_subpackage("icons")
        self.rpm.add_installed_file(
            "/usr/share/icons/hello-world.png",
            rpmfluff.GeneratedSourceFile("hello-world.png",
                                         rpmfluff.make_png()),
            subpackageSuffix="icons",
        )

        self.inspection = "desktop"
        self.result = "OK"
Exemplo n.º 13
0
    def setUp(self):
        TestKoji.setUp(self)

        # Adds /usr/bin/hello-world
        self.rpm.add_simple_compilation()

        # Adds /usr/share/icons/hello-world.png
        self.rpm.add_installed_file(
            "/usr/share/icons/hello-world.png",
            rpmfluff.GeneratedSourceFile("hello-world.png",
                                         rpmfluff.make_png()),
            mode="0600",
        )

        # Adds /usr/share/applications/hello-world.desktop
        self.rpm.add_installed_file(
            "/usr/share/applications/hello-world.desktop",
            rpmfluff.SourceFile("hello-world.desktop", good_desktop_file),
        )

        self.inspection = "desktop"
        self.label = "desktop-entry-files"
        self.result = "VERIFY"
        self.waiver_auth = "Anyone"