Bug 268597 - sysutils/conky: enable Wayland support after 1.16 update
Summary: sysutils/conky: enable Wayland support after 1.16 update
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Jan Beich
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2022-12-27 10:37 UTC by Jan Beich
Modified: 2022-12-28 10:28 UTC (History)
1 user (show)

See Also:
madpilot: maintainer-feedback+


Attachments
v1 (apply via "git am") (2.52 KB, patch)
2022-12-27 10:37 UTC, Jan Beich
no flags Details | Diff
v1.1 (apply via "git am") (2.55 KB, patch)
2022-12-27 10:41 UTC, Jan Beich
no flags Details | Diff
v1.2 (apply via "git am") (2.58 KB, patch)
2022-12-27 13:36 UTC, Jan Beich
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2022-12-27 10:37:25 UTC
Created attachment 239061 [details]
v1 (apply via "git am")

After bug 227509 Wayland is supposed to be enabled by default to make binary package(s) usable for more users (aka "batteries included").

"poudriere bulk -t" passed on 12.3 amd64/i386, 13.1 amd64/i386, 14.0 amd64.

Disclaimer: I don't use conky.
Comment 1 Jan Beich freebsd_committer freebsd_triage 2022-12-27 10:41:04 UTC
Created attachment 239062 [details]
v1.1 (apply via "git am")

Adjust CATEGORIES to facilitate discovery via "pkg search -g wayland/\*" or https://www.freshports.org/wayland/
Comment 2 Jan Beich freebsd_committer freebsd_triage 2022-12-27 10:50:21 UTC
Building conky package with -DBUILD_WAYLAND=ON is inspired by Alpine Linux, see https://gitlab.alpinelinux.org/alpine/aports/-/commit/17fe787a2850
Comment 3 Jan Beich freebsd_committer freebsd_triage 2022-12-27 13:36:54 UTC
Created attachment 239064 [details]
v1.2 (apply via "git am")

Minor changes:
- Add "Inspired by" to document the origin of the idea
- Update vendor patch to the version *merged* upstream
Comment 4 Guido Falsi freebsd_committer freebsd_triage 2022-12-27 13:42:30 UTC
Hi!

Thanks for the patch.

I was planning on working on wayland support at a later time, so I upgraded the port first.

I'm not using wayland and know little about it so I needed some time to study things before working on this.

Your patch is really appreciated.

LGTM so if it builds fine please feel free to commit it!
Comment 5 commit-hook freebsd_committer freebsd_triage 2022-12-27 14:40:34 UTC
A commit in branch main references this bug:

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

commit cbe413ca77498af1a905da67e08c7441342e9fdd
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2022-12-27 09:10:12 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2022-12-27 14:35:56 +0000

    sysutils/conky: enable Wayland support after 481978c0272e

    See out_to_wayland in conky(1) manpage or

      $ fgrep -A3 wayland /usr/local/share/doc/conky/config_settings.yaml
        - name: out_to_wayland
          desc: |-
            Open a Wayland window to display output.
          default: no

    PR:             268597
    Inspired by:    Alpine Linux
    Approved by:    madpilot (maintainer)

 sysutils/conky/Makefile | 18 ++++++++++++++++--
 sysutils/conky/distinfo |  2 ++
 2 files changed, 18 insertions(+), 2 deletions(-)
Comment 6 Jan Beich freebsd_committer freebsd_triage 2022-12-27 14:53:56 UTC
Finally tested runtime under Sway via "env -u DISPLAY conky" to prevent X11 connection attempt. As conky currently disables native Wayland by default one has to explicitly set "out_to_wayland = true" in ~/.config/conky/conky.conf

When testing make sure the compositor implements layer-shell protocol. Plasma/Wayland does but currently broken on FreeBSD. GNOME/Wayland doesn't and was never ported to FreeBSD (e.g., bug 258042). That leaves wlroots consumers (reverse dependencies). For example, cage uses wlroots but doesn't support the protocol per https://github.com/Hjdskes/cage/issues/95

https://github.com/swaywm/sway/blob/master/protocols/wlr-layer-shell-unstable-v1.xml
https://gitlab.freedesktop.org/wlroots/wlroots/-/blob/master/protocol/wlr-layer-shell-unstable-v1.xml

https://invent.kde.org/plasma/kwayland-server/-/blob/master/src/protocols/wlr-layer-shell-unstable-v1.xml
https://github.com/MirServer/mir/blob/main/src/wayland/protocol/wlr-layer-shell-unstable-v1.xml
Comment 7 Jan Beich freebsd_committer freebsd_triage 2022-12-27 14:56:06 UTC
Kinda forgot a more simple way to check if some protocol is supported:

$ pkg install wayland-utils
$ wayland-info | fgrep layer
interface: 'zwlr_layer_shell_v1',                        version:  4, name: 12
Comment 8 Guido Falsi freebsd_committer freebsd_triage 2022-12-27 15:18:20 UTC
@Jan

Thanks for the followup information. Wayland is just a black box I know almost nothing about at present, never had time to study it and no real practical need. At present Xorg+XFCE4 covers all my desktop needs actually.

But At some point in the future I'll have to study that too.
Comment 9 commit-hook freebsd_committer freebsd_triage 2022-12-28 10:28:24 UTC
A commit in branch main references this bug:

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

commit f455d1891e9abaf4c86b8a4a8947f28586a5eb54
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2022-12-28 10:07:56 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2022-12-28 10:27:30 +0000

    sysutils/conky-awesome: disable WAYLAND like X11 after cbe413ca7749

    This is a headless package, used via a client pipe by x11-wm/awesome.

    PR:             268597

 sysutils/conky-awesome/Makefile | 2 +-
 sysutils/conky/Makefile         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)