Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

media-gfx/img2pdf: Version bump to 0.5.1 #36678

Closed
wants to merge 1 commit into from

Conversation

gringus
Copy link
Contributor

@gringus gringus commented May 14, 2024

Version bump to 0.5.1 for media-gfx/img2pdf
Dropped ppc64 arch due to dependency on media-libs/icc-profiles-openicc which is not supported on ppc64


Please check all the boxes that apply:

  • [*] I can submit this contribution in agreement with the Copyright Policy.
  • [*] I have certified the above via adding a Signed-off-by line to every commit in the pull request.
  • [*] This contribution has not been created with the assistance of Natural Language Processing artificial intelligence tools, in accordance with the AI policy.
  • [*] I have run pkgcheck scan --commits --net to check for issues with my commits.

Please note that all boxes must be checked for the pull request to be merged.

@gentoo-bot
Copy link

Pull Request assignment

Submitter: @gringus
Areas affected: ebuilds
Packages affected: media-gfx/img2pdf

media-gfx/img2pdf: @gentoo/proxy-maint (maintainer needed)

Linked bugs

Bugs linked: 921240


In order to force reassignment and/or bug reference scan, please append [please reassign] to the pull request title.

Docs: Code of ConductCopyright policy (expl.) ● DevmanualGitHub PRsProxy-maint guide

@gentoo-bot gentoo-bot added maintainer-needed There is at least one affected package with no maintainer. Review it if you can. assigned PR successfully assigned to the package maintainer(s). bug linked Bug/Closes found in footer, and cross-linked with the PR. labels May 14, 2024
@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2024-05-14 19:10 UTC
Newest commit scanned: c82d259
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/be76814190/output.html

media-gfx/img2pdf/img2pdf-0.5.1.ebuild Outdated Show resolved Hide resolved
@gringus gringus force-pushed the bug-921240 branch 2 times, most recently from 7ec277f to 6a6b583 Compare May 31, 2024 22:28
@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2024-05-31 23:30 UTC
Newest commit scanned: 6a6b583
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/e141b2834a/output.html

media-gfx/img2pdf/img2pdf-0.5.1.ebuild Outdated Show resolved Hide resolved
media-gfx/img2pdf/img2pdf-0.5.1.ebuild Outdated Show resolved Hide resolved
media-gfx/img2pdf/img2pdf-0.5.1.ebuild Outdated Show resolved Hide resolved
media-gfx/img2pdf/img2pdf-0.5.1.ebuild Outdated Show resolved Hide resolved
@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2024-06-01 07:31 UTC
Newest commit scanned: d014b39
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/4ec3897e3f/output.html

@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2024-06-01 08:40 UTC
Newest commit scanned: b83268b
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/0757766df9/output.html

Copy link
Member

@mgorny mgorny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm getting more test failures:

FAILED src/img2pdf_test.py::test_miff_cmyk16[internal] - assert 6.35075 > 50
FAILED src/img2pdf_test.py::test_miff_cmyk16[pikepdf] - assert 6.35075 > 50

Do these two pass for you?

@gringus
Copy link
Contributor Author

gringus commented Jun 1, 2024

Yes, all pass.. interesting...

@a17r
Copy link
Member

a17r commented Jun 1, 2024

All passed here too: 341 passed, 8 skipped, 2 deselected in 41.02s

@mgorny
Copy link
Member

mgorny commented Jun 1, 2024

Do these tests run at all for you? I don't have a single skip, so I'm guessing they could be skipped for you because of missing deps:

2 failed, 347 passed, 2 deselected in 116.59s (0:01:56)

Logs for failures:

_____________________________________________________ test_miff_cmyk16[internal] ______________________________________________________

tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7f4909c630b0>, _basetemp=PosixP.../tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0')
, _retention_count=0, _retention_policy='failed')
miff_cmyk16_img = PosixPath('/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/miff_cmyk160/in.miff')
tiff_cmyk16_img = PosixPath('/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/tiff_cmyk160/in.tiff')
miff_cmyk16_pdf = PosixPath('/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/miff_cmyk16_pdf0/out.pdf')

    @pytest.mark.skipif(
        sys.platform in ["win32"],
        reason="test utilities not available on Windows and MacOS",
    )
    def test_miff_cmyk16(
        tmp_path_factory, miff_cmyk16_img, tiff_cmyk16_img, miff_cmyk16_pdf
    ):
        tmpdir = tmp_path_factory.mktemp("miff_cmyk16")
>       compare_ghostscript(
            tmpdir, tiff_cmyk16_img, miff_cmyk16_pdf, gsdevice="tiff32nc", exact=False
        )

