Bug 244839

Summary: graphics/okular: SHA256 Checksum mismatch for KDE/applications/19.12.3/6a93a033b4f9248b3cd4d04689b8391df754e244.patch.
Product: Ports & Packages Reporter: oleg.nauman
Component: Individual Port(s)Assignee: freebsd-kde (group) <kde>
Status: Closed FIXED    
Severity: Affects Only Me CC: freebsd, tcberner
Priority: --- Flags: tcberner: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   

Description oleg.nauman 2020-03-16 07:10:24 UTC
root@sigill:/usr/ports/graphics/okular # make checksum
===>  License GPLv2 accepted by the user
===>   okular-19.12.3_3 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by okular-19.12.3_3 for building
=> SHA256 Checksum OK for KDE/applications/19.12.3/okular-19.12.3.tar.xz.
=> SHA256 Checksum mismatch for KDE/applications/19.12.3/6a93a033b4f9248b3cd4d04689b8391df754e244.patch.
===>  Refetch for 1 more times files:  KDE/applications/19.12.3/6a93a033b4f9248b3cd4d04689b8391df754e244.patch 
===>  License GPLv2 accepted by the user
===>   okular-19.12.3_3 depends on file: /usr/local/sbin/pkg - found
=> 6a93a033b4f9248b3cd4d04689b8391df754e244.patch doesn't seem to exist in /usr/ports/distfiles/KDE/applications/19.12.3.
=> Attempting to fetch https://invent.kde.org/kde/okular/-/commit/6a93a033b4f9248b3cd4d04689b8391df754e244.patch
6a93a033b4f9248b3cd4d04689b8391df754e244.patch         902  B    9 MBps    00s
===> Fetching all distfiles required by okular-19.12.3_3 for building
===>  License GPLv2 accepted by the user
===>   okular-19.12.3_3 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by okular-19.12.3_3 for building
=> SHA256 Checksum OK for KDE/applications/19.12.3/okular-19.12.3.tar.xz.
=> SHA256 Checksum mismatch for KDE/applications/19.12.3/6a93a033b4f9248b3cd4d04689b8391df754e244.patch.
===>  Giving up on fetching files:  KDE/applications/19.12.3/6a93a033b4f9248b3cd4d04689b8391df754e244.patch 
Make sure the Makefile and distinfo file (/usr/ports/graphics/okular/distinfo)
are up to date.  If you are absolutely sure you want to override this
check, type "make NO_CHECKSUM=yes [other args]".
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/graphics/okular
*** Error code 1

Stop.
make: stopped in /usr/ports/graphics/okular

root@sigill:/usr/ports/graphics/okular # rm -f /usr/ports/distfiles/KDE/applications/19.12.3/6a93a033b4f9248b3cd4d04689b8391df754e244.patch 

root@sigill:/usr/ports/graphics/okular # make checksum                                                                 ===>  License GPLv2 accepted by the user
===>   okular-19.12.3_3 depends on file: /usr/local/sbin/pkg - found
=> 6a93a033b4f9248b3cd4d04689b8391df754e244.patch doesn't seem to exist in /usr/ports/distfiles/KDE/applications/19.12.3.
=> Attempting to fetch https://invent.kde.org/kde/okular/-/commit/6a93a033b4f9248b3cd4d04689b8391df754e244.patch
6a93a033b4f9248b3cd4d04689b8391df754e244.patch         902  B 5308 kBps    00s
===> Fetching all distfiles required by okular-19.12.3_3 for building
=> SHA256 Checksum OK for KDE/applications/19.12.3/okular-19.12.3.tar.xz.
=> SHA256 Checksum mismatch for KDE/applications/19.12.3/6a93a033b4f9248b3cd4d04689b8391df754e244.patch.
===>  Refetch for 1 more times files:  KDE/applications/19.12.3/6a93a033b4f9248b3cd4d04689b8391df754e244.patch 
===>  License GPLv2 accepted by the user
===>   okular-19.12.3_3 depends on file: /usr/local/sbin/pkg - found
=> 6a93a033b4f9248b3cd4d04689b8391df754e244.patch doesn't seem to exist in /usr/ports/distfiles/KDE/applications/19.12.3.
=> Attempting to fetch https://invent.kde.org/kde/okular/-/commit/6a93a033b4f9248b3cd4d04689b8391df754e244.patch
6a93a033b4f9248b3cd4d04689b8391df754e244.patch         902  B 5719 kBps    00s
===> Fetching all distfiles required by okular-19.12.3_3 for building
===>  License GPLv2 accepted by the user
===>   okular-19.12.3_3 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by okular-19.12.3_3 for building
=> SHA256 Checksum OK for KDE/applications/19.12.3/okular-19.12.3.tar.xz.
=> SHA256 Checksum mismatch for KDE/applications/19.12.3/6a93a033b4f9248b3cd4d04689b8391df754e244.patch.
===>  Giving up on fetching files:  KDE/applications/19.12.3/6a93a033b4f9248b3cd4d04689b8391df754e244.patch 
Make sure the Makefile and distinfo file (/usr/ports/graphics/okular/distinfo)
are up to date.  If you are absolutely sure you want to override this
check, type "make NO_CHECKSUM=yes [other args]".
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/graphics/okular
*** Error code 1

