Page MenuHomeFreeBSD

[new port] x11/wm-sway: i3-compatible Wayland compositor
AbandonedPublic

Authored by johalun0_gmail.com on Dec 9 2017, 1:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 4, 11:23 AM
Unknown Object (File)
Wed, Nov 20, 7:17 AM
Unknown Object (File)
Wed, Nov 20, 12:01 AM
Unknown Object (File)
Tue, Nov 19, 10:19 PM
Unknown Object (File)
Tue, Nov 19, 10:02 PM
Unknown Object (File)
Tue, Nov 19, 6:30 PM
Unknown Object (File)
Tue, Nov 19, 5:51 PM
Unknown Object (File)
Sun, Nov 17, 11:09 PM

Details

Reviewers
None
Summary

Add a port for the Wayland compositor, Sway.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

tobik added inline comments.
x11-wm/sway/Makefile
7

Missing x11-wm

9

Is the x11@ team fine with that?

17–23

The indentation is off by 2 tabs here.

25–28

Do you plan on making them options?

32
36

Is there any way we can build it with Clang?

x11-wm/sway/pkg-descr
2–4

This needs to be at least a paragraph or more and not just a repeat of COMMENT.

https://www.freebsd.org/doc/en/books/porters-handbook/porting-desc.html

x11-wm/sway/pkg-message
6–7

Hmm, I don't know about this. Aren't the man pages and WWW in pkg-descr enough?

https://github.com/SirCmpwn/sway/ redirects to https://github.com/swaywm/sway

Thanks for the feedback!
Sorry the previous patch was a bit old. I updated and fixed according to recommendations.

When digging deeper in the clang build error it turned out to be a really simple thing so it builds with clang now :)

johalun0_gmail.com added inline comments.
x11-wm/sway/Makefile
9

I'm fine with me as maintainer if better. What is the usual way to decide maintainer? I do think of myself as part of the graphics team.

Thanks for the feedback!
Sorry the previous patch was a bit old. I updated and fixed according to recommendations.

When digging deeper in the clang build error it turned out to be a really simple thing so it builds with clang now :)

Ok :)

I tried test building Sway today, but it failed in Poudriere on 11.1 on:

/wrkdirs/usr/ports/x11-wm/sway/work/sway-0.15/sway/commands/clipboard.c:33:2: error: implicit declaration of function 'wlc_set_selection' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        wlc_set_selection(str, types, 2, &send_clipboard);

Full build log: https://pastebin.com/raw/q6BacPs2

Removing -Werror lets the build proceed a little further but reveals more problems: https://pkg.tobik.me/logs/sway-0.15.log

Does this need the wlc update from https://bugs.freebsd.org/224202 ?

x11-wm/sway/Makefile
9

Normally the one who submits it becomes the maintainer :)

Does this need the wlc update from https://bugs.freebsd.org/224202 ?

Yes!

Many other graphic related ports seemed to have x11@ as maintainer so I followed that. I can update the patch later today with me as maintainer.

bapt added inline comments.
x11-wm/sway/pkg-plist
9

This should probably me rename config.sample and use the @sample keyword (because users might want to modify it)

Changed maintainer and fixed indent.

x11-wm/sway/pkg-plist
9

Not sure about that. If so, sway can't find the default configuration and won't even start.

This fails to fetch for me:

=> Fetched file size mismatch (expected 5394885, actual 5397948)

x11-wm/sway/pkg-plist
9

Using @sample in the pkg-plist will cause the sample to get copied to the non-sample file name. See:

https://www.freebsd.org/doc/en/books/porters-handbook/plist-keywords.html#plist-keywords-sample

Fix config sample file naming and update checksum.

What would be the reason behind disabling the SUID option ? (I wonder why the option is there exactly.)

In D13431#294379, @mat wrote:

What would be the reason behind disabling the SUID option ? (I wonder why the option is there exactly.)

Making it an option was probably copied from a similar port. Not sure there's a use case where SUID is not used.. Maybe if you want to only run with X11 backend there's no need to involve root.

Well, just saying, if you are not sure the option is needed, then maybe it is not and it should just be removed.

linimon retitled this revision from Add Sway port to [new port] x11/wm-sway: i3-compatible Wayland compositor.Jul 18 2018, 12:53 PM

Is there anything else blocking this port from being committed except the lack of a reviewer?

Is there anything else blocking this port from being committed except the lack of a reviewer?

This tool, here, Phabricator, is a code review tool, not a patch queue for things to be committed, which is what Bugzilla is for.
If you are not a committer, or do not plan to commit it yourself, it is best to always open a PR on our bugzilla in parallel so that the change actually goes in our pipeline.

In D13431#294379, @mat wrote:

What would be the reason behind disabling the SUID option ? (I wonder why the option is there exactly.)

The Sway GitHub say page it is necessary on systems without logind:

On systems without logind, you need to suid the sway binary:

sudo chmod a+s /usr/local/bin/sway

Sway will drop root permissions shortly after startup.

Is there anything else blocking this port from being committed except the lack of a reviewer?

Newer versions of sway use wlroots now (which nobody has ported yet AFAICT) and x11-toolkits/wlc has been deprecated (to be removed on 2018-12-31), so there is little point in landing this old version of sway.

Yeah, Sway is on hold until we can find time to get the new version that is based on wlroots ported. I might give this a shot during the holidays. Marking this as abandoned.

@johalun0_gmail.com, does rP489493 work for you?

Looks good! Thanks for working on this.