miff_cmyk16_img = PosixPath('/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/miff_cmyk160/in.miff')
miff_cmyk16_pdf = PosixPath('/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/miff_cmyk16_pdf0/out.pdf')
tiff_cmyk16_img = PosixPath('/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/tiff_cmyk160/in.tiff')
tmp_path_factory = TempPathFactory(_given_basetemp=None,
                _trace=<pluggy._tracing.TagTracerSub object at 0x7f4909c630b0>,
                _basetemp=PosixPath('/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0'),
                _retention_count=0,
                _retention_policy='failed')
tmpdir     = PosixPath('/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/miff_cmyk161')

src/img2pdf_test.py:6422: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
src/img2pdf_test.py:418: in compare_ghostscript
    compare(str(img), str(tmpdir / "gs-1.") + ext, exact, icc, False)
        exact      = False
        ext        = 'tiff'
        gsdevice   = 'tiff32nc'
        icc        = False
        img        = PosixPath('/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/tiff_cmyk160/in.tiff')
        pdf        = PosixPath('/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/miff_cmyk16_pdf0/out.pdf')
        tmpdir     = PosixPath('/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/miff_cmyk161')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

im1 = '/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/tiff_cmyk160/in.tiff'
im2 = '/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/miff_cmyk161/gs-1.tiff', exact = False, icc = False
cmyk = False

    def compare(im1, im2, exact, icc, cmyk):
        if exact:
            if cmyk and not HAVE_EXACT_CMYK8:
                raise Exception("cmyk cannot be exact before ImageMagick 7.1.0-48")
            elif icc:
                raise Exception("icc cannot be exact")
            else:
                subprocess.check_call(
                    COMPARE
                    + [
                        "-metric",
                        "AE",
                        "-alpha",
                        "off",
                        im1,
                        im2,
                        "null:",
                    ]
                )
        else:
            iccargs = []
            if icc:
                if ICC_PROFILE is None:
                    pytest.skip("Could not locate an ICC profile")
                iccargs = ["-profile", ICC_PROFILE]
            psnr = subprocess.run(
                COMPARE
                + iccargs
                + [
                    "-metric",
                    "PSNR",
                    im1,
                    im2,
                    "null:",
                ],
                check=False,
                stderr=subprocess.PIPE,
            ).stderr
            assert psnr != b"0"
            assert psnr != b"0 (0)"
            assert psnr_re.fullmatch(psnr) is not None, psnr
            psnr = psnr_re.fullmatch(psnr).group(1)
            psnr = float(psnr)
            assert psnr != 0  # or otherwise we would use the exact variant
>           assert psnr > 50
E           assert 6.35075 > 50
cmyk       = False
exact      = False
icc        = False
iccargs    = []
im1        = '/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/tiff_cmyk160/in.tiff'
im2        = '/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/miff_cmyk161/gs-1.tiff'
psnr       = 6.35075

src/img2pdf_test.py:396: AssertionError
______________________________________________________ test_miff_cmyk16[pikepdf] ______________________________________________________

tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7f4909c630b0>, _basetemp=PosixP.../tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0')
, _retention_count=0, _retention_policy='failed')
miff_cmyk16_img = PosixPath('/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/miff_cmyk160/in.miff')
tiff_cmyk16_img = PosixPath('/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/tiff_cmyk160/in.tiff')
miff_cmyk16_pdf = PosixPath('/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/miff_cmyk16_pdf1/out.pdf')

    @pytest.mark.skipif(
        sys.platform in ["win32"],
        reason="test utilities not available on Windows and MacOS",
    )
    def test_miff_cmyk16(
        tmp_path_factory, miff_cmyk16_img, tiff_cmyk16_img, miff_cmyk16_pdf
    ):
        tmpdir = tmp_path_factory.mktemp("miff_cmyk16")
>       compare_ghostscript(
            tmpdir, tiff_cmyk16_img, miff_cmyk16_pdf, gsdevice="tiff32nc", exact=False
        )

miff_cmyk16_img = PosixPath('/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/miff_cmyk160/in.miff')
miff_cmyk16_pdf = PosixPath('/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/miff_cmyk16_pdf1/out.pdf')
tiff_cmyk16_img = PosixPath('/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/tiff_cmyk160/in.tiff')
tmp_path_factory = TempPathFactory(_given_basetemp=None,
                _trace=<pluggy._tracing.TagTracerSub object at 0x7f4909c630b0>,
                _basetemp=PosixPath('/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0'),
                _retention_count=0,
                _retention_policy='failed')
tmpdir     = PosixPath('/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/miff_cmyk162')