Stop.
make: stopped in /usr/ports/graphics/okular
Comment 1 Tobias C. Berner freebsd_committer freebsd_triage 2020-03-16 07:47:47 UTC
Moin moin 

This works fine for me:

> make distclean ; make fetch                                                                                                                                                                             
===>  Cleaning for okular-19.12.3_3
===>  Deleting distfiles for okular-19.12.3_3
===>  License GPLv2 accepted by the user
===>   okular-19.12.3_3 depends on file: /usr/local/sbin/pkg - found
=> okular-19.12.3.tar.xz doesn't seem to exist in /nfs/distfiles/KDE/applications/19.12.3.
=> Attempting to fetch https://download.kde.org/stable/release-service/19.12.3/src/okular-19.12.3.tar.xz
okular-19.12.3.tar.xz                                 7039 kB   33 MBps    00s
=> 6a93a033b4f9248b3cd4d04689b8391df754e244.patch doesn't seem to exist in /nfs/distfiles/KDE/applications/19.12.3.
=> Attempting to fetch https://invent.kde.org/kde/okular/-/commit/6a93a033b4f9248b3cd4d04689b8391df754e244.patch
6a93a033b4f9248b3cd4d04689b8391df754e244.patch         902  B   16 MBps    00s
===> Fetching all distfiles required by okular-19.12.3_3 for building
Comment 2 oleg.nauman 2020-03-16 09:51:13 UTC
(In reply to Tobias C. Berner from comment #1)

..and 'make checksum' result is..
Comment 3 Tobias C. Berner freebsd_committer freebsd_triage 2020-03-16 16:57:14 UTC
You're right, indeed. It changed. Question is why...
Comment 4 Tobias Kortkamp freebsd_committer freebsd_triage 2020-03-19 10:04:52 UTC
I had the same problem.

As to what is probably going on: The checksum difference is due to
a GitLab bug.  Unlike GitHub, GitLab keep the Git version in the
footer in patches.  If Git was updated on invent.kde.org after you
generated distinfo, the checksum of the generated patch will obviously
have changed too.  Also see the commit log of x11-toolkits/libhandy
which had similar problems in the past.

As tijl@ has pointed out previously on ports-committers using *.diff
instead of *.patch as suffix in PATCHFILES will sidestep that issue.
It has the downside of not having the commit message in the file
though.

Either way the changed patch contents look reasonable to me, so I
doubt anything fishy is going on here and we should just regenerate
distinfo.
Comment 5 commit-hook freebsd_committer freebsd_triage 2020-03-19 11:13:37 UTC
A commit references this bug:

Author: tcberner
Date: Thu Mar 19 11:12:47 UTC 2020
New revision: 528709
URL: https://svnweb.freebsd.org/changeset/ports/528709

Log:
  graphics/okular: fix distinfo of upstream patch

  - the checksum likely changed due to git version change in upstreams gitlab
  - patch is still the same

  PR:		244839
  Explained by:	tobik
  Reported by:	oleg.nauman@gmail.com

Changes:
  head/graphics/okular/distinfo
Comment 6 Tobias C. Berner freebsd_committer freebsd_triage 2020-03-19 11:16:37 UTC
Committed. Thanks.
Comment 7 commit-hook freebsd_committer freebsd_triage 2020-03-29 07:03:29 UTC
A commit references this bug:

Author: tcberner
Date: Sun Mar 29 07:01:18 UTC 2020
New revision: 529776
URL: https://svnweb.freebsd.org/changeset/ports/529776

Log:
  graphics/okular: switch to patch in filesdir

  - the checksum changed again; same content.

  PR:		244839
  Reported by:	Felix Palmen <felix@palmen-it.de>

Changes:
  head/graphics/okular/Makefile
  head/graphics/okular/distinfo
  head/graphics/okular/files/patch-git_6a93a03