Bug 254350 - graphics/libepoxy: update to 1.5.7
Summary: graphics/libepoxy: update to 1.5.7
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-x11 (Nobody)
URL: https://github.com/anholt/libepoxy/re...
Keywords: patch
Depends on:
Blocks:
 
Reported: 2021-03-16 20:35 UTC by Evgeniy Khramtsov
Modified: 2021-05-20 15:07 UTC (History)
5 users (show)

See Also:
zeising: maintainer-feedback+


Attachments
patch (1.93 KB, patch)
2021-03-16 20:35 UTC, Evgeniy Khramtsov
no flags Details | Diff
v2 (2.02 KB, patch)
2021-04-10 10:06 UTC, Evgeniy Khramtsov
no flags Details | Diff
v3 (2.02 KB, patch)
2021-04-10 12:22 UTC, Evgeniy Khramtsov
no flags Details | Diff
v4 (apply via "git am") (1.98 KB, patch)
2021-05-01 09:54 UTC, Jan Beich
zeising: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Evgeniy Khramtsov 2021-03-16 20:35:00 UTC
Created attachment 223342 [details]
patch

Update libepoxy to the latest upstream version.
While here, add libglvnd fixes from upstream.
Included feedback from jbeich@ at FreeBSDDesktop Gitter.

Runtime tested with libglvnd,mesa-devel, luakit with GDK_BACKEND={wayland,x11} under sway + two other patches that I will post next.
Comment 1 Jan Beich freebsd_committer 2021-03-17 02:49:29 UTC
Comment on attachment 223342 [details]
patch

Looks good: both style and sync with upstream changes. I dogfood libglvnd on 14.0 amd64 myself but also tested firefox/mpv runtime in 11.4 i386 jail.

"Reviewed by:	jbeich"
Comment 2 Daniel Engberg freebsd_committer 2021-04-10 06:18:46 UTC
A few things that should be fixed

PORTVERSION --> DISTVERSION
See "Table 5.2. Package Naming Examples" in Porters Handbook

L8 (First entry of PATCHFILES) should say = not += and please use full commit hash

python:3.3+,build is invalid (and meson requires 3.5+), 3.6 is the oldest version we have in ports of 3.x
https://svnweb.freebsd.org/ports/head/Mk/Uses/python.mk?revision=569588&view=markup

Best regards,
Daniel
Comment 3 Evgeniy Khramtsov 2021-04-10 10:06:33 UTC
Created attachment 223980 [details]
v2

Include more feedback. I am not sure about how pkg will react to replacing PORTVERSION with DISTVERSION, or why PORTVERSION was used, so I left it as is. Anyone who is interested in replacing PORTVERSION with DISTVERSION can do this as a separate commit, I guess. Thanks!
Comment 4 Daniel Engberg freebsd_committer 2021-04-10 10:10:27 UTC
It'll handle it seamlessy, DIST vs PORTVERSSION changed in Porters Handbook about 2 years ago if I recall correctly.

Thanks! :-)
Comment 5 Alexey Dokuchaev freebsd_committer 2021-04-10 10:11:46 UTC
In this particular case, PORTVERISION is just fine.  "Table 5.2. Package Naming Examples" in Porters Handbook is misleading, feel free to ignore it.
Comment 6 Daniel Engberg freebsd_committer 2021-04-10 10:25:55 UTC
PORTVERSION will work however guidelines changed in early 2018
Reference: https://web.archive.org/web/20180221195029/https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/book.html#makefile-naming

Section "5.2.2. Versions, DISTVERSION or PORTVERSION" also says the same (first line) "Set DISTVERSION to the version number of the software."

...and it's also in current version:
https://docs.freebsd.org/en/books/porters-handbook/book.html#makefile-naming

