Page MenuHomeFreeBSD

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

Authored by johalun0_gmail.com on Dec 9 2017, 1:58 PM.

Details

Reviewers
None
Summary

Add a port for the Wayland compositor, Sway.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

Add Sway to x11-wm Makefile

tobik added a subscriber: tobik.Dec 9 2017, 5:04 PM
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 marked 7 inline comments as done.Dec 9 2017, 6:51 PM
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 a subscriber: bapt.Dec 19 2017, 9:21 AM
bapt added inline comments.
x11-wm/sway/pkg-plist
10

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
10

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

swills added a subscriber: swills.Jan 14 2018, 2:09 AM

This fails to fetch for me:

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

x11-wm/sway/pkg-plist
10

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.

johalun0_gmail.com marked 6 inline comments as done.Jan 23 2018, 3:03 PM
mat added a comment.Jan 23 2018, 3:13 PM

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.

mat added a comment.Jan 23 2018, 4:00 PM

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?

mat added a comment.Sep 21 2018, 8:45 AM

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.

tobik added a comment.Dec 13 2018, 9:30 AM

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.