src/img2pdf_test.py:6422: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
src/img2pdf_test.py:418: in compare_ghostscript
    compare(str(img), str(tmpdir / "gs-1.") + ext, exact, icc, False)
        exact      = False
        ext        = 'tiff'
        gsdevice   = 'tiff32nc'
        icc        = False
        img        = PosixPath('/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/tiff_cmyk160/in.tiff')
        pdf        = PosixPath('/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/miff_cmyk16_pdf1/out.pdf')
        tmpdir     = PosixPath('/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/miff_cmyk162')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

im1 = '/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/tiff_cmyk160/in.tiff'
im2 = '/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/miff_cmyk162/gs-1.tiff', exact = False, icc = False
cmyk = False

    def compare(im1, im2, exact, icc, cmyk):
        if exact:
            if cmyk and not HAVE_EXACT_CMYK8:
                raise Exception("cmyk cannot be exact before ImageMagick 7.1.0-48")
            elif icc:
                raise Exception("icc cannot be exact")
            else:
                subprocess.check_call(
                    COMPARE
                    + [
                        "-metric",
                        "AE",
                        "-alpha",
                        "off",
                        im1,
                        im2,
                        "null:",
                    ]
                )
        else:
            iccargs = []
            if icc:
                if ICC_PROFILE is None:
                    pytest.skip("Could not locate an ICC profile")
                iccargs = ["-profile", ICC_PROFILE]
            psnr = subprocess.run(
                COMPARE
                + iccargs
                + [
                    "-metric",
                    "PSNR",
                    im1,
                    im2,
                    "null:",
                ],
                check=False,
                stderr=subprocess.PIPE,
            ).stderr
            assert psnr != b"0"
            assert psnr != b"0 (0)"
            assert psnr_re.fullmatch(psnr) is not None, psnr
            psnr = psnr_re.fullmatch(psnr).group(1)
            psnr = float(psnr)
            assert psnr != 0  # or otherwise we would use the exact variant
>           assert psnr > 50
E           assert 6.35075 > 50

cmyk       = False
exact      = False
icc        = False
iccargs    = []
im1        = '/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/tiff_cmyk160/in.tiff'
im2        = '/tmp/portage/media-gfx/img2pdf-0.5.1/temp/pytest-of-portage/pytest-0/miff_cmyk162/gs-1.tiff'
psnr       = 6.35075

src/img2pdf_test.py:396: AssertionError

@gringus
Copy link
Contributor Author

gringus commented Jun 1, 2024

I get 349 passed, 2 deselected in 33.11s I'm using ebuildtester to test it.

@gringus
Copy link
Contributor Author

gringus commented Jun 1, 2024

Pkease try the patch from https://gitlab.mister-muffin.de/josch/img2pdf/issues/178 and see if that helps.

@mgorny
Copy link
Member

mgorny commented Jun 2, 2024

The NixOS patch? It's for cmyk8 cases only. The author even notes that cmyk16 cases still fail for them after applying it.

Perhaps it's ImageMagick flags? I've got 7.1.1.25, USE="X bzip2 cxx djvu fftw fontconfig fpx hdri heif jbig jpeg jpeg2k jpegxl lcms lqr lzma openexr openmp pango perl png postscript raw svg tiff truetype webp wmf xml zlib".

@mgorny
Copy link
Member

mgorny commented Jun 2, 2024

If I limit the flags to absolute minimum, the tests pass. I'm going to try different flag combinations to figure out which one causes the problem.

@mgorny
Copy link
Member

mgorny commented Jun 2, 2024

Ok, it's USE=hdri. Let's just add these two tests to deselect (possibly with if has_version 'media-gfx/imagemagick[hdri]), no point in forcing it off for the sake of tests.

Signed-off-by: Marcin Deranek <marcin.deranek@slonko.net>
Co-authored-by: Michał Górny <mgorny@gentoo.org>
Closes: https://bugs.gentoo.org/921240
Closes: https://bugs.gentoo.org/929621
@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2024-06-03 22:10 UTC
Newest commit scanned: 97670d8
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/5b59d88ef5/output.html

Copy link
Member

@mgorny mgorny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I'm going to add xdist back, because the tests are slow, then push and open rekeywording.

@mgorny
Copy link
Member

mgorny commented Jun 4, 2024

Do you want to maintain it going forward, by the way?

@gentoo-bot gentoo-bot closed this in f097d26 Jun 4, 2024
@gringus
Copy link
Contributor Author

gringus commented Jun 4, 2024

Not really. I removed xdist as I did not see any difference running tests with or without it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assigned PR successfully assigned to the package maintainer(s). bug linked Bug/Closes found in footer, and cross-linked with the PR. maintainer-needed There is at least one affected package with no maintainer. Review it if you can.
Projects
None yet
5 participants