Best regards,
Daniel
Comment 7 Alexey Dokuchaev freebsd_committer 2021-04-10 10:59:49 UTC
(In reply to daniel.engberg.lists from comment #6)
> PORTVERSION will work however guidelines changed in early 2018
Someone arbitrarily changed the guidelines, yes.  No need to follow them as they are bogus now.  Previously it made more sense, PORTVERSION is the default pick, unless upstream uses weird scheme in which case DISTVERSION should be used instead and PORTVERSION inferred from it.
Comment 8 Evgeniy Khramtsov 2021-04-10 12:22:02 UTC
Created attachment 223981 [details]
v3

I think someone might want to have some future upstream commit locally (e.g. by adding if curdir libepoxy in make.conf and adding it to PATCHFILES). Use "+=" instead of "=" as in the v1 to not override the first two patchfiles. Reported by subconscious mind while doing some other stuff.
Comment 9 Evgeniy Khramtsov 2021-04-10 12:24:43 UTC
(In reply to Evgeniy Khramtsov from comment #8)
s/first two/custom
Comment 10 Niclas Zeising freebsd_committer 2021-04-10 13:17:53 UTC
There is no need to change from PORTVERSION to DISTVERSION, especially since PORTVERSION is used currently in the port.

The patch looks good, approved.

I'll try to commit it later, but currently I'm away from my ports tree.
Comment 11 Evgeniy Khramtsov 2021-04-23 21:11:19 UTC
(In reply to Niclas Zeising from comment #10)

Two weeks after maintainer-feedback+
Comment 12 Jan Beich freebsd_committer 2021-05-01 09:54:26 UTC
Created attachment 224587 [details]
v4 (apply via "git am")

1.5.7 is out. Builds fine on 11.4 i386 / 12.2 amd64 / 14.0 aarch64 / etc. and works fine with midori (via wpebacked-fdo) and i386-wine-devel (via xwayland-devel).

https://github.com/anholt/libepoxy/releases/tag/1.5.6
https://github.com/anholt/libepoxy/releases/tag/1.5.7
Comment 13 Jan Beich freebsd_committer 2021-05-05 09:34:51 UTC
Ping x11@. If you don't have time maybe rubberstamp to unblock. OTOH, if you do have time maybe review the patch in bug 254454. ;)
Comment 14 Niclas Zeising freebsd_committer 2021-05-05 15:40:58 UTC
(In reply to Jan Beich from comment #13)
The previous patch was approved.  The new patch is only a few days old.
Comment 15 Jan Beich freebsd_committer 2021-05-13 21:37:03 UTC
Ping. I need feedback or approval. Testing all consumers here is pointless as API (include/*.h) didn't change between 1.5.4 and 1.5.7. OTOH, random stuff like x11/kde5 (pulls xorg-server ;), www/webkit2-gtk3, etc. built fine.
Comment 16 Jan Beich freebsd_committer 2021-05-14 22:39:10 UTC
(In reply to Jan Beich from comment #15)
> x11/kde5

Both startplasma-x11 and startplasma-wayland work fine with v4 patch proposed here.
Comment 17 Jan Beich freebsd_committer 2021-05-20 09:27:19 UTC
Ping.
Comment 18 Daniel Engberg freebsd_committer 2021-05-20 11:13:56 UTC
Something I overlooked is that we should most likely also switch to release archives provided by upstream
https://github.com/anholt/libepoxy/releases/tag/1.5.7
Comment 19 Evgeniy Khramtsov 2021-05-20 11:29:19 UTC
(In reply to Daniel Engberg from comment #18)

What do you mean? Switch to fetching the "libepoxy-1.5.7.tar.xz" asset instead of using USE_GITHUB? _GITHUB_EXTRACT_SUFFX is not overridable, also see the suffix with MASTER_SITES: https://cgit.freebsd.org/ports/tree/Mk/bsd.sites.mk#n440

Fetching the asset directly is likely wrong, ports should use the API:
https://cgit.freebsd.org/ports/tree/Mk/bsd.sites.mk#n389

If you want to fetch the .tar.xz, you likely need to change bsd.sites.mk, which is guarded by portmgr@ approval, instead of this port.
Comment 20 Daniel Engberg freebsd_committer 2021-05-20 11:49:09 UTC
USE_GITHUB isn't intended to pull archives.

https://docs.freebsd.org/en/books/porters-handbook/book.html#makefile-master_sites-github-description
"If the distribution file comes from a specific commit or tag on GitHub for which there is no officially released file"

In this case you'd just use MASTER_SITES and remove the USE_GITHUB and related variables.
Comment 21 John Hein 2021-05-20 12:01:20 UTC
(In reply to Evgeniy Khramtsov from comment #19)
Daniel means (I think) that we could use MASTER_SITES=https://github.com/anholt/libepoxy/releases/tag/${PORTVERSION}/.  In this case, we _will_ need to change PORTVERSION to DISTVERSION.  USE_GITHUB & GH_* can be removed, too.

Why to use a release tarball (feel free to ignore this if you already understand why)...

Upstream generated an actual release tarball (often by building some sort of 'dist' target).  The release tarball can be different than just the tarball of the tagged source.  For instance, it may have pre-generated documentation files so you don't have to pull in big documentation processing package dependencies and run tools to build/install docs.  That's one reason (of various other reasons) to prefer an actual release tarball.  On the other hand, if a release tarball is gigantic and full of unnecessary / undesired pieces, one might prefer just the tarball of the tagged source.
Comment 22 John Hein 2021-05-20 12:14:28 UTC
(In reply to Daniel Engberg from comment #20)
Sorry for duplicating the reason for using a release tarball, more or less (in comment 21).

Correction to comment 21... use this for MASTER_SITES:

MASTER_SITES=https://github.com/anholt/libepoxy/releases/download/${DISTVERSION}/

Also add tar:xz to USES.

Note: in this case the release tarball and the source tarball are very similar.  The source tarball includes .github/ and .gitignore - otherwise, they are the same.
Comment 23 Evgeniy Khramtsov 2021-05-20 12:21:48 UTC
(In reply to Daniel Engberg from comment #20)

From this link:

> Example 5.10. Simple Use of USE_GITHUB
> It will automatically have MASTER_SITES set to GH GHC and WRKSRC to ${WRKDIR}/pkg-1.2.7.

Read: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194898
USE_GITHUB uses the correct API and reduces duplication in ports.

MASTER_SITES might be set to fetch the asset as well, though it would require more work for the maintainer, e.g. rerolling the distfile if GitHub changes timestamp of the asset for some reason, or changes the link to download assets, or anything else.

USE_GITHUB ensures that this is automated and changed in one place (bsd.sites.mk) for all ports. The handbook section is likely misleading and should be updated.

(In reply to John Hein from comment #22)

> MASTER_SITES=https://github.com

It should use the API endpoint if the MASTER_SITES way gets committed.
Comment 24 John Hein 2021-05-20 13:20:55 UTC
(In reply to Evgeniy Khramtsov from comment #23)
I don't think USE_GITHUB knows how to download release tarballs currently.  Correct me if that's wrong.
Comment 25 Daniel Engberg freebsd_committer 2021-05-20 14:32:13 UTC
(In reply to Evgeniy Khramtsov from comment #23)
Hi, it's listed that way in the handbook so you don't override the framework.
https://cgit.freebsd.org/ports/tree/Mk/bsd.sites.mk#n368
https://cgit.freebsd.org/ports/tree/Mk/bsd.sites.mk#n389
...and it's not the same thing as using MASTER_SITES and you shouldn't use USE_GITHUB if you're downloading pre-packaged files.

Feel free to grep the tree if you're in doubt :-)
Comment 26 Niclas Zeising freebsd_committer 2021-05-20 14:35:50 UTC
Comment on attachment 224587 [details]
v4 (apply via "git am")

Approved.
Comment 27 Niclas Zeising freebsd_committer 2021-05-20 14:37:03 UTC
Side note, this is probably the wrong place to argue USE_GITHUB vs fetching distfiles using MASTER_SITES.  Perhaps ports@ is better?
Comment 28 commit-hook freebsd_committer 2021-05-20 14:46:10 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=36789996a45be766ef882af8c0e106334062f513

commit 36789996a45be766ef882af8c0e106334062f513
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2021-03-17 00:03:35 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2021-05-20 14:45:00 +0000

    graphics/libepoxy: update to 1.5.7

    Changes:        https://github.com/anholt/libepoxy/releases/tag/1.5.5
    Changes:        https://github.com/anholt/libepoxy/releases/tag/1.5.6
    Changes:        https://github.com/anholt/libepoxy/releases/tag/1.5.7
    PR:             254350
    Reported by:    portscout
    Submitted by:   Evgeniy Khramtsov <2khramtsov@gmail.com> (based on)
    Approved by:    zeising

 graphics/libepoxy/Makefile | 6 +++---
 graphics/libepoxy/distinfo | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)