Bug 251040 - textproc/libxml2: Patch size mismatch, fails to build.
Summary: textproc/libxml2: Patch size mismatch, fails to build.
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-desktop (Team)
: 251009 (view as bug list)
Depends on:
Reported: 2020-11-11 10:00 UTC by David Armstrong
Modified: 2020-12-05 11:07 UTC (History)
4 users (show)

See Also:
tcberner: maintainer-feedback+

Patch for libxml2 (1.94 KB, patch)
2020-11-11 21:39 UTC, Daniel Engberg
no flags Details | Diff
Patch for libxml2 v2 (9.01 KB, patch)
2020-11-16 07:56 UTC, Daniel Engberg
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Armstrong 2020-11-11 10:00:44 UTC

I'd originally incorrectly opened bug under /databases/mariadb105-server: bug #251009

Size mismatch (when fetching from gitlab.gnome.org) or not found (when fetching from distcache.FreeBSD.org) on four of the patches causes failure to build.


Example errors:

=> Attempting to fetch https://gitlab.gnome.org/GNOME/libxml2/commit/0e1a49c8907645d2e155f0d89d4d9895ac5112b5.patch
fetch: https://gitlab.gnome.org/GNOME/libxml2/commit/0e1a49c8907645d2e155f0d89d4d9895ac5112b5.patch: size mismatch: expected 996, actual 994

=> Attempting to fetch https://gitlab.gnome.org/GNOME/libxml2/commit/7ffcd44d7e6c46704f8af0321d9314cd26e0e18a.patch
fetch: https://gitlab.gnome.org/GNOME/libxml2/commit/7ffcd44d7e6c46704f8af0321d9314cd26e0e18a.patch: size mismatch: expected 1015, actual 1013

I was able to temporarily resolve this by manually fetching the versions here (which have the correct hash) and placing them in /usr/ports/distfiles/gnome2/ 
Comment 1 David Armstrong 2020-11-11 10:01:46 UTC
*** Bug 251009 has been marked as a duplicate of this bug. ***
Comment 2 Daniel Engberg 2020-11-11 21:39:07 UTC
Created attachment 219575 [details]
Patch for libxml2

Update distinfo due to upstream change in GitLab instance
Comment 3 Daniel Engberg 2020-11-11 21:40:50 UTC
The cause is index line(s) being generated differently

< index 301c8449..39d92182 100644
> index 301c84499..39d92182f 100644
Comment 4 Tobias C. Berner freebsd_committer 2020-11-12 05:52:15 UTC
Moin moin 

I think it's better to include the files in ${FILESDIR} when coming from gitlab.
Could you update the patch accordingly?

mfg Tobias
Comment 5 Daniel Engberg 2020-11-16 07:56:55 UTC
Created attachment 219723 [details]
Patch for libxml2 v2

Host patches locally
Comment 6 Niclas Zeising freebsd_committer 2020-11-16 09:42:34 UTC
Is the gnome gitlab very different from other gitlab instances (for instance, the freedesktop.org one)?

We use this to pull in patches from upstream git repos quite a lot, I'm a bit surprised it doesn't work in this case.

I have no objections to local patches, I'm just curious about the issue.
Comment 7 Daniel Engberg 2020-11-16 10:32:13 UTC
They most likely just updated their instance which changed how patches are generated, at least that's my guess.
Comment 8 Daniel Engberg 2020-11-30 16:55:11 UTC
Friendly ping :-)
Comment 9 Tobias C. Berner freebsd_committer 2020-11-30 18:36:27 UTC
Friendly "woah, what happened to week three and four of november" pong :D 

Will commit shortly...
Comment 10 commit-hook freebsd_committer 2020-11-30 18:45:08 UTC
A commit references this bug:

Author: tcberner
Date: Mon Nov 30 18:45:05 UTC 2020
New revision: 556670
URL: https://svnweb.freebsd.org/changeset/ports/556670

  textproc/libxml2: ship patches via files/ due to gitlab

  - gitlab has a tendency to change checksum of patches due to metadata changes
  - switch to including the patches in the tree directly instead of using PATCH_FILES

  PR:             251040
  Submitted by:   daniel.engberg.lists@pyret.net
  Reported by:    David Armstrong <bink19th@pm.me>

Comment 11 Tobias C. Berner freebsd_committer 2020-11-30 18:45:30 UTC
Committed, and sorry for the wait.
Comment 12 John Hein 2020-12-03 15:06:12 UTC
(In reply to Tobias C. Berner from comment #11)
Was there a change in this that required the PORTREVISION bump?  I'm going to skip building this locally, but I just wanted to confirm I didn't miss anything.
Comment 13 Daniel Engberg 2020-12-05 11:07:00 UTC

There's no change that needs a PORTREVISION bump it's just a compilation